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

ListTransientTable should not leave tables in the schema

    XMLWordPrintableJSON

    Details

    • Type: New Feature
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.21.0
    • Fix Version/s: None
    • Component/s: core

      Description

      1) org.apache.calcite.schema.impl.ListTransientTable#scan adds itself to a schema: root.getRootSchema().add(name, this); however, it misses cleanup, so it looks like a memory leak

      2) ListTransientTable is not implementable with EnumerableTableScan as org.apache.calcite.tools.RelBuilder#transientScan(java.lang.String, org.apache.calcite.rel.type.RelDataType) is using org.apache.calcite.prepare.RelOptTableImpl#create(org.apache.calcite.plan.RelOptSchema, org.apache.calcite.rel.type.RelDataType, org.apache.calcite.schema.Table, com.google.common.collect.ImmutableList<java.lang.String>) which creates RelOptTableImpl with NULL expressionFunction which means org.apache.calcite.prepare.RelOptTableImpl#getExpression returns null

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                vladimirsitnikov Vladimir Sitnikov
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 10m
                  10m