>From Rithwik Koul <[email protected]>:
Attention is currently required from: Rithwik Koul.
Hello Jenkins, Ritik Raj,
I'd like you to reexamine a change. Please visit
https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/21392?usp=email
to look at the new patch set (#10).
Change subject: [ASTERIXDB-3787][STO] Fix infinite loop reading array-nested
union-typed columns
......................................................................
[ASTERIXDB-3787][STO] Fix infinite loop reading array-nested union-typed columns
- user model changes: no
- storage format changes: no
- interface changes: no
PathExtractorVisitor.getReversedDelimiters() reversed the shared delimiters
field in place via Collections.reverse instead of returning a reversed copy.
The reader requires delimiter levels in descending order (largest nesting level
first).
For a union-typed leaf, getOrCreateReaders loops over the union's flat
children, calling createReader -> getReversedDelimiters once per child. Each
call re-reversed the same field, so odd-numbered children got the correct
descending order and even-numbered children got it flipped back to ascending.
With a single delimiter the flip is a no-op, so the bug only surfaced when the
leaf sat under two or more nested arrays.
An ascending delimiter array corrupts RepeatedPrimitiveColumnValuesReader:
levelToDelimiterMap is built wrong and setDelimiterIndex uses the wrong
threshold, so isDelimiter()/getDelimiterIndex() never reach the value
EndOfRepeatedGroupAssembler waits for. The group-end condition never fires, the
assembler keeps jumping back to the group's first value, and the query spins
forever on the same tuple.
Ex-ref: MB-72388
Change-Id: Ib4c961272a6eea730efeb7d75c95cd9ea72e9aaa
---
A
asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/filter/nested-array-mixed-type-empty/nested-array-mixed-type-empty.001.ddl.sqlpp
A
asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/filter/nested-array-mixed-type-empty/nested-array-mixed-type-empty.002.update.sqlpp
A
asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/filter/nested-array-mixed-type-empty/nested-array-mixed-type-empty.003.query.sqlpp
A
asterixdb/asterix-app/src/test/resources/runtimets/results/column/filter/nested-array-mixed-type-empty/nested-array-mixed-type-empty.003.adm
M asterixdb/asterix-app/src/test/resources/runtimets/sqlpp_queries.xml
M
asterixdb/asterix-column/src/main/java/org/apache/asterix/column/metadata/schema/visitor/PathExtractorVisitor.java
6 files changed, 113 insertions(+), 2 deletions(-)
git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb
refs/changes/92/21392/10
--
To view, visit https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/21392?usp=email
To unsubscribe, or for help writing mail filters, visit
https://asterix-gerrit.ics.uci.edu/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Change-Id: Ib4c961272a6eea730efeb7d75c95cd9ea72e9aaa
Gerrit-Change-Number: 21392
Gerrit-PatchSet: 10
Gerrit-Owner: Rithwik Koul <[email protected]>
Gerrit-Reviewer: Jenkins <[email protected]>
Gerrit-Reviewer: Rithwik Koul <[email protected]>
Gerrit-Reviewer: Ritik Raj <[email protected]>
Gerrit-CC: Anon. E. Moose #1000171
Gerrit-Attention: Rithwik Koul <[email protected]>