You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Ivan Yaschishin (Jira)" <ji...@apache.org> on 2022/10/17 13:19:00 UTC
[jira] [Created] (CALCITE-5335) SqlTypeUtil.keepSourceTypeAndTargetNullability does not respect recurrent RelDataTypes
Ivan Yaschishin created CALCITE-5335:
----------------------------------------
Summary: SqlTypeUtil.keepSourceTypeAndTargetNullability does not respect recurrent RelDataTypes
Key: CALCITE-5335
URL: https://issues.apache.org/jira/browse/CALCITE-5335
Project: Calcite
Issue Type: Bug
Components: core
Affects Versions: 1.31.0
Reporter: Ivan Yaschishin
Attachments: RecurrentRelDataTypeReproducer.java
This method is being used in default implementations of Sql2Rel converter, both during ROW expression conversion and sub-query conversions. A quick reproducer is attached below.
The use case for recurrent RelDataTypes is having User Defined Types with support for Cyclic types e.g. type hierarchies defined as following:
```sql
AType(id: BIGINT, bcol BType)
BType(id: BIGINT, acol AType)
```
Current implementation assumes that the input type hierarchy is non-cyclic and hits a StackOverflow.
*Are Recurrent RelDataType instances generally supported by Calcite or is it expected that all RelDataType instances are acyclic?*
--
This message was sent by Atlassian Jira
(v8.20.10#820010)