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-6803]Init ExpressionUtil.extendedExpressionTransformer in executor side #6837

Closed
wants to merge 4 commits into from

Conversation

JkSelf
Copy link
Contributor

@JkSelf JkSelf commented Aug 14, 2024

What changes were proposed in this pull request?

Follow up #6803.

Init ExpressionUtil.extendedExpressionTransformer in GlutenExecutorPlugin side

How was this patch tested?

local verified.

@JkSelf
Copy link
Contributor Author

JkSelf commented Aug 14, 2024

@zhztheplayer

@github-actions github-actions bot added the CORE works for Gluten Core label Aug 14, 2024
Copy link

Run Gluten Clickhouse CI

@@ -354,6 +354,5 @@ object ExpressionMappings {
.toMap[Class[_], String]
}

var expressionExtensionTransformer: ExpressionExtensionTrait =
DefaultExpressionExtensionTransformer()
var expressionExtensionTransformer: ExpressionExtensionTrait = _
Copy link
Member

Choose a reason for hiding this comment

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

I'd suggest to use getter and setters to avoid directly accessing the variable.

In the setter, we can do a check to make sure it was not set.
Similarly in the getter, we can do a check to make sure it was set.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@zhztheplayer Added the get and set method.

Copy link

Run Gluten Clickhouse CI

Copy link

Run Gluten Clickhouse CI

private var expressionExtensionTransformer: Option[ExpressionExtensionTrait] = None

def getExpressionExtensionTransformer: ExpressionExtensionTrait = {
expressionExtensionTransformer.getOrElse(new DefaultExpressionExtensionTransformer)
Copy link
Member

Choose a reason for hiding this comment

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

Can we throw when it's none? Otherwise we don't make it sure whether the change (setting it in executor side) takes effect. Say if we throw when none, then we must set it in both driver and executor sides otherwise the application will fail by error.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@zhztheplayer Yes. Updated.

Copy link

Run Gluten Clickhouse CI

Copy link
Member

@zhztheplayer zhztheplayer left a comment

Choose a reason for hiding this comment

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

Thanks!

@zhouyuan zhouyuan changed the title Init ExpressionUtil.extendedExpressionTransformer in executor side [GLUTEN-6803]Init ExpressionUtil.extendedExpressionTransformer in executor side Aug 16, 2024
Copy link

#6803

Copy link

github-actions bot commented Oct 1, 2024

This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@github-actions github-actions bot added the stale stale label Oct 1, 2024
Copy link

This PR was auto-closed because it has been stalled for 10 days with no activity. Please feel free to reopen if it is still valid. Thanks.

@github-actions github-actions bot closed this Oct 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLICKHOUSE CORE works for Gluten Core stale stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants