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

ListTransientTable should not leave tables in the schema

Rank to TopRank to BottomBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersConvert to sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.21.0
    • 1.30.0
    • 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

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

          People

            rubenql Ruben Q L
            vladimirsitnikov Vladimir Sitnikov
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

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

                Slack

                  Issue deployment