-
Notifications
You must be signed in to change notification settings - Fork 582
[GLUTEN-10648][VL] Support Iceberg overwrite partitions dynamic #10823
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
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,5 +35,4 @@ object VeloxIcebergAppendDataExec { | |
| original.write | ||
| ) | ||
| } | ||
|
|
||
| } | ||
41 changes: 41 additions & 0 deletions
41
...g/main/scala/org/apache/gluten/execution/VeloxIcebergOverwritePartitionsDynamicExec.scala
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| /* | ||
| * Licensed to the Apache Software Foundation (ASF) under one or more | ||
| * contributor license agreements. See the NOTICE file distributed with | ||
| * this work for additional information regarding copyright ownership. | ||
| * The ASF licenses this file to You under the Apache License, Version 2.0 | ||
| * (the "License"); you may not use this file except in compliance with | ||
| * the License. You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
| package org.apache.gluten.execution | ||
|
|
||
| import org.apache.spark.sql.connector.write.Write | ||
| import org.apache.spark.sql.execution.SparkPlan | ||
| import org.apache.spark.sql.execution.datasources.v2.OverwritePartitionsDynamicExec | ||
|
|
||
| case class VeloxIcebergOverwritePartitionsDynamicExec( | ||
| query: SparkPlan, | ||
| refreshCache: () => Unit, | ||
| write: Write) | ||
| extends AbstractIcebergWriteExec { | ||
|
|
||
| override protected def withNewChildInternal(newChild: SparkPlan): IcebergWriteExec = | ||
| copy(query = newChild) | ||
| } | ||
|
|
||
| object VeloxIcebergOverwritePartitionsDynamicExec { | ||
| def apply(original: OverwritePartitionsDynamicExec): IcebergWriteExec = { | ||
| VeloxIcebergOverwritePartitionsDynamicExec( | ||
| original.query, | ||
| original.refreshCache, | ||
| original.write | ||
| ) | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -90,6 +90,9 @@ class GlutenConfig(conf: SQLConf) extends GlutenCoreConfig(conf) { | |
|
|
||
| def enableOverwriteByExpression: Boolean = getConf(COLUMNAR_OVERWRIET_BY_EXPRESSION_ENABLED) | ||
|
|
||
| def enableOverwritePartitionsDynamic: Boolean = | ||
| getConf(COLUMNAR_OVERWRIET_PARTITIONS_DYNAMIC_ENABLED) | ||
|
|
||
| def enableColumnarShuffledHashJoin: Boolean = getConf(COLUMNAR_SHUFFLED_HASH_JOIN_ENABLED) | ||
|
|
||
| def shuffledHashJoinOptimizeBuildSide: Boolean = | ||
|
|
@@ -864,6 +867,12 @@ object GlutenConfig { | |
| .booleanConf | ||
| .createWithDefault(true) | ||
|
|
||
| val COLUMNAR_OVERWRIET_PARTITIONS_DYNAMIC_ENABLED = | ||
| buildConf("spark.gluten.sql.columnar.overwriteOverwritePartitionsDynamic") | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hi @Zouxxyy, Should this be
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry, my mistake, I might have copied the wrong content. |
||
| .doc("Enable or disable columnar v2 command overwrite partitions dynamic.") | ||
| .booleanConf | ||
| .createWithDefault(true) | ||
|
|
||
| val COLUMNAR_PREFER_STREAMING_AGGREGATE = | ||
| buildConf("spark.gluten.sql.columnar.preferStreamingAggregate") | ||
| .doc( | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Unnecessarily related to this PR, but we do need to have the new V2 columnar write operators covered in tests individually without having to enable the Iceberg writer, as they were design to be general. Vanilla Spark uses an in-memory catalog for testing the row-based V2 write operators. We may want to introduce something similar just for testing. #9896
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.
Sounds good, v2 write is a general capability that can be used in all other lake formats. I know a bit about DSv2, and happy to help if needed.
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.
Thanks! Feel free to open issues and PRs.
Uh oh!
There was an error while loading. Please reload this page.
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.
@Zouxxyy Just recalled that other contributors might already work on something similar, let me confirm first to avoid duplicated work. :) I don't have their GitHub ID or Email at this moment but I will try to get them into the public discussion.
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.
I've confirmed, they are not working on the test topic. So feel free to take if wanted. We may have public discussions about the further matters later on.
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.
Thanks, I'd like to, testing is the foundation, which will make the integration more directional and reliable.