You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "ulysses-you (via GitHub)" <gi...@apache.org> on 2024/08/09 08:18:26 UTC
[PR] [spark] Support auto disable bucketed scan [paimon]
ulysses-you opened a new pull request, #3928:
URL: https://github.com/apache/paimon/pull/3928
<!-- Please specify the module before the PR name: [core] ... or [flink] ... -->
### Purpose
<!-- Linking this pull request to the issue -->
This pr adds a new rule `DisableUnnecessaryPaimonBucketedScan` to support auto disable bucketed scan if the bucket scan is not actually effective i.e., there is no shuffle exchange been removed. This change is to avoid performance regression since the bucketed scan may have smaller parallelism than normal scan.
For example: a table with bucket key x but user join/group-by/partition-by on column y.
Note, this rule is inspired from Spark `DisableUnnecessaryBucketedScan` but work for v2 scan.
<!-- What is the purpose of the change -->
### Tests
<!-- List UT and IT cases to verify this change -->
Add test.
### API and Format
<!-- Does this change affect API or storage format -->
no
### Documentation
<!-- Does this change introduce a new feature -->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [spark] Support auto disable bucketed scan [paimon]
Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi commented on PR #3928:
URL: https://github.com/apache/paimon/pull/3928#issuecomment-2282730129
It seems spark test failed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [spark] Support auto disable bucketed scan [paimon]
Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi commented on code in PR #3928:
URL: https://github.com/apache/paimon/pull/3928#discussion_r1719312563
##########
paimon-spark/paimon-spark-common/src/main/scala/org/apache/paimon/spark/PaimonScan.scala:
##########
@@ -36,35 +36,53 @@ case class PaimonScan(
requiredSchema: StructType,
filters: Seq[Predicate],
reservedFilters: Seq[Filter],
- pushDownLimit: Option[Int])
+ pushDownLimit: Option[Int],
+ disableBucketedScan: Boolean = false)
extends PaimonBaseScan(table, requiredSchema, filters, reservedFilters, pushDownLimit)
with SupportsRuntimeFiltering
with SupportsReportPartitioning {
- override def outputPartitioning(): Partitioning = {
+ def withDisabledBucketedScan(): PaimonScan = {
Review Comment:
bucketedScanDisabled and disableBucketedScan?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [spark] Support auto disable bucketed scan [paimon]
Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi commented on code in PR #3928:
URL: https://github.com/apache/paimon/pull/3928#discussion_r1719273128
##########
paimon-spark/paimon-spark-common/src/main/scala/org/apache/paimon/spark/PaimonScan.scala:
##########
@@ -36,35 +36,53 @@ case class PaimonScan(
requiredSchema: StructType,
filters: Seq[Predicate],
reservedFilters: Seq[Filter],
- pushDownLimit: Option[Int])
+ pushDownLimit: Option[Int],
+ disableBucketedScan: Boolean = false)
extends PaimonBaseScan(table, requiredSchema, filters, reservedFilters, pushDownLimit)
with SupportsRuntimeFiltering
with SupportsReportPartitioning {
- override def outputPartitioning(): Partitioning = {
+ def withDisabledBucketedScan(): PaimonScan = {
Review Comment:
disableBucketedScan
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [spark] Support auto disable bucketed scan [paimon]
Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi merged PR #3928:
URL: https://github.com/apache/paimon/pull/3928
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [spark] Support auto disable bucketed scan [paimon]
Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi commented on PR #3928:
URL: https://github.com/apache/paimon/pull/3928#issuecomment-2292897521
+1 Thanks @ulysses-you for the contribution. Merging...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [spark] Support auto disable bucketed scan [paimon]
Posted by "ulysses-you (via GitHub)" <gi...@apache.org>.
ulysses-you commented on PR #3928:
URL: https://github.com/apache/paimon/pull/3928#issuecomment-2282984834
@JingsongLi thank you for the reminder, it took me a while to find the root cause...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [spark] Support auto disable bucketed scan [paimon]
Posted by "ulysses-you (via GitHub)" <gi...@apache.org>.
ulysses-you commented on code in PR #3928:
URL: https://github.com/apache/paimon/pull/3928#discussion_r1719319238
##########
paimon-spark/paimon-spark-common/src/main/scala/org/apache/paimon/spark/PaimonScan.scala:
##########
@@ -36,35 +36,53 @@ case class PaimonScan(
requiredSchema: StructType,
filters: Seq[Predicate],
reservedFilters: Seq[Filter],
- pushDownLimit: Option[Int])
+ pushDownLimit: Option[Int],
+ disableBucketedScan: Boolean = false)
extends PaimonBaseScan(table, requiredSchema, filters, reservedFilters, pushDownLimit)
with SupportsRuntimeFiltering
with SupportsReportPartitioning {
- override def outputPartitioning(): Partitioning = {
+ def withDisabledBucketedScan(): PaimonScan = {
Review Comment:
+1, addressed
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [spark] Support auto disable bucketed scan [paimon]
Posted by "ulysses-you (via GitHub)" <gi...@apache.org>.
ulysses-you commented on code in PR #3928:
URL: https://github.com/apache/paimon/pull/3928#discussion_r1719284640
##########
paimon-spark/paimon-spark-common/src/main/scala/org/apache/paimon/spark/PaimonScan.scala:
##########
@@ -36,35 +36,53 @@ case class PaimonScan(
requiredSchema: StructType,
filters: Seq[Predicate],
reservedFilters: Seq[Filter],
- pushDownLimit: Option[Int])
+ pushDownLimit: Option[Int],
+ disableBucketedScan: Boolean = false)
extends PaimonBaseScan(table, requiredSchema, filters, reservedFilters, pushDownLimit)
with SupportsRuntimeFiltering
with SupportsReportPartitioning {
- override def outputPartitioning(): Partitioning = {
+ def withDisabledBucketedScan(): PaimonScan = {
Review Comment:
good naming! but it seems conflict with line40..
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [spark] Support auto disable bucketed scan [paimon]
Posted by "ulysses-you (via GitHub)" <gi...@apache.org>.
ulysses-you commented on PR #3928:
URL: https://github.com/apache/paimon/pull/3928#issuecomment-2283581053
@JingsongLi @YannByron do you have to take a look ? thank you
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org