-
Notifications
You must be signed in to change notification settings - Fork 443
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
[CORE][VL][CH] Make Iceberg code implement component API #8192
Conversation
Thanks for opening a pull request! Could you open an issue for this pull request on Github Issues? https://github.com/apache/incubator-gluten/issues Then could you also rename commit message and pull request title in the following format?
See also: |
Run Gluten Clickhouse CI on x86 |
Run Gluten Clickhouse CI on x86 |
Run Gluten Clickhouse CI on x86 |
Run Gluten Clickhouse CI on x86 |
injector.gluten.legacy.injectTransform { | ||
c => | ||
val offload = Seq(OffloadIcebergScan()) | ||
HeuristicTransform.Simple( | ||
Validators.newValidator(c.glutenConf, offload), | ||
offload | ||
) | ||
} | ||
|
||
// Inject RAS rule. | ||
injector.gluten.ras.injectRasRule { | ||
c => | ||
RasOffload.Rule( | ||
RasOffload.from[BatchScanExec](OffloadIcebergScan()), | ||
Validators.newValidator(c.glutenConf), | ||
Nil) | ||
} |
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.
The code can be simplified in future PRs.
Run Gluten Clickhouse CI on x86 |
Run Gluten Clickhouse CI on x86 |
Run Gluten Clickhouse CI on x86 |
@@ -94,4 +98,8 @@ object IcebergScanTransformer { | |||
commonPartitionValues = SparkShimLoader.getSparkShims.getCommonPartitionValues(batchScan) | |||
) | |||
} | |||
|
|||
def supportsBatchScan(scan: Scan): Boolean = { | |||
scan.getClass.getName == "org.apache.iceberg.spark.source.SparkBatchQueryScan" |
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.
Can we just reference this class to get its name for comparison?
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.
SparkBatchQueryScan
is package private.
cc @liujiayi771 if there are some better practices for this.
class CHIcebergComponent extends Component { | ||
override def name(): String = "clickhouse-iceberg" | ||
override def buildInfo(): Component.BuildInfo = | ||
Component.BuildInfo("ClickHouseIceberg", "N/A", "N/A", "N/A") |
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.
Seems buildInfo is not necessary for component except Backend
. Maybe, just use it for Backend
in future refactor.
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.
Right, this part needs some cleanup. BuildInfo
is not that general indeed. I'd like to see it totally decoupled with Component API somehow.
Add
CHIcebergComponent
/VeloxIcebergCompoent
to replace the previous injections throughScanTransformerFactory
.Component API was added in this PR: #8143.
With other minor refactors.