-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Fix type cast issue with dateTimeConvert scalar function #11839
Conversation
3194fc8
to
fa1e475
Compare
fa1e475
to
9bfdc93
Compare
Codecov Report
@@ Coverage Diff @@
## master #11839 +/- ##
============================================
+ Coverage 66.35% 66.38% +0.02%
Complexity 207 207
============================================
Files 2350 2350
Lines 127281 127284 +3
Branches 19603 19604 +1
============================================
+ Hits 84463 84496 +33
+ Misses 36924 36895 -29
+ Partials 5894 5893 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 24 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
…ch the Transform function behavior
9bfdc93
to
0658af2
Compare
pinot-common/src/main/java/org/apache/pinot/common/function/scalar/DateTimeConvert.java
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.
lgtm
Right now dateTimeConvert is always cast for STRING in scalar function.
The return type should be LONG(BIGINT) for EPOCH or TIMESTAMP type and STRING for SIMPLE_DATE_FORMAT
This is discovered when running a query in v2:
SELECT DATETIMECONVERT(AGO('P32D'),'1:MILLISECONDS:EPOCH', '1:SECONDS:EPOCH', '1:SECONDS') from activity_full
Error:
After fix: