Repository navigation
Check the current row's NULL flag in multi-value IN transformers - #19544
Open
amalsaidov wants to merge 1 commit into
Open
amalsaidov wants to merge 1 commit into
amalsaidov wants to merge 1 commit into
Conversation
The In*MultiColumnTransformer subclasses looked up the NULL flag of a non-literal IN item with the operand index instead of the row index, so they read the wrong row's flag and threw ArrayIndexOutOfBoundsException when the block had fewer rows than IN operands. Part of apache#19435.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes the first part of #19435 (wrong row index in the NULL check of the multi-value
INtransformers). The narrowing/truncation part of that issue is left for a separate change.When a multi-value
INlist contains a non-literal item (a column, an arithmetic expression, a non-foldedCAST),ColumnTransformerBuilderevaluates it per row inIn*MultiColumnTransformer.satisfy(childrenColumns, index). All six subclasses checked the item's NULL flag with the operand loop variableiinstead of the rowindex:So:
x IN (1, y),valueColumn.isNull(1)throwsArrayIndexOutOfBoundsException;The fix uses
isNull(index)inInInt32/InInt64/InFloat/InDouble/InBinary/InBooleanMultiColumnTransformer.InMultiColumnTransformerTest(calc-commons) covers the one-row case and the wrong-row NULL flag for all six types, with and without a selection; all three tests fail on master.mvn spotless:check test -pl iotdb-core/calc-commonspasses.This PR has: