[ 
https://issues.apache.org/jira/browse/CALCITE-4217?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Vladimir Sitnikov updated CALCITE-4217:
---------------------------------------
    Description: 
Currently RelCrossType#getFieldCount throws an assertion error because 
RelCrossType is not struct. 
However, RelCrossType does return proper values for getFieldList and 
getFieldNames, so it makes sense to unlock getFieldCount.

  was:
Currently RelCrossType#isStruct returns false even though the default 
implementation in {{org.apache.calcite.rel.type.RelDataTypeImpl#isStruct}} is 
{{return fieldList != null}}

That results in {{getFieldList}} throwing assertion error (because it asserts 
{{isStruct}}), however RelCrossType#getFieldNames works OK because it asserts 
{{fieldList != null}}

I think it should be OK if we remove {{isStruct() { return false; } }} override 
and use {{isStruct}} assertion in both {{getFieldList}} and {{getFieldNames}}


> Unlock RelCrossType#getFieldCount()
> -----------------------------------
>
>                 Key: CALCITE-4217
>                 URL: https://issues.apache.org/jira/browse/CALCITE-4217
>             Project: Calcite
>          Issue Type: Sub-task
>          Components: core
>    Affects Versions: 1.25.0
>            Reporter: Vladimir Sitnikov
>            Priority: Major
>
> Currently RelCrossType#getFieldCount throws an assertion error because 
> RelCrossType is not struct. 
> However, RelCrossType does return proper values for getFieldList and 
> getFieldNames, so it makes sense to unlock getFieldCount.



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

Reply via email to