-
Notifications
You must be signed in to change notification settings - Fork 444
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
[GLUTEN-6600][VL] Disable date type in window range frame support #6637
Conversation
Thanks for opening a pull request! Could you open an issue for this pull request on Github Issues? https://github.com/apache/incubator-gluten/issues Then could you also rename commit message and pull request title in the following format?
See also: |
Run Gluten Clickhouse CI |
1 similar comment
Run Gluten Clickhouse CI |
LGTM |
Seems failed tests are related |
Run Gluten Clickhouse CI |
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, only one comment.
@@ -347,7 +347,7 @@ object VeloxBackendSettings extends BackendSettingsApi { | |||
orderSpec.foreach( | |||
order => | |||
order.dataType match { | |||
case ByteType | ShortType | IntegerType | LongType | DateType => | |||
case ByteType | ShortType | IntegerType | LongType => | |||
case _ => | |||
throw new GlutenNotSupportException( | |||
"Only integral type & date type are" + |
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.
Update exception message.
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.
@zml1206 Good catch. Updated.
Run Gluten Clickhouse CI |
Yes. Fixed. |
What changes were proposed in this pull request?
To support range frames, we need to add a pre-project before the window to calculate the range frame's value. If the key in the order by clause is of date type, using Add(orderSpec.child, bound) will result in the column's attribute being Unresolved, because the data types on both sides of
Add
are inconsistent. We try to useDateAdd
for date types here to perform the calculation, and the pre-project can work. However, the post-project will throw same error because we have rewritten the frame in the Window to be of date type, but Spark's frame type does not support DateType.How was this patch tested?
Adding new unit tests.
(If this patch involves UI changes, please attach a screenshot; otherwise, remove this)