Vladimir Sitnikov created CALCITE-3673:
------------------------------------------

             Summary: ListTransientTable should not leave tables in the schema
                 Key: CALCITE-3673
                 URL: https://issues.apache.org/jira/browse/CALCITE-3673
             Project: Calcite
          Issue Type: New Feature
          Components: core
    Affects Versions: 1.21.0
            Reporter: Vladimir Sitnikov


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



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to