[
https://issues.apache.org/jira/browse/CALCITE-2321?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16491061#comment-16491061
]
Julian Hyde commented on CALCITE-2321:
--------------------------------------
Reviewing e8f5dec70a7d022f20b013100964360130266a17:
* In a couple of places you use the word "Customed". Can you please change to
"Custom" (which is an adjective, even though it doesn't look like it)
* I saw you added {{SqlConformance sqlConformance}} as a constructor parameter
to {{JavaTypeFactoryImpl}}. I'd rather not have that coupling. Better to just
remove the SqlTypeFactory.shouldRaggedFixedLengthValueUnionBeVariable method.
We don't need to
deprecate; we know it's not used outside Calcite.
* Need better description than "Whether ragged fixed length value union be
variable"
* In SqlAbstractConformance, use the usual pattern "return
SqlConformanceEnum.DEFAULT...".
* In SqlConformance, follow the standard pattern for javadoc.
* Do you really need your own test factory class? Many existing tests manage to
change one conformance property without creating a whole new class. If we don't
really need it, why increase maintenance burden?
> Support ragged fixed length value union be variable
> ---------------------------------------------------
>
> Key: CALCITE-2321
> URL: https://issues.apache.org/jira/browse/CALCITE-2321
> Project: Calcite
> Issue Type: New Feature
> Components: core
> Reporter: Hequn Cheng
> Assignee: Hequn Cheng
> Priority: Major
>
> The {{shouldRaggedFixedLengthValueUnionBeVariable()}} function in
> {{SqlTypeFactoryImpl}} always return false now. It is good to make it
> configurable since some system may need the function to return true to
> provide pragmatic behavior. For example, for the sql: case 1 when 1 then 'a'
> when 2 then 'bcd' end, we need the return value to be 'a' instead of 'a ' of
> CHAR(3).
> I see one option to solve this issue: Add {{boolean
> shouldRaggedFixedLengthValueUnionBeVariable()}} in {{RelDataTypeSystem}}, so
> external system can override to configure the value.
> Any suggestions are welcomed. Thanks a lot.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)