You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Jiatao Tao (Jira)" <ji...@apache.org> on 2020/10/27 13:19:00 UTC

[jira] [Commented] (CALCITE-4359) EnumerableProject.create didn't consider input's traitSet

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

Jiatao Tao commented on CALCITE-4359:
-------------------------------------

Seems not an issue, close this one.

> EnumerableProject.create didn't consider input's traitSet
> ---------------------------------------------------------
>
>                 Key: CALCITE-4359
>                 URL: https://issues.apache.org/jira/browse/CALCITE-4359
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>            Reporter: Jiatao Tao
>            Assignee: Jiatao Tao
>            Priority: Major
>
> {code:java}
> /** Creates an EnumerableProject, specifying row type rather than field
>  * names. */
> public static EnumerableProject create(final RelNode input,
>     final List<? extends RexNode> projects, RelDataType rowType) {
>   final RelOptCluster cluster = input.getCluster();
>   final RelMetadataQuery mq = cluster.getMetadataQuery();
>   final RelTraitSet traitSet =
>       cluster.traitSet().replace(EnumerableConvention.INSTANCE)
>           .replaceIfs(RelCollationTraitDef.INSTANCE,
>               () -> RelMdCollation.project(mq, input, projects));
>   return new EnumerableProject(cluster, traitSet, input, projects, rowType);
> }
> {code}
> Code uses "cluster.traitSet()", but RelOptCluster#traitSet returns emptyTraitSet, should use input#getTraitSet, please tell me if i am wrong
>  



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