-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Flink: Filter CatalogTable properties #16313
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -28,6 +28,7 @@ | |
| import java.util.Set; | ||
| import java.util.stream.Collectors; | ||
| import org.apache.flink.annotation.Internal; | ||
| import org.apache.flink.configuration.GlobalConfiguration; | ||
| import org.apache.flink.table.catalog.AbstractCatalog; | ||
| import org.apache.flink.table.catalog.CatalogBaseTable; | ||
| import org.apache.flink.table.catalog.CatalogDatabase; | ||
|
|
@@ -111,7 +112,10 @@ public FlinkCatalog( | |
| long cacheExpirationIntervalMs) { | ||
| super(catalogName, defaultDatabase); | ||
| this.catalogLoader = catalogLoader; | ||
| this.catalogProps = catalogProps; | ||
| this.catalogProps = | ||
| catalogProps.entrySet().stream() | ||
| .filter(e -> !GlobalConfiguration.isSensitive(e.getKey())) | ||
| .collect(ImmutableMap.toImmutableMap(Map.Entry::getKey, Map.Entry::getValue)); | ||
|
Contributor
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. This seems like a reasonable short-term fix to me. 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.
Contributor
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. @pvary The 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. On master which will be 2.4 later I've added. https://github.com/apache/flink/blob/6c60f4fee2a8da6990738dc0c5b479f7f2accba8/flink-core/src/main/java/org/apache/flink/configuration/GlobalConfiguration.java#L276 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. This is true for |
||
| this.baseNamespace = baseNamespace; | ||
| this.cacheEnabled = cacheEnabled; | ||
|
|
||
|
|
||
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.
If this property is needed in order to create Iceberg catalog, then filtering it here breaks CREATE TABLE LIKE functionality.
https://github.com/apache/iceberg/blob/main/flink/v2.1/flink/src/main/java/org/apache/iceberg/flink/FlinkDynamicTableFactory.java#L190-L204