-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Report written rows and size by MERGE statement #27332
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
Conversation
35d8ee7 to
d00e9f6
Compare
plugin/trino-delta-lake/src/main/java/io/trino/plugin/deltalake/DeltaLakeMergeSink.java
Outdated
Show resolved
Hide resolved
plugin/trino-delta-lake/src/main/java/io/trino/plugin/deltalake/DeltaLakeMergeSink.java
Outdated
Show resolved
Hide resolved
plugin/trino-delta-lake/src/main/java/io/trino/plugin/deltalake/DeltaLakeMergeSink.java
Show resolved
Hide resolved
plugin/trino-delta-lake/src/main/java/io/trino/plugin/deltalake/DeltaLakeMergeSink.java
Outdated
Show resolved
Hide resolved
plugin/trino-delta-lake/src/main/java/io/trino/plugin/deltalake/DeltaLakeMergeSink.java
Show resolved
Hide resolved
plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/IcebergMergeSink.java
Outdated
Show resolved
Hide resolved
core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorMergeSink.java
Outdated
Show resolved
Hide resolved
core/trino-spi/src/main/java/io/trino/spi/connector/ConnectorMergeSink.java
Outdated
Show resolved
Hide resolved
d00e9f6 to
5131199
Compare
plugin/trino-delta-lake/src/main/java/io/trino/plugin/deltalake/DeltaLakeMergeSink.java
Show resolved
Hide resolved
| mergePage.updateDeletionsPage().ifPresent(deletions -> processDeletion(deletions, UPDATE_PREIMAGE_CDF_LABEL)); | ||
|
|
||
| writtenBytes = insertPageSink.getCompletedBytes(); | ||
| writtenBytes += cdfPageSink == null ? 0 : cdfPageSink.getCompletedBytes(); |
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.
if statement would be more readable then ternary one
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.
This is simple enough to me.
| assertThat(queryStats.getLogicalWrittenDataSize().toBytes()).isPositive(); | ||
|
|
||
| if (hasBehavior(SUPPORTS_REPORTING_WRITTEN_BYTES)) { | ||
| assertThat(queryStats.getPhysicalWrittenDataSize().toBytes()).isPositive(); |
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.
can we assert on the actual written size?
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.
I don't think we want to make this assertion complex in the base test class. Such tests can be implemented in each connector, with more detailed scenarios.
6972f82 to
0a64301
Compare
|
(Just squashed fixup commits) |
Description
Fixes #25922
Release notes
(x) This is not user-visible or is docs only, and no release notes are required.