-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Populate TestTable with multi-row INSERT #18693
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
findepi
force-pushed
the
findepi/multi-insert
branch
from
August 16, 2023 08:32
df9472c
to
2430d92
Compare
findepi
force-pushed
the
findepi/multi-insert
branch
from
August 18, 2023 10:39
2430d92
to
b6ab7ea
Compare
findepi
changed the title
Create TestTable with data faster
Populate TestTable with multi-row INSERT
Aug 18, 2023
The interface expects the method to return `TemporaryRelation` so let's mark implementation as returning this, no the concrete `TestTable`.
MongoTestTable was extending TestTable and then disabling most of the functionality (namely the table creation). The only remaining thing was name and close, which corresponds to `TemporaryRelation` interface.
BigQueryTestView was extending TestTable and then disabling/overwriting all of the inherited functionality.
findepi
force-pushed
the
findepi/multi-insert
branch
2 times, most recently
from
August 29, 2023 13:09
9280095
to
8df7ce6
Compare
github-actions
bot
added
iceberg
Iceberg connector
delta-lake
Delta Lake connector
labels
Aug 29, 2023
findepi
added
test
no-release-notes
This pull request does not require release notes entry
labels
Aug 29, 2023
findepi
requested review from
wendigo,
ebyhr,
kokosing,
Praveen2112 and
findinpath
August 29, 2023 13:11
findepi
force-pushed
the
findepi/multi-insert
branch
from
August 29, 2023 14:33
8df7ce6
to
679c93e
Compare
findinpath
approved these changes
Aug 29, 2023
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.
Please add in the description of the PR, for posterity, if you spot more dramatic test runtime improvements.
findinpath
reviewed
Aug 29, 2023
plugin/trino-bigquery/src/test/java/io/trino/plugin/bigquery/BigQueryTestView.java
Outdated
Show resolved
Hide resolved
findinpath
reviewed
Aug 29, 2023
plugin/trino-bigquery/src/test/java/io/trino/plugin/bigquery/BigQueryTestView.java
Outdated
Show resolved
Hide resolved
ebyhr
approved these changes
Aug 30, 2023
hashhar
approved these changes
Aug 30, 2023
This follows `TestTable` pattern (and many other classes). This also makes `BigQueryViewCreateAndInsertDataSetup` more robust in case VIEW creation fails.
The test expects the three rows are inserted as individual operations, so let's do this explicitly.
Use single INSERT instead of multiple single-row inserts. Should be faster, especially e.g. for Trino.
findepi
force-pushed
the
findepi/multi-insert
branch
from
August 30, 2023 06:06
679c93e
to
f12bf10
Compare
thanks a lot Piotr. I already see minimum of 3m savings per JDBC connector test. It'll be more for slow connectors like Redshift (but we don't run those on CI today). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bigquery
BigQuery connector
cla-signed
delta-lake
Delta Lake connector
iceberg
Iceberg connector
mongodb
MongoDB connector
no-release-notes
This pull request does not require release notes entry
test
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Use single INSERT instead of multiple single-row inserts. Should be
faster, especially e.g. for Trino.