[ 
https://issues.apache.org/jira/browse/CALCITE-5844?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17746001#comment-17746001
 ] 

Jiajun Xie commented on CALCITE-5844:
-------------------------------------

ViewTable will be expanded during query planning.

 

[~jingda] Are you using `RelMdColumnOrigins#getColumnOrigins` after closing 
View expansion?

> Make RelMdColumnOrigins to be extendable for getting columnOrigins from 
> viewTable
> ---------------------------------------------------------------------------------
>
>                 Key: CALCITE-5844
>                 URL: https://issues.apache.org/jira/browse/CALCITE-5844
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>            Reporter: JingDas
>            Priority: Minor
>
> In our scene, Getting field from view is expected when call 
> RelMdColumnOrigins#getColumnOrigins.
> So I want to define customized RelMdColumnOrigins extend *RelMdColumnOrigins* 
> which can *getColumnOrigins* from viewTable.
> Then I add customized RelMdColumnOrigins to {*}ChainedRelMetadataProvider{*}, 
> keep the sequence before DefaultRelMetadataProvider.INSTANCE.
> After doing all above, I can get columnOrigins from viewTable.
>  
> But I found the private modifier constructor in class RelMdColumnOrigins(also 
> such as
> RelMdCollation, RelMdColumnUniqueness, RelMdDistribution, 
> RelMdExplainVisibility,
> RelMdPercentageOriginalRows, RelMdPopulationSize, RelMdUniqueKeys
> ),
> and protected modifier constructors(such as RelMdDistinctRowCount, 
> RelMdExpressionLineage, RelMdLowerBoundCost,
> RelMdMemory, RelMdParallelism, RelMdSelectivity, RelMdSize, 
> RelMdTableReferences
> ) 
> and public modifier constructors(such as RelMdAllPredicates, 
> RelMdMaxRowCount, RelMdMinRowCount, RelMdNodeTypes,
> RelMdPredicates, RelMdRowCount, 
> ) 
> I haven't had a chance to extend this class to add my custom logic because 
> the constructor modifier is private.
> These "RelMd"prefixed class are default implementation,  They should can be 
> extended for user to add
> customed logic.
> For extensibility, I think this modifier maybe protected for these 
> "RelMd"prefixed class whose modifier is private.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to