[spark] Allow specific plugin impl can use catalog config to overwrite default table prop#3364
Merged
Merged
Conversation
…t table properties
Contributor
Author
|
@YannByron @luoyuxia PTAL! |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the Spark lake read path so that lake storage plugins can receive (and potentially use) Spark catalog configuration in addition to the per-table datalake properties when constructing a LakeSource.
Changes:
- Extend
FlussLakeUtils.createLakeSourceto accept catalog-level properties and merge them into the lake pluginConfiguration. - Thread
flussConfigthrough Spark scan builders / batches / reader factory so catalog properties can be provided at lake source creation time. - Update lake filter pushdown path to create lake sources using both catalog and table properties.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| fluss-spark/fluss-spark-common/src/main/scala/org/apache/fluss/spark/read/lake/FlussLakeUtils.scala | Changes lake source construction to merge catalog properties into lake plugin config. |
| fluss-spark/fluss-spark-common/src/main/scala/org/apache/fluss/spark/read/lake/FlussLakeUpsertBatch.scala | Passes flussConfig.toMap into lake source creation for upsert lake reads. |
| fluss-spark/fluss-spark-common/src/main/scala/org/apache/fluss/spark/read/lake/FlussLakeAppendBatch.scala | Passes flussConfig.toMap into lake source creation for append lake reads. |
| fluss-spark/fluss-spark-common/src/main/scala/org/apache/fluss/spark/read/lake/FlussLakePartitionReaderFactory.scala | Creates lake source using both catalog and table properties. |
| fluss-spark/fluss-spark-common/src/main/scala/org/apache/fluss/spark/read/FlussScanBuilder.scala | Makes flussConfig available for lake filter pushdown source creation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+44
to
+46
| catalogProperties.asScala.foreach { | ||
| case (k, v) => lakeConfig.setString(s"$SPARK_CATALOG_PREFIX$k", v) | ||
| } |
Contributor
|
@Yohahaha lgtm overall. Please take care of the comments of copilot |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Purpose
Linked issue: close #xxx
Brief change log
as title.
Tests
API and Format
Documentation