-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[multistage] Support TIMESTAMP type and date ops functions #11350
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #11350 +/- ##
=========================================
Coverage 61.46% 61.46%
- Complexity 6512 6513 +1
=========================================
Files 2234 2234
Lines 120155 120191 +36
Branches 18235 18244 +9
=========================================
+ Hits 73854 73880 +26
- Misses 40888 40890 +2
- Partials 5413 5421 +8
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 10 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
cc9c0b9 to
d94bc25
Compare
Jackie-Jiang
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add some tests
pinot-common/src/main/java/org/apache/pinot/common/utils/DataSchema.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(minor) Suggest removing the rexLiteral.getValue() instanceof GregorianCalendar so that if it returns unexpected value we can get exception instead of a completely wrong literal
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel this applies to all data types
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For other data types, only BIG_DECIMAL is the inferable type. So just need to add support for that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we going to hit both? If so, can you add some java doc explaining when will we hit both? If we can hit both, then BOOLEAN will also break
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Certain non strong typed functions in v2 might return long value then in datablock build, we need to do the conversion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this still apply? Ideally we should always have internal format value. If we break that contract, BOOLEAN will also break
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a TODO to auto generate signature for scalar function. We should not manually add this for scalar function
[multistage] Convert TIMESTAMP type value at reduce phase
d94bc25 to
0c02242
Compare
0b5b0f7 to
284ede5
Compare
284ede5 to
a386ac2
Compare
fromDateTimetoDateTimetimestampAddtimestampDiffyearyearOfWeekmonthOfYearweekOfYeardayOfYeardayOfMonthdayOfWeekhourminutesecondmillisecondNote
quarteris not supported in v2 yet.Before:

After:
