Rajeshbabu Chintaguntla created PHOENIX-3374:

             Summary: Wrong data row key is getting generated for local indexes 
for functions with fixed non null columns
                 Key: PHOENIX-3374
                 URL: https://issues.apache.org/jira/browse/PHOENIX-3374
             Project: Phoenix
          Issue Type: Bug
            Reporter: Rajeshbabu Chintaguntla
            Assignee: Rajeshbabu Chintaguntla
             Fix For: 4.9.0, 4.8.2

When we create local indexes on functions then while joining back missing 
columns from data table is generating wrong data row key. 
When we generated index row key schema we are initializing isNullableToBe to 
true always even if the expression might be not null. Because of this we might 
change the column type to other castable one and may consider actual data as 
separator bytes.
            if (indexField == null) {
                Expression e = expressionItr.next();
                isNullableToBe = true;
                dataTypeToBe = IndexUtil.getIndexColumnDataType(isNullableToBe, 
                sortOrderToBe = descIndexColumnBitSet.get(i) ? SortOrder.DESC : 
                maxLengthToBe = e.getMaxLength();
                scaleToBe = e.getScale();

This message was sent by Atlassian JIRA

Reply via email to