Skip to content

NO-SNOW: Fix flaky DatabaseMetaData tests#2546

Merged
sfc-gh-dheyman merged 1 commit into
masterfrom
03-10-no-snow_fix_flaky_testgetstreams_test
Mar 11, 2026
Merged

NO-SNOW: Fix flaky DatabaseMetaData tests#2546
sfc-gh-dheyman merged 1 commit into
masterfrom
03-10-no-snow_fix_flaky_testgetstreams_test

Conversation

@sfc-gh-dheyman

@sfc-gh-dheyman sfc-gh-dheyman commented Mar 10, 2026

Copy link
Copy Markdown
Collaborator

Overview

This change fixes stream metadata retrieval by replacing column index access with column name access in the SnowflakeDatabaseMetaDataImpl class. The fix addresses three key issues:

  • Replaces hardcoded column indices (2-12) with descriptive column names ("name", "database_name", "schema_name", etc.) for better maintainability
  • Corrects the stream name pattern matching to use the actual name variable instead of the undefined streamName variable
  • Removes duplicate stream name pattern validation and fixes the debug log message to properly reference streams instead of columns

Additionally, the change removes the conditional logic that only added schema filtering when stream name was null or contained wildcards, ensuring schema filtering is always applied. Test cases have been updated to disable wildcard support in show metadata commands to ensure consistent behavior.

sfc-gh-dheyman commented Mar 10, 2026

Copy link
Copy Markdown
Collaborator Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@sfc-gh-dheyman sfc-gh-dheyman marked this pull request as ready for review March 10, 2026 10:30
@sfc-gh-dheyman sfc-gh-dheyman requested a review from a team as a code owner March 10, 2026 10:30
@sfc-gh-dheyman sfc-gh-dheyman force-pushed the 03-10-no-snow_fix_flaky_testgetstreams_test branch 2 times, most recently from f95acd1 to e15e0d4 Compare March 10, 2026 13:08
@sfc-gh-dheyman sfc-gh-dheyman changed the title NO-SNOW: Fix flaky testGetStreams test NO-SNOW: Fix flaky DatabaseMetaData tests Mar 10, 2026
@sfc-gh-dheyman sfc-gh-dheyman force-pushed the 03-10-no-snow_fix_flaky_testgetstreams_test branch 5 times, most recently from afecd53 to 96c898a Compare March 10, 2026 20:20
@sfc-gh-dheyman sfc-gh-dheyman force-pushed the 03-10-no-snow_fix_flaky_testgetstreams_test branch 3 times, most recently from ddde298 to 89963bc Compare March 11, 2026 10:35
Comment thread pom.xml Outdated
@sfc-gh-dheyman sfc-gh-dheyman force-pushed the 03-10-no-snow_fix_flaky_testgetstreams_test branch 2 times, most recently from d4cd8f2 to 6606c2a Compare March 11, 2026 10:52
Comment thread src/test/java/net/snowflake/client/internal/jdbc/DatabaseMetaDataIT.java Outdated
Comment thread src/test/java/net/snowflake/client/internal/jdbc/DatabaseMetaDataIT.java Outdated
@sfc-gh-dheyman sfc-gh-dheyman force-pushed the 03-10-no-snow_fix_flaky_testgetstreams_test branch from 6606c2a to dcb6ac1 Compare March 11, 2026 11:04
@sfc-gh-dheyman sfc-gh-dheyman force-pushed the 03-10-no-snow_fix_flaky_testgetstreams_test branch from dcb6ac1 to 8ba2f4c Compare March 11, 2026 11:50
@sfc-gh-dheyman sfc-gh-dheyman merged commit b3f35ea into master Mar 11, 2026
209 of 224 checks passed

Copy link
Copy Markdown
Collaborator Author

Merge activity

@sfc-gh-dheyman sfc-gh-dheyman deleted the 03-10-no-snow_fix_flaky_testgetstreams_test branch March 11, 2026 14:17
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 11, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants