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

feat(warehouse): batching of alter add statements #2484

Merged
merged 42 commits into from
Oct 31, 2022

Conversation

achettyiitr
Copy link
Member

@achettyiitr achettyiitr commented Sep 27, 2022

Description

Batching of ALTER ADD statements in order to optimize the Queries that run on the warehouse.

Currently, we are following running single ALTER ADD statement changes for new properties of the Schema. If we batch these, we don't need to run many Queries for these.

Notion Ticket

https://www.notion.so/rudderstacks/Use-batching-to-run-several-of-alter-statements-81ae26d5db6f4b2ca8e0258e3ce0cba6

Security

  • The code changed/added as part of this pull request won't create any security issues with how the software is being used.

@achettyiitr achettyiitr changed the title Feat(warehouse): Batching of alter add statements Feat(warehouse): batching of alter add statements Sep 27, 2022
@achettyiitr achettyiitr changed the title Feat(warehouse): batching of alter add statements feat(warehouse): batching of alter add statements Sep 27, 2022
@codecov
Copy link

codecov bot commented Sep 27, 2022

Codecov Report

Base: 44.09% // Head: 43.20% // Decreases project coverage by -0.88% ⚠️

Coverage data is based on head (916f845) compared to base (b6ce9b9).
Patch coverage: 1.04% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2484      +/-   ##
==========================================
- Coverage   44.09%   43.20%   -0.89%     
==========================================
  Files         187      186       -1     
  Lines       39255    40041     +786     
==========================================
- Hits        17308    17300       -8     
- Misses      20843    21637     +794     
  Partials     1104     1104              
Impacted Files Coverage Δ
warehouse/azure-synapse/azure-synapse.go 0.00% <0.00%> (ø)
warehouse/bigquery/bigquery.go 0.00% <0.00%> (ø)
warehouse/clickhouse/clickhouse.go 0.00% <0.00%> (ø)
warehouse/deltalake/deltalake.go 0.00% <0.00%> (ø)
warehouse/mssql/mssql.go 0.00% <0.00%> (ø)
warehouse/postgres/postgres.go 0.00% <0.00%> (ø)
warehouse/redshift/redshift.go 0.00% <0.00%> (ø)
warehouse/snowflake/snowflake.go 0.00% <0.00%> (ø)
warehouse/upload.go 18.39% <0.00%> (-0.16%) ⬇️
warehouse/utils/utils.go 70.18% <ø> (ø)
... and 8 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@achettyiitr achettyiitr requested a review from a team September 27, 2022 09:58
@achettyiitr achettyiitr requested a review from lvrach October 3, 2022 06:19
warehouse/utils/utils.go Outdated Show resolved Hide resolved
Copy link
Member

@lvrach lvrach left a comment

Choose a reason for hiding this comment

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

The changes look good to me. Note: I don't have a lot of context on how those different warehouse work. I rely on automation tests to verify those changes.

I made a few non-blocking comments/suggestions

@achettyiitr
Copy link
Member Author

achettyiitr commented Oct 19, 2022

The changes look good to me. Note: I don't have a lot of context on how those different warehouse work. I rely on automation tests to verify those changes.

Except for the Azure synapse and S3 Datalake (Glue), all destinations are covered with multiple columns for alter around Integration tests. So we are good here.

@achettyiitr
Copy link
Member Author

The changes look good to me. Note: I don't have a lot of context on how those different warehouse work. I rely on automation tests to verify those changes.

Except for the Azure synapse and S3 Datalake (Glue), all destinations are covered with multiple columns for alter around Integration tests. So we are good here.

For Azure synapse, tested the changes locally.

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

Successfully merging this pull request may close these issues.

3 participants