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

[VL] RAS: Avoid adding R2C whose schema contains complex data types #7229

Merged
merged 7 commits into from
Sep 14, 2024

Conversation

zhztheplayer
Copy link
Member

@zhztheplayer zhztheplayer commented Sep 13, 2024

It's observed Velox R2C becomes expensive when containing complex data types as input. Add a coster in rough cost model to address the issue.

To enable rough cost model:

spark.gluten.ras.enabled=true
spark.gluten.ras.costModel=rough

@github-actions github-actions bot added CORE works for Gluten Core VELOX labels Sep 13, 2024
@apache apache deleted a comment from github-actions bot Sep 13, 2024
Copy link

Run Gluten Clickhouse CI

Copy link

Run Gluten Clickhouse CI

1 similar comment
Copy link

Run Gluten Clickhouse CI

@zhztheplayer
Copy link
Member Author

cc @FelixYBW @jinchengchenghh

@zhztheplayer zhztheplayer changed the title [VL] RAS: Fallback R2C whose schema contains complex data types [VL] RAS: Avoid adding R2C whose schema contains complex data types Sep 13, 2024
Copy link

Run Gluten Clickhouse CI

case r2c: RowToColumnarExecBase if hasComplexTypes(r2c.schema) =>
// Avoid moving computation back to native when transition has complex types in schema.
// Such transitions are observed to be extreme expensive as of now.
Long.MaxValue
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we add a more reasonable value to the cost? How can we measure the operator cost now?

Copy link
Contributor

Choose a reason for hiding this comment

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

We can use it as a temp solution. The r2c is very expensive.

Copy link
Member Author

@zhztheplayer zhztheplayer Sep 13, 2024

Choose a reason for hiding this comment

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

Yes. it's just a heuristic as a temp solution from query optimizer side.

Copy link

Run Gluten Clickhouse CI

Copy link

Run Gluten Clickhouse CI

Copy link

Run Gluten Clickhouse CI

@FelixYBW
Copy link
Contributor

temp fix of #7223

@zhztheplayer zhztheplayer merged commit 8b65630 into apache:main Sep 14, 2024
44 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CORE works for Gluten Core VELOX
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants