[ https://issues.apache.org/jira/browse/CALCITE-2045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16356429#comment-16356429 ]
Shuyi Chen commented on CALCITE-2045: ------------------------------------- Hi [~julianhyde], I think I'll need to extend SqlDataTypeSpec to pass the schema (or something equivalence to provide access to the registered UDT) during SqlDataTypeSpec.deriveType call. Otherwise, after I create a type using "_CREATE TYPE mytype1 as int_", when I use the type to, say, _create table t (c mytype1),_ it will fail. Because the type info is only registered in the schema, and SqlDataTypeSpec has to access the created user-defined type through schema. However, this might be difficult because not all call sites of SqlDataTypeSpec.deriveType can provide access to the schema. If this is the right option, I can try to modify all call sites to provide access to the schema directly or indirectly. Do you have any suggestions? > Support "CREATE TYPE" DDL > ------------------------- > > Key: CALCITE-2045 > URL: https://issues.apache.org/jira/browse/CALCITE-2045 > Project: Calcite > Issue Type: New Feature > Components: core > Reporter: Shuyi Chen > Assignee: Shuyi Chen > Priority: Major > -- This message was sent by Atlassian JIRA (v7.6.3#76005)