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

SQL compliance: allow INT and FLOAT literal #13078

Merged
merged 1 commit into from
May 18, 2024

Conversation

Jackie-Jiang
Copy link
Contributor

@Jackie-Jiang Jackie-Jiang commented May 4, 2024

In #11763 we have added support to server to support both INT and FLOAT literal.
After one release (release 1.1), now we can move forward to send INT and FLOAT from broker side.

This PR also contains type related fixes and cleanups:

  • Fix broker FLOAT/BYTES handling by not allowing using Literal.getFieldValue() because the field stored in thrift doesn't always reflect the actual Pinot value. Replaced with newly introduced helper functions in RequestUtils
  • Cleanup unused BYTE/SHORT literal handling

Backward Incompatible

This PR can cause incompatibility for the new added VECTOR_SIMILARITY function during upgrade. But since this feature is newly added and not in production, we won't wait another release to fix it

@codecov-commenter
Copy link

codecov-commenter commented May 4, 2024

Codecov Report

Attention: Patch coverage is 35.97884% with 121 lines in your changes are missing coverage. Please review.

Project coverage is 62.13%. Comparing base (59551e4) to head (3182f6e).
Report is 420 commits behind head on master.

Files Patch % Lines
...ot/common/request/context/RequestContextUtils.java 2.12% 46 Missing ⚠️
...pache/pinot/common/utils/request/RequestUtils.java 33.33% 40 Missing and 4 partials ⚠️
...optimizer/filter/TimePredicateFilterOptimizer.java 66.66% 6 Missing and 3 partials ⚠️
...ery/optimizer/filter/NumericalFilterOptimizer.java 0.00% 6 Missing ⚠️
.../org/apache/pinot/spi/data/DateTimeFormatSpec.java 20.00% 3 Missing and 1 partial ⚠️
...roker/requesthandler/BaseBrokerRequestHandler.java 25.00% 3 Missing ⚠️
...roker/routing/segmentpruner/TimeSegmentPruner.java 72.72% 2 Missing and 1 partial ⚠️
...apache/pinot/sql/parsers/rewriter/ClpRewriter.java 50.00% 1 Missing and 1 partial ⚠️
...he/pinot/sql/parsers/rewriter/OrdinalsUpdater.java 90.00% 0 Missing and 1 partial ⚠️
...izer/filter/IdenticalPredicateFilterOptimizer.java 50.00% 0 Missing and 1 partial ⚠️
... and 2 more
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #13078      +/-   ##
============================================
+ Coverage     61.75%   62.13%   +0.38%     
+ Complexity      207      198       -9     
============================================
  Files          2436     2514      +78     
  Lines        133233   137871    +4638     
  Branches      20636    21328     +692     
============================================
+ Hits          82274    85673    +3399     
- Misses        44911    45790     +879     
- Partials       6048     6408     +360     
Flag Coverage Δ
custom-integration1 <0.01% <0.00%> (-0.01%) ⬇️
integration <0.01% <0.00%> (-0.01%) ⬇️
integration1 <0.01% <0.00%> (-0.01%) ⬇️
integration2 0.00% <0.00%> (ø)
java-11 62.10% <35.97%> (+0.39%) ⬆️
java-21 62.02% <35.97%> (+0.40%) ⬆️
skip-bytebuffers-false 62.12% <35.97%> (+0.38%) ⬆️
skip-bytebuffers-true 62.00% <35.97%> (+34.28%) ⬆️
temurin 62.13% <35.97%> (+0.38%) ⬆️
unittests 62.13% <35.97%> (+0.38%) ⬆️
unittests1 46.80% <33.90%> (-0.09%) ⬇️
unittests2 27.74% <4.76%> (+<0.01%) ⬆️

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.

@Jackie-Jiang Jackie-Jiang added the backward-incompat Referenced by PRs that introduce or fix backward compat issues label May 7, 2024
@Jackie-Jiang Jackie-Jiang force-pushed the fix_int_float_literal branch 3 times, most recently from b3e6c3a to c47f8bc Compare May 8, 2024 02:36
@Jackie-Jiang Jackie-Jiang merged commit d4bf8f2 into apache:master May 18, 2024
21 checks passed
@Jackie-Jiang Jackie-Jiang deleted the fix_int_float_literal branch May 18, 2024 22:54
gortiz pushed a commit to gortiz/pinot that referenced this pull request Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backward-incompat Referenced by PRs that introduce or fix backward compat issues bugfix enhancement SQL Compliance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants