Skip to content
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

Allow String / numeric data type for deleteRecordColumn config #12222

Merged
merged 4 commits into from Jan 10, 2024

Conversation

tibrewalpratik17
Copy link
Contributor

@tibrewalpratik17 tibrewalpratik17 commented Jan 4, 2024

Relates to #12217.

This patch add the criteria that deleteRecordColumn field can be of String / numeric data type thus allowing String based "true"/"false"/"0"/"1" to work or int based 0/1 as well based on BooleanUtils class.

Tested in one of our clusters using String based field for deleted column and worked as expected.

@codecov-commenter
Copy link

codecov-commenter commented Jan 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (a0a9b6b) 61.57% compared to head (da7f7c2) 61.59%.
Report is 14 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master   #12222      +/-   ##
============================================
+ Coverage     61.57%   61.59%   +0.02%     
- Complexity     1152     1153       +1     
============================================
  Files          2415     2416       +1     
  Lines        131167   131205      +38     
  Branches      20245    20250       +5     
============================================
+ Hits          80769    80821      +52     
+ Misses        44501    44473      -28     
- Partials       5897     5911      +14     
Flag Coverage Δ
custom-integration1 <0.01% <0.00%> (ø)
integration <0.01% <0.00%> (ø)
integration1 <0.01% <0.00%> (ø)
integration2 0.00% <0.00%> (ø)
java-11 61.52% <100.00%> (+0.01%) ⬆️
java-21 61.47% <100.00%> (+0.02%) ⬆️
skip-bytebuffers-false 61.55% <100.00%> (+0.01%) ⬆️
skip-bytebuffers-true 61.44% <100.00%> (+0.05%) ⬆️
temurin 61.59% <100.00%> (+0.02%) ⬆️
unittests 61.59% <100.00%> (+0.02%) ⬆️
unittests1 46.62% <0.00%> (-0.02%) ⬇️
unittests2 27.76% <100.00%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tibrewalpratik17
Copy link
Contributor Author

Hey @walterddr @navina can you help review this PR? Should we remove boolean check altogether or add String / Numeric as additional checks?

@walterddr
Copy link
Contributor

@navina please share your thoughts. i am ok with the approach as long as we agree upon the new contract

@navina
Copy link
Contributor

navina commented Jan 9, 2024

Hey @walterddr @navina can you help review this PR? Should we remove boolean check altogether or add String / Numeric as additional checks?

i think it will be better to add additional string/numeric checks in TableConfigUtils. Do you think that is possible?

Apologies for the delay in response @tibrewalpratik17 . I missed the notification.

@tibrewalpratik17
Copy link
Contributor Author

i think it will be better to add additional string/numeric checks in TableConfigUtils. Do you think that is possible?

Yes let me do that instead.

@tibrewalpratik17 tibrewalpratik17 changed the title Remove enforcement of BOOLEAN data type from deleteRecordColumn Allow String / numeric data type from deleteRecordColumn Jan 9, 2024
@tibrewalpratik17 tibrewalpratik17 changed the title Allow String / numeric data type from deleteRecordColumn Allow String / numeric data type for deleteRecordColumn config Jan 9, 2024
@tibrewalpratik17
Copy link
Contributor Author

Updated! cc @walterddr @navina

Copy link
Contributor

@ankitsultana ankitsultana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm. Thanks for the quick turnaround and testing for this.

One minor note is that we can say "Column=%s doesn't exist" instead of "Invalid delete record column found".

Copy link
Contributor

@navina navina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@ankitsultana ankitsultana merged commit 747e34d into apache:master Jan 10, 2024
19 checks passed
saurabhd336 pushed a commit to saurabhd336/pinot that referenced this pull request Feb 9, 2024
…e#12222)

* Remove enforcement of BOOLEAN data type from deleteRecordColumn

* add string and numeric type for boolean columns

* addressed comments

* improve error messages
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants