Skip to content
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

Closed
wants to merge 4 commits into from

Conversation

JkSelf
Copy link
Contributor

@JkSelf JkSelf commented Jul 30, 2024

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 use DateAdd 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)

Copy link

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?

[GLUTEN-${ISSUES_ID}][COMPONENT]feat/fix: ${detailed message}

See also:

Copy link

Run Gluten Clickhouse CI

1 similar comment
Copy link

Run Gluten Clickhouse CI

@JkSelf JkSelf changed the title [VL] Disable date type in window range frame support [GLUTEN-6600][VL] Disable date type in window range frame support Jul 30, 2024
Copy link

#6600

@JkSelf
Copy link
Contributor Author

JkSelf commented Jul 30, 2024

@WangGuangxin @ulysses-you

@WangGuangxin
Copy link
Contributor

LGTM

@ulysses-you
Copy link
Contributor

Seems failed tests are related

Copy link

Run Gluten Clickhouse CI

Copy link
Contributor

@zml1206 zml1206 left a 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" +
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update exception message.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zml1206 Good catch. Updated.

Copy link

Run Gluten Clickhouse CI

@JkSelf
Copy link
Contributor Author

JkSelf commented Jul 31, 2024

Seems failed tests are related

Yes. Fixed.

@JkSelf JkSelf closed this Aug 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants