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

Wrong data row key is getting generated for local indexes for functions with fixed non null columns

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 4.9.0, 4.8.2
    • None
    • None

    Description

      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, e.getDataType());
                      sortOrderToBe = descIndexColumnBitSet.get(i) ? SortOrder.DESC : SortOrder.ASC;
                      maxLengthToBe = e.getMaxLength();
                      scaleToBe = e.getScale();
      ...
      

      Attachments

        1. PHOENIX-3374_v2.patch
          2 kB
          Rajeshbabu Chintaguntla
        2. PHOENIX-3374_v3.patch
          3 kB
          Rajeshbabu Chintaguntla
        3. PHOENIX-3374.patch
          3 kB
          Rajeshbabu Chintaguntla

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            rajeshbabu Rajeshbabu Chintaguntla
            rajeshbabu Rajeshbabu Chintaguntla
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment