Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-5307

Fix HashJoinMoreIT.testBug2961 failing after PHOENIX-5262

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Resolved
    • 4.15.0
    • 4.15.0, 5.1.0
    • None
    • None

    Description

      I noticed HashJoinMoreIT.testBug2961 always failed after PHOENIX-5262, and the error stack is different from PHOENIX-5290:

          java.lang.AssertionError
      	at org.apache.phoenix.end2end.join.HashJoinMoreIT.testBug2961(HashJoinMoreIT.java:908)
      

      I think this problem is caused by following line 453 modified in PHOENIX-5262:

      445                if ( !isFixedWidth && ( sepByte == QueryConstants.DESC_SEPARATOR_BYTE 
      446                                    || ( !exclusiveUpper 
      447                                         && (fieldIndex < schema.getMaxFields() || inclusiveUpper || exclusiveLower) ) ) ) {
      448                key[offset++] = sepByte;
      449                // Set lastInclusiveUpperSingleKey back to false if this is the last pk column
      450                // as we don't want to increment the null byte in this case
      451                // To test if this is the last pk column we need to consider the span of this slot
      452                // and the field index to see if this slot considers the last column
      453                lastInclusiveUpperSingleKey &= (fieldIndex + slotSpan[i]) < schema.getMaxFields()-1;
      454           }
      

      It did not consider the case that the last field is variable length and also DESC, when the last field is variable length and also DESC, the trailiing 0xFF is not removed when stored in HBASE, so for such case, we should not set lastInclusiveUpperSingleKey back to false.

      Attachments

        Issue Links

          Activity

            People

              comnetwork chenglei
              comnetwork chenglei
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: