-
Notifications
You must be signed in to change notification settings - Fork 454
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: replaced asterisk with constraint name in get_constraints #3270
base: main
Are you sure you want to change the base?
refactor: replaced asterisk with constraint name in get_constraints #3270
Conversation
…or table config Signed-off-by: Alexander Falk <alexfalk7@gmail.com>
@Nordalf can you add a test please :) |
@ion-elgreco , of course. I will add a test a little later 🚀 Edit: Already seeing the first problem in |
…checks Signed-off-by: Alexander Falk <alexfalk7@gmail.com>
… name or asterisk Signed-off-by: Alexander Falk <alexfalk7@gmail.com>
Signed-off-by: Alexander Falk <alexfalk7@gmail.com>
…traints Signed-off-by: Alexander Falk <alexfalk7@gmail.com>
@ion-elgreco check out the updated code. I have modified the I have also included two new tests: one for |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3270 +/- ##
==========================================
+ Coverage 72.11% 72.13% +0.02%
==========================================
Files 143 143
Lines 45530 45617 +87
Branches 45530 45617 +87
==========================================
+ Hits 32833 32907 +74
- Misses 10618 10625 +7
- Partials 2079 2085 +6 ☔ View full report in Codecov by Sentry. |
@Nordalf looks good, can you squash the commits? Then we can merge |
Description
When retrieving constraints from the table config, the name is set to an asterisk (*). The name is needed if you want to e.g. drop the constraint again. I have modified the code to use the found keys excluding
delta.constraints.
.Before:
After:
Going through the code, I discovered the reason behind using the asterisk. It was for the
delta_datafusion::enforce_checks
function to format itsSQL
-query withSELECT * ...
in a constraint check. To ensure theenforce_checks
function still works, I have expanded theDeltaCheck
trait to includeas_any()
to allow type checking inenforce_checks
to condition how theSQL
-query must be formatted for different checks.Related Issue(s)
No related issues
Documentation
No documentation