Skip to content

Fix stats/cost caching of group-referenced plan nodes#11858

Merged
findepi merged 3 commits intotrinodb:masterfrom
lxynov:cbo
Apr 20, 2022
Merged

Fix stats/cost caching of group-referenced plan nodes#11858
findepi merged 3 commits intotrinodb:masterfrom
lxynov:cbo

Conversation

@lxynov
Copy link
Member

@lxynov lxynov commented Apr 7, 2022

Description

Is this change a fix, improvement, new feature, refactoring, or other?

Fix/improvement.

Is this a change to the core query engine, a connector, client library, or the SPI interfaces? (be specific)

Engine.

How would you describe this change to a non-technical end user or system administrator?

Reduce Iceberg metadata processing during cost-based query optimizations.

Related issues, pull requests, and links

#11708
#8659

Documentation

(x) No documentation is needed.
( ) Sufficient documentation is included in this PR.
( ) Documentation PR is available with #prnumber.
( ) Documentation issue #issuenumber is filed, and can be handled later.

Release notes

( ) No release notes entries required.
(x) Release notes entries required with the following suggested text:

# General
* Reduce computations on table statistics during cost-based query optimizations.

@findepi
Copy link
Member

findepi commented Apr 12, 2022

@lxynov i posted a few comments, i hope it won't be hard to accommodate to them. Please let me know when you're done.

@lxynov
Copy link
Member Author

lxynov commented Apr 12, 2022

@findepi Sure, I just addressed them. Thanks!

@lxynov
Copy link
Member Author

lxynov commented Apr 13, 2022

@findinpath @findepi Thanks for the review! I've addressed the comments.

Copy link
Member

Choose a reason for hiding this comment

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

don't initialize test resources before test class is actually being run by the test runner
init should be done in a @BeforeClass method

for this, extend from AbstractTestQueryFramework and it will do both setup and cleanup for you.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point. AbstractTestQueryFramework is inside trino-testing module which trino-main doesn't have dependency on. So I used BasePlanTest. It also helps close the query runner. Please let me know if it works.

Copy link
Member

Choose a reason for hiding this comment

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

BasePlanTest is not the right class to extends from (we're not testing plans here, after all).

Move the test to trino-tests instead.

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated.

Copy link
Member

Choose a reason for hiding this comment

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

same here --

don't initialize test resources before test class is actually being run by the test runner
init should be done in a @BeforeClass method

for this, extend from AbstractTestQueryFramework and it will do both setup and cleanup for you.

@lxynov
Copy link
Member Author

lxynov commented Apr 15, 2022

@findepi Thanks for the review! Addressed the comments.

@lxynov
Copy link
Member Author

lxynov commented Apr 16, 2022

Rebased to latest master.

@findepi findepi merged commit a8b4613 into trinodb:master Apr 20, 2022
@findepi findepi mentioned this pull request Apr 20, 2022
@github-actions github-actions bot added this to the 378 milestone Apr 20, 2022
@lxynov lxynov mentioned this pull request Apr 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

4 participants