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

Simplify TestingConnectorBehavior declarations #16825

Merged

Conversation

findepi
Copy link
Member

@findepi findepi commented Mar 31, 2023

Use true or a related behavior as the default rather than false. Few cases being off by default remain, but generally true as the default is much easier to reason about. False defaults were usually a result of incremental additions, where it's easier to add a behavior that is not widely adopted, but are harder to think about in a long run.

cc @hashhar @ebyhr

@cla-bot cla-bot bot added the cla-signed label Mar 31, 2023
Copy link
Member

@hashhar hashhar left a comment

Choose a reason for hiding this comment

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

I agree. Makes sense. Will revisit once CI results are available.

@findepi findepi force-pushed the findepi/simplify-testingconnectorbehavior-declarations-279279 branch from d27c8d9 to 1898934 Compare April 5, 2023 08:54
@github-actions github-actions bot added delta-lake Delta Lake connector hive Hive connector hudi Hudi connector iceberg Iceberg connector mongodb MongoDB connector tests:hive bigquery BigQuery connector labels Apr 5, 2023
@findepi findepi force-pushed the findepi/simplify-testingconnectorbehavior-declarations-279279 branch 3 times, most recently from 5a6f2ca to 8569550 Compare April 14, 2023 12:31
@@ -15,8 +15,8 @@

import static io.trino.plugin.pinot.TestingPinotCluster.PINOT_LATEST_IMAGE_NAME;

public class TestPinotWithoutAuthenticationIntegrationLatestVersionNoGrpcConnectorSmokeTest
Copy link
Member Author

Choose a reason for hiding this comment

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

After i made this class names a little shorter i realized we don't have non-Smoke BCT coverage for Pinot yet.
@elonazoulay is there an issue for this already?

Copy link
Member

Choose a reason for hiding this comment

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

There is no issue but I can create a BCT for pinot.

@findepi
Copy link
Member Author

findepi commented Apr 17, 2023

CI #12818 , #17058 (new) + some related

@findepi findepi force-pushed the findepi/simplify-testingconnectorbehavior-declarations-279279 branch from 8569550 to 36cc6d0 Compare April 17, 2023 09:21
@findepi findepi marked this pull request as ready for review April 17, 2023 09:21
@findepi
Copy link
Member Author

findepi commented Apr 17, 2023

CI #17033

Copy link
Member

@ebyhr ebyhr left a comment

Choose a reason for hiding this comment

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

Left minor comments. Please ignore if those codes are intentional.

@@ -64,11 +64,6 @@ protected boolean hasBehavior(TestingConnectorBehavior connectorBehavior)
case SUPPORTS_CREATE_MATERIALIZED_VIEW:
return true;
Copy link
Member

Choose a reason for hiding this comment

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

Can we remove SUPPORTS_CREATE_VIEW & SUPPORTS_CREATE_MATERIALIZED_VIEW?

Comment on lines 27 to 28
case SUPPORTS_DELETE:
return true;
Copy link
Member

Choose a reason for hiding this comment

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

Can we remove SUPPORTS_DELETE?

@findepi findepi force-pushed the findepi/simplify-testingconnectorbehavior-declarations-279279 branch from c32e02f to 8ff3371 Compare April 19, 2023 06:28
@findepi findepi force-pushed the findepi/simplify-testingconnectorbehavior-declarations-279279 branch from b5c8cd3 to 900f21e Compare April 19, 2023 20:59
findepi added 2 commits April 20, 2023 13:21
The "Integration" looked like a remnant of the old naming convention
before BCT and BCST were introduced.

The "LatestVersion" is usually written as just "latest".

Remove other unnecessary words and make the class names readable.
Use `true` or a related behavior as the default rather than `false`. Few
cases being off by default remain, but generally true as the default is
much easier to reason about. False defaults were usually a result of
incremental additions, where it's easier to add a behavior that is not
widely adopted, but are harder to think about in a long run.
@findepi findepi force-pushed the findepi/simplify-testingconnectorbehavior-declarations-279279 branch from 900f21e to c93bd71 Compare April 20, 2023 11:25
@findepi
Copy link
Member Author

findepi commented Apr 20, 2023

CI #13995

@findepi findepi merged commit 6781fa3 into master Apr 20, 2023
@findepi findepi deleted the findepi/simplify-testingconnectorbehavior-declarations-279279 branch April 20, 2023 19:13
@github-actions github-actions bot added this to the 415 milestone Apr 20, 2023
@colebow colebow added the no-release-notes This pull request does not require release notes entry label Apr 26, 2023
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 hive Hive connector hudi Hudi connector iceberg Iceberg connector mongodb MongoDB connector no-release-notes This pull request does not require release notes entry
Development

Successfully merging this pull request may close these issues.

5 participants