Add mask scalar function for partition normalizer#18452
Closed
xiangfu0 wants to merge 1 commit into
Closed
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #18452 +/- ##
=========================================
Coverage 63.65% 63.65%
Complexity 1684 1684
=========================================
Files 3256 3257 +1
Lines 199519 199562 +43
Branches 30989 30986 -3
=========================================
+ Hits 127003 127034 +31
- Misses 62377 62389 +12
Partials 10139 10139
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
a400751 to
989392d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
mask(value)scalar function for thePartitionIdNormalizer.MASKlogic by stripping the sign bit.User Manual
mask(value)supportsINTandLONGinputs and clears the sign bit, matchingPartitionIdNormalizer.MASK. Callers can apply modulo separately when they want a partition id.Sample Data
Assume a table
normalizer_demowith:hash_inthash_long-2147483648-9223372036854775808-10-101010Sample Queries And Results
hash_intmasked_inthash_longmasked_long-21474836480-92233720368547758080-102147483638-10922337203685477579810101010Callers can apply modulo separately:
hash_intmasked_partition-21474836480-1061010Tests
./mvnw -pl pinot-common -am -Dtest=BitwiseScalarFunctionTest,CalciteSqlCompilerTest -Dsurefire.failIfNoSpecifiedTests=false test./mvnw -pl pinot-core -am -Dtest=org.apache.pinot.core.data.function.BitFunctionsTest -Dsurefire.failIfNoSpecifiedTests=false test./mvnw -pl pinot-query-planner -am -Dtest=org.apache.pinot.query.QueryCompilationTest#testPolymorphicBitwiseScalarFunctionsPlanQuery -Dsurefire.failIfNoSpecifiedTests=false test./mvnw spotless:apply checkstyle:check license:format license:check -pl pinot-common,pinot-core,pinot-query-planner,pinot-integration-testsgit diff --check