Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-1742

Create a read-consistent view of CalciteSchema for each statement compilation

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.12.0
    • Fix Version/s: 1.13.0
    • Component/s: core
    • Labels:
      None

      Description

      CalciteSchema is designed to have two sets of objects, the explicit and the implicit. A explicit object means an object we add through explicit CalciteSchema#addTable (or CalciteSchema.addFunction, etc) calls, while an implicit object means an object we get from the underlying Schema object's getXXX methods.

      However, in CalciteCatalogReader#getTableFrom, after a table is resolved through CalciteSchema.getTable method, it will be added to the CalciteSchema again as an explicit object regardless of whether it is originally implicit or explicit. So if it happens to be an implicit table, any change about that table later on will be shadowed by the newly added explicit object and thus cannot be accessed.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                maryannxue Maryann Xue
                Reporter:
                maryannxue Maryann Xue
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: