-
Notifications
You must be signed in to change notification settings - Fork 3.5k
[Feature](literal)Support TimeV2Literal #47319
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
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
run buildall |
TPC-H: Total hot run time: 32300 ms
|
TPC-DS: Total hot run time: 195154 ms
|
ClickBench: Total hot run time: 30.98 s
|
run p0 |
1 similar comment
run p0 |
run buildall |
run buildall |
TPC-H: Total hot run time: 32669 ms
|
TPC-DS: Total hot run time: 184397 ms
|
ClickBench: Total hot run time: 30.49 s
|
run buildall |
TeamCity be ut coverage result: |
run buildall |
TPC-H: Total hot run time: 32315 ms
|
TeamCity be ut coverage result: |
TPC-DS: Total hot run time: 192714 ms
|
ClickBench: Total hot run time: 30.85 s
|
run buildall |
TeamCity be ut coverage result: |
TPC-H: Total hot run time: 32492 ms
|
fe/fe-core/src/main/java/org/apache/doris/analysis/TimeV2Literal.java
Outdated
Show resolved
Hide resolved
@@ -49,6 +51,9 @@ public Type toCatalogDataType() { | |||
* create TimeV2Type from scale | |||
*/ | |||
public static TimeV2Type of(int scale) { | |||
if (scale > MAX_SCALE || scale < 0) { |
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.
should check scale in constructor too
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.
the constructor is private TimeV2Type(int scale)
private
fe/fe-core/src/main/java/org/apache/doris/nereids/types/DataType.java
Outdated
Show resolved
Hide resolved
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/literal/TimeV2Literal.java
Outdated
Show resolved
Hide resolved
fe/fe-core/src/main/java/org/apache/doris/analysis/TimeV2Literal.java
Outdated
Show resolved
Hide resolved
TPC-H: Total hot run time: 33740 ms
|
TPC-DS: Total hot run time: 185588 ms
|
ClickBench: Total hot run time: 28.84 s
|
fe/fe-core/src/main/java/org/apache/doris/analysis/TimeV2Literal.java
Outdated
Show resolved
Hide resolved
this.negative = false; | ||
} | ||
|
||
public TimeV2Literal(double value) throws AnalysisException { |
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.
long
is more reasonable?
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.
Time type data is always converted to double type operation in be, I think it's more standardized to use double here?
fe/fe-core/src/main/java/org/apache/doris/analysis/TimeV2Literal.java
Outdated
Show resolved
Hide resolved
run buildall |
Cloud UT Coverage ReportIncrement line coverage Increment coverage report
|
TPC-H: Total hot run time: 33782 ms
|
TPC-DS: Total hot run time: 185828 ms
|
ClickBench: Total hot run time: 28.56 s
|
run buildall |
run buildall |
Cloud UT Coverage ReportIncrement line coverage Increment coverage report
|
run p0 |
run performance |
run external |
1 similar comment
run external |
TPC-H: Total hot run time: 33932 ms
|
TPC-DS: Total hot run time: 192845 ms
|
ClickBench: Total hot run time: 29.71 s
|
PR approved by at least one committer and no changes requested. |
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
```sql explain select cast('12:30:30' as time); before: PLAN FRAGMENT 0 OUTPUT EXPRS: cast('12:30:30' as time)[#0] PARTITION: UNPARTITIONED HAS_COLO_PLAN_NODE: false VRESULT SINK MYSQL_PROTOCAL 0:VUNION(28) constant exprs: CAST('12:30:30' AS time) after: PLAN FRAGMENT 0 OUTPUT EXPRS: 12:30:30[#0] PARTITION: UNPARTITIONED HAS_COLO_PLAN_NODE: false VRESULT SINK MYSQL_PROTOCAL 0:VUNION(30) constant exprs: "12:30:30" ```
What problem does this PR solve?
Issue Number: close #xxx
Related PR: #xxx
Problem Summary:
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)