-
Notifications
You must be signed in to change notification settings - Fork 442
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-1201][CORE] Skip scalar subquery execution during validation #1202
[GLUTEN-1201][CORE] Skip scalar subquery execution during validation #1202
Conversation
So this is an optimization to avoid the unnecessary execution of scalar subquery in validation phase. Currently, it does in validation phase, but there is no functionality issue. Right? |
Yes, only performance issue. |
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.
Looks the purpose of this PR is partially the same as #1097.
gluten-core/src/main/scala/io/glutenproject/execution/BasicPhysicalOperatorTransformer.scala
Outdated
Show resolved
Hide resolved
gluten-core/src/main/scala/io/glutenproject/expression/ScalarSubqueryTransformer.scala
Show resolved
Hide resolved
All checks have passed.Will address review comment soon. |
da365a5
to
fb6455a
Compare
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
gluten-core/src/main/scala/io/glutenproject/expression/TransformerState.scala
Outdated
Show resolved
Hide resolved
@PHILO-HE The change LGTM to avoid execute subquery when do validation. But I think there is another improvement that's submit subquery concurrently before What do you think? |
I agree. Please keep that part of fix in your PR and rebase your code after this patch is merged. |
Will merge the patch soon. Thanks for the contribution! |
Many thanks for your review. @rui-mo @PHILO-HE @zzcclp @WangGuangxin |
def valueSensitiveDataType(dataType: DataType): Boolean = { | ||
dataType.isInstanceOf[MapType] || | ||
dataType.isInstanceOf[ArrayType] || | ||
dataType.isInstanceOf[StructType] | ||
} |
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.
Hi @loudongfeng , I just bumped into this code. Do you still remember the reason of using this condition?
What changes were proposed in this pull request?
Please check #1201
How was this patch tested?
Test manually by explain tcpds q14-1, scale factor 0.1