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

Julian Hyde commented on CALCITE-3550:
--------------------------------------

Can we adopt the naming convention that plural class names are only for 
utilities? I know SqlTypeAssignmentRules doesn't quite adhere to that (though 
it has some static methods), but new classes should. Also, I think the new base 
class should be an interface.

I agree we don't need {{synchronized}} any more. Perhaps Guava's 
{{Suppliers.memoize}} will help with race conditions.

I agree that {{ThreadLocal}} is sufficient. It will avoid changing lots of 
code. Mention the ThreadLocal in the SqlValidator javadoc, though.

> Make SqlTypeAssignmentRules conversion mapping pluggable
> --------------------------------------------------------
>
>                 Key: CALCITE-3550
>                 URL: https://issues.apache.org/jira/browse/CALCITE-3550
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 1.21.0
>            Reporter: Danny Chen
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.22.0
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> In CALCITE-2302, we introduce implicit type coercion for Calcite builtin 
> conversion behaviors, we also expand the conversion matrix to support more 
> type conversion compared to the old matrix [1], that means, we implement a 
> conversion matrix of our Calcite style.
> As a library of other sql engines, i think we should make the conversion 
> matrix pluggable, so that each engine can customize if the conversion is 
> valid from a type to another.
> We have made the TypeCoercion pluggable/customizable, so if this matrix is 
> also pluggable, then, the whole conversion behavior can be customized.
> That would give the type conversion of Calcite a pretty good flexibility.
> [1] 
> https://docs.google.com/spreadsheets/d/1GhleX5h5W8-kJKh7NMJ4vtoE78pwfaZRJl88ULX_MgU/edit?usp=sharing



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

Reply via email to