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

WhereOptimizer does not handle multi-tenant local index correctly when connection is non-tenant-specific

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 4.7.0
    • 4.8.0
    • None
    • None

    Description

      For example, if we have a multi-tenant table "A" with columns: tenant_id, id, col0, col1, PK as (tenant_id, id)
      A local index table IDX_A created on A(col0) including col1.

      Then if we try to use IDX_A for query "select * from A where tenant_id = '10' and col0 < 20", WhereOptimizer will compile this into a wrong ScanRanges object since _INDEX_ID column comes after TENANT_ID and using the PK start position approach just won't address this case properly. See WhereOptimizer.KeyExpressionVisitor.andKeySlots().

      Attachments

        Issue Links

          Activity

            People

              rajesh23 rajeshbabu
              maryannxue Wei Xue
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: