-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Use builder pattern for IcebergQueryRunner #24515
Use builder pattern for IcebergQueryRunner #24515
Conversation
fa98c76
to
427a2f4
Compare
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.
Thanks for this refactor. Overall lgtm, the builder pattern is wonderful. One thing I can think of is that multiple catalogs with the same connector type may affect each other in JMX statistics. But we can add comments on IcebergQueryRunner.addCatalog(...)
to clarify this.
presto-iceberg/src/test/java/com/facebook/presto/iceberg/IcebergQueryRunner.java
Outdated
Show resolved
Hide resolved
presto-iceberg/src/test/java/com/facebook/presto/iceberg/hive/TestIcebergDistributedHive.java
Outdated
Show resolved
Hide resolved
presto-iceberg/src/test/java/com/facebook/presto/iceberg/hive/TestIcebergHiveStatistics.java
Outdated
Show resolved
Hide resolved
lgtm, some properties are removed as @hantangwangd pointed out |
427a2f4
to
2bcf851
Compare
2bcf851
to
625fce6
Compare
Additionally, add support for tracking catalog properties added to iceberg. This can be useful for tests that may require their own catalogs
625fce6
to
2c11825
Compare
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.
Thanks @ZacBlanco LGTM for Native engine changes.
Description
Currently we create IcebergQueryRunner through a complicated set of method with various overloads. We tend to just create a new constructor/method for every time we need to set a separate property which can make figuring out
the arguments you're trying to explicitly change for a query runner more difficult to determine.
This change instead introduces a class which uses builder pattern to make it easier to add new features and use.
Motivation and Context
Simpler and easier to understand query runner.
Impact
N/A. Testing only
Test Plan
Existing tests
Contributor checklist
Release Notes