Skip to content

Conversation

@WillPelech
Copy link

@WillPelech WillPelech commented Nov 14, 2025

Description

This PR adds a test case to BaseConnectorSmokeTest testing that analyze works correctly if the connector supports the operation. If the test fails then it is because of lack of support so the test will then check that the test is indeed true for the underlying connector.

Fixes #27273

Release notes

( ) This is not user-visible or is docs only, and no release notes are required.
( ) Release notes are required. Please propose a release note for me.
( ) Release notes are required, with the following suggested text:

## Section
* Fix some things. ({issue}`#27273`)

@cla-bot
Copy link

cla-bot bot commented Nov 14, 2025

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to [email protected]. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

@github-actions github-actions bot added the iceberg Iceberg connector label Nov 14, 2025
String tableName = "test_analyze_" + randomNameSuffix();

try {
assertUpdate("CREATE TABLE " + tableName + " AS SELECT * FROM nation", 25);
Copy link
Member

@ebyhr ebyhr Nov 17, 2025

Choose a reason for hiding this comment

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

We should verify the collected NDV by the following ANALYZE. Could you use a session disabling collect_extended_statistics_on_write property?

Copy link
Author

Choose a reason for hiding this comment

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

Out of curiousity how do you debug and I was wondering if I should insert values into the table before I use analyze to make sure the ndv was gathered?

Copy link
Contributor

Choose a reason for hiding this comment

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

assertUpdate can accept the session property, so you can control the behavior

}
}

@Test
Copy link
Member

Choose a reason for hiding this comment

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

Added BaseConnectorSmokeTest for Analyze to test different catalogs

Could you change both PR and commit title to "Test ANALYZE in BaseIcebergConnectorSmokeTest"?

Copy link
Author

Choose a reason for hiding this comment

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

I changed the title and I am looking into how to change the commit title

@cla-bot
Copy link

cla-bot bot commented Nov 20, 2025

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to [email protected]. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

@WillPelech WillPelech changed the title Added BaseConnectorSmokeTest for Analyze to test different catalogs Test ANALYZE in BaseIcebergConnectorSmokeTest Nov 20, 2025
@WillPelech
Copy link
Author

Hi I submitted the CLA around 5 days ago I was wondering how long it takes to get approved?

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

Labels

iceberg Iceberg connector

Development

Successfully merging this pull request may close these issues.

Test ANALYZE statement in BaseIcebergConnectorSmokeTest

3 participants