Skip to content

Flink: Filter CatalogTable properties#16313

Open
pvary wants to merge 2 commits into
apache:mainfrom
pvary:catalog_table
Open

Flink: Filter CatalogTable properties#16313
pvary wants to merge 2 commits into
apache:mainfrom
pvary:catalog_table

Conversation

@pvary
Copy link
Copy Markdown
Contributor

@pvary pvary commented May 13, 2026

Filter out CatalogTable properties to contain only relevant info

Claude 4.7 generated the first version of the tests. Reviewed and simplified a bit.

@github-actions github-actions Bot added the flink label May 13, 2026
this.catalogProps =
catalogProps.entrySet().stream()
.filter(e -> !GlobalConfiguration.isSensitive(e.getKey()))
.collect(ImmutableMap.toImmutableMap(Map.Entry::getKey, Map.Entry::getValue));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like a reasonable short-term fix to me.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ConfigurationUtils.hideSensitiveValues is even more simple.

Copy link
Copy Markdown
Contributor

@talatuyarer talatuyarer May 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pvary The isSensitive list doesn't cover all Iceberg configurations. For example, the credential keyword used for REST catalog OAuth2 client credentials or S3 access key was only added to Flink's list in a later release than the one we're using. See https://github.com/apache/flink/blob/release-2.1.1/flink-core/src/main/java/org/apache/flink/configuration/GlobalConfiguration.java#L49

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is true for ConfigurationUtils.hideSensitiveValues also...

Copy link
Copy Markdown

@gaborgsomogyi gaborgsomogyi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 from Flink side. We should add this redaction to all our SQL param outputs

@stevenzwu stevenzwu self-requested a review May 13, 2026 17:26
super(catalogName, defaultDatabase);
this.catalogLoader = catalogLoader;
this.catalogProps = catalogProps;
this.catalogProps =
Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
Contributor

@kevinjqliu kevinjqliu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think @stevenzwu had some concerns with this approach offline, blocking this for now so it doesnt get accidentally merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants