Skip to content
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

[DAT-10093] added schema escaping to getColumns call to jdbc metadata classes #2895

Merged
merged 2 commits into from Jun 29, 2022

Conversation

KushnirykOleh
Copy link
Contributor

Environment

Liquibase Version: 4.11

Database Vendor & Version: all, fix needed for Snowflake

Operating System Type & Version: windows 10

Pull Request Type

https://datical.atlassian.net/browse/DAT-10093

  • Bug fix (non-breaking change which fixes an issue.)
  • Enhancement/New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Description

JdbcDatabaseSnapshot doesn't escape percent and underscore characters in schema names for getColumns() calls like it does for getTables (and actually getViews). For Snowflake jdbc classes this cause to dropping schema name from requests completely what causes slow performance.

Steps To Reproduce

According to ticket description need to have Snowflake account with a number of schemas with number of tables and number of columns to clearly see Liquibase hangs for long time performing operations.

Actual Behavior

liquibase slow performance on Snowflake DB.

Expected/Desired Behavior

Performance increase.

Fast Track PR Acceptance Checklist:

Need Help?

Come chat with us in the Liquibase Forum.

@github-actions
Copy link

github-actions bot commented May 31, 2022

Unit Test Results

  4 548 files  ±0    4 548 suites  ±0   33m 4s ⏱️ + 3m 16s
  4 522 tests ±0    4 308 ✔️ ±0     214 💤 ±0  0 ±0 
53 544 runs  ±0  48 536 ✔️ ±0  5 008 💤 ±0  0 ±0 

Results for commit bc38268. ± Comparison against base commit bae65a4.

♻️ This comment has been updated with latest results.

@kataggart kataggart added this to To Do in Conditioning++ via automation May 31, 2022
@nvoxland nvoxland requested a review from suryaaki2 June 13, 2022 22:37
@FBurguer FBurguer assigned FBurguer and unassigned FBurguer Jun 20, 2022
@kristyldatical kristyldatical changed the title [DAT-10093] added shema escaping to getColumns call to jdbc metadata classes [DAT-10093] added schema escaping to getColumns call to jdbc metadata classes Jun 22, 2022
@nvoxland nvoxland requested a review from XDelphiGrl June 27, 2022 20:57
Copy link
Contributor

@XDelphiGrl XDelphiGrl left a comment

Choose a reason for hiding this comment

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

  • Fix addresses a specific issue handling _ in Snowflake schema names.
  • New unit tests added.
  • No additional testing required.

APPROVED

Passing Functional Tests
Passing Functional Test Execution

@kataggart kataggart added this to the NEXT milestone Jun 29, 2022
@nvoxland nvoxland merged commit 5273e47 into master Jun 29, 2022
Conditioning++ automation moved this from To Do to Done Jun 29, 2022
@nvoxland nvoxland deleted the DAT-10093 branch June 29, 2022 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

6 participants