Conversation
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
9c5e489 to
2fd321f
Compare
|
run buildall |
|
run external |
### What problem does this PR solve?
Issue Number: None
Related PR: None
Problem Summary: Add the generated expected results for the Paimon timestamp predicate regression coverage.
### Release note
None
### Check List (For Author)
- Test: Regression test
- ./run-regression-test.sh --conf /tmp/yuze-regression-full-conf.groovy --run -d external_table_p0/paimon -s paimon_timestamp_types
- Behavior changed: No
- Does this need documentation: No
|
run buildall |
|
/review |
There was a problem hiding this comment.
Static review completed at exact head bf9a4feea46fbc700446d8238d310fc8ae720aa4. Two review rounds converged with no additional valuable findings after the accepted set.
Blocking findings:
- The generated ORC oracle accepts duplicate rows from a documented one-row fixture.
- The oracle also accepts different timestamp values and row sets for identical SQL under JNI versus native ORC scanning.
Critical checkpoint conclusions:
- Goal and proof: the PR is intended to prove correct high-precision Paimon predicate behavior, but the checked-in ORC results preserve row multiplication and scanner-dependent semantics, so the goal is not yet proven.
- Scope and clarity: the code change is small and focused; query reuse, hardcoded table names, ordering, and session cleanup are otherwise clear.
- Concurrency and lifecycle: no production concurrency, locks, static initialization, or new lifecycle is introduced. Existing scanner/time-zone settings are restored in
finally. - Configuration: no configuration item is added; only existing session variables are toggled.
- Compatibility: no function symbol, storage format, protocol, or rolling-upgrade behavior changes in this test-only PR.
- Parallel paths and conditions: precision greater than six is left as a residual predicate; FE pruning, JNI/native routing, and BE residual evaluation were traced. Both readers and formats are invoked, but their ORC results are not semantically equivalent.
- Test coverage and results: the new queries are deterministic and use generated result blocks, but the new ORC expected results are not correct oracles. A one-row filter must not return two rows, and changing only the scanner must not change SQL semantics.
- Observability, persistence, transactions, writes, FE-BE variables, memory ownership, and performance: not applicable; no production path is modified.
- User focus: no additional focus points were provided.
Review status: complete, static-only. Builds and tests were not run because the review runner contract prohibits them.
|
|
||
| -- !ts9_eq_orc -- | ||
| 1 | ||
| 1 |
There was a problem hiding this comment.
The fixture and both unfiltered scans contain exactly one id = 1, so accepting two rows here (and for <=/IN) makes this regression preserve an ORC row-multiplication bug. A predicate cannot create a second source row. Please fix the filtered ORC path and regenerate these blocks with exactly one row; do not mask it with DISTINCT, which would prevent the test from detecting the duplication.
| -- !c2 -- | ||
| 1 2024-01-02T10:04:05.100 2024-01-02T10:04:05.120 2024-01-02T10:04:05.123 2024-01-02T10:04:05.123400 2024-01-02T10:04:05.123450 2024-01-02T10:04:05.123456 2024-01-02T10:04:05.123456 2024-01-02T10:04:05.123456 2024-01-02T10:04:05.123456 2024-01-02T10:04:05.100 2024-01-02T10:04:05.120 2024-01-02T10:04:05.123 2024-01-02T10:04:05.123400 2024-01-02T10:04:05.123450 2024-01-02T10:04:05.123456 2024-01-02T10:04:05.123456 2024-01-02T10:04:05.123456 2024-01-02T10:04:05.123456 | ||
|
|
||
| -- !ts9_eq_orc -- |
There was a problem hiding this comment.
The same ORC row is exposed as .123456 under JNI but .123457 under the native reader, so this empty native equality block contradicts the truncation contract used by PaimonPredicateConverter and makes identical SQL return different rows when force_jni_scanner changes. Please establish one precision-reduction contract, align both scanner paths to it, and regenerate the snapshots so they produce the same row set.
### What problem does this PR solve?
Issue Number: None
Related PR: None
Problem Summary: Replace duplicated expected rows with framework-generated results for the Paimon timestamp predicate regression coverage.
### Release note
None
### Check List (For Author)
- Test: Regression test
- ./run-regression-test.sh --conf /mnt/disk4/zhangyuze/doris-regression-env/regression-conf.groovy --run -d external_table_p0/paimon -s paimon_timestamp_types
- Behavior changed: No
- Does this need documentation: No
### What problem does this PR solve?
Issue Number: None
Related PR: None
Problem Summary: Native ORC timestamp decoding rounded nanoseconds to microseconds while the Paimon JNI path truncated them. This made visible values and timestamp predicate results differ between scanner implementations. Truncate native ORC row values, stripe statistics, and search argument bounds consistently, with unit and Paimon regression coverage.
### Release note
Fix inconsistent timestamp predicate results between native ORC and JNI readers for sub-microsecond values.
### Check List (For Author)
- Test: Regression test / Unit Test
- ./run-be-ut.sh --run --filter=NewOrcReaderTest.*Timestamp*:NewOrcReaderTest.ReadTimestampNanosecondsTruncatesToMicroseconds
- ./run-regression-test.sh --conf /tmp/yuze-regression-full-conf.groovy --run -d external_table_p0/paimon -s paimon_timestamp_types
- Behavior changed: Yes, native ORC timestamps now truncate sub-microsecond digits consistently with Doris precision and the JNI reader.
- Does this need documentation: No
|
run buildall |
TPC-H: Total hot run time: 27644 ms |
TPC-DS: Total hot run time: 153078 ms |
ClickBench: Total hot run time: 24.07 s |
|
run external |
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
What problem does this PR solve?
Issue Number: None
Related PR: #67904
Problem Summary:
Paimon ORC tables can store timestamp values with nanosecond precision, while Doris exposes timestamps at microsecond precision. The Paimon JNI reader truncates sub-microsecond digits, but the native ORC reader rounded them. For example,
2024-01-02 10:04:05.123456789was exposed as.123456by JNI and.123457by the native reader, causing equality predicates to return inconsistent results.The existing Paimon predicate conversion keeps
TIMESTAMP(7/8/9)comparisons as residual predicates. This change makes the native ORC path use the same truncation semantics as Doris and the JNI reader for row decoding, stripe statistics, and ORC search argument bounds.Release note
Fix inconsistent timestamp values and predicate results between native ORC and JNI readers for sub-microsecond timestamps.
Check List (For Author)
./run-regression-test.sh --conf /tmp/yuze-regression-full-conf.groovy --run -d external_table_p0/paimon -s paimon_timestamp_types./run-be-ut.sh --run --filter=NewOrcReaderTest.*Timestamp*:NewOrcReaderTest.ReadTimestampNanosecondsTruncatesToMicrosecondsCheck List (For Reviewer who merge this PR)