Include already collected stats in QueryCompletionEvent#19796
Include already collected stats in QueryCompletionEvent#19796sopel39 merged 5 commits intotrinodb:masterfrom
Conversation
sopel39
commented
Nov 17, 2023
a5a8299 to
1ff53e6
Compare
core/trino-main/src/main/java/io/trino/sql/planner/planprinter/NodeRepresentation.java
Outdated
Show resolved
Hide resolved
i am not sure i understand what the change is doing. is this change about EXPLAIN, or query completion event, or something else? |
It's not always collecting statistics, but used already collected per commit description
Yes, we want EXPLAIN with stats in query completion event. |
core/trino-main/src/main/java/io/trino/sql/planner/planprinter/NodeRepresentation.java
Outdated
Show resolved
Hide resolved
1ff53e6 to
8f57d5f
Compare
core/trino-main/src/main/java/io/trino/sql/planner/planprinter/NodeRepresentation.java
Outdated
Show resolved
Hide resolved
|
ptal again @raunaqmorarka @findepi |
ValuesStatsRule is calling evaluateConstantExpression which might fail for certain expressions like division by 0.
8f57d5f to
49575eb
Compare
49575eb to
1975a58
Compare
It's no longer needed as stats rules have been improved
If stats collection was not requested explicitly, then use statistics that were fetched and cached during planning.
1975a58 to
22fcbbc
Compare
Would it be fair to call this PR "Include already collected stats in QueryCompletionEvent" ? |
|
@mosabua we can skip release notes IMO, I think it's too low level and opportunistic (so stats are not guaranteed to be there) |