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

Lai Zhou updated CALCITE-3014:
------------------------------
    Description: 
I found SqlConformanceEnum is hard coded in a few places.

[https://github.com/apache/calcite/blob/ee83efd360793ef4201f4cdfc2af8d837b76ca69/core/src/main/java/org/apache/calcite/rex/RexExecutorImpl.java#L81]

[https://github.com/apache/calcite/blob/72f36a8830afe7f903d8cb32cf547ea484e49fef/core/src/main/java/org/apache/calcite/interpreter/AggregateNode.java#L226]

I think it's not easy to fix them in a generic way.  To support different 

SQL compatibility modes well, many place of current codebase is possible to be 
modified.

It will `drill a hole` to pass the SqlConformance config in the whole process 
of  one sql query.

May be we can put the SqlConformance config in ThreadLocal, avoiding pass it 
frequently.

 

 

  was:
[~julianhyde]  I found SqlConformanceEnum is hard coded in a few places.

[https://github.com/apache/calcite/blob/ee83efd360793ef4201f4cdfc2af8d837b76ca69/core/src/main/java/org/apache/calcite/rex/RexExecutorImpl.java#L81|https://github.com/apache/calcite/blob/ee83efd360793ef4201f4cdfc2af8d837b76ca69/core/src/main/java/org/apache/calcite/rex/RexExecutorImpl.java#L81]

[https://github.com/apache/calcite/blob/72f36a8830afe7f903d8cb32cf547ea484e49fef/core/src/main/java/org/apache/calcite/interpreter/AggregateNode.java#L226|https://github.com/apache/calcite/blob/72f36a8830afe7f903d8cb32cf547ea484e49fef/core/src/main/java/org/apache/calcite/interpreter/AggregateNode.java#L226]

I think it's not easy to fix them in a generic way.  To support different 

SQL compatibility modes well, many place of current codebase is possible to be 
modified.

It will `drill a hole` to pass the SqlConformance config in the whole process 
of  one sql query.

May be we can put the SqlConformance config in ThreadLocal, avoiding pass it 
frequently.

 

 


> SqlConformanceEnum is hard coded in a few places
> ------------------------------------------------
>
>                 Key: CALCITE-3014
>                 URL: https://issues.apache.org/jira/browse/CALCITE-3014
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.19.0
>            Reporter: Lai Zhou
>            Priority: Major
>
> I found SqlConformanceEnum is hard coded in a few places.
> [https://github.com/apache/calcite/blob/ee83efd360793ef4201f4cdfc2af8d837b76ca69/core/src/main/java/org/apache/calcite/rex/RexExecutorImpl.java#L81]
> [https://github.com/apache/calcite/blob/72f36a8830afe7f903d8cb32cf547ea484e49fef/core/src/main/java/org/apache/calcite/interpreter/AggregateNode.java#L226]
> I think it's not easy to fix them in a generic way.  To support different 
> SQL compatibility modes well, many place of current codebase is possible to 
> be modified.
> It will `drill a hole` to pass the SqlConformance config in the whole process 
> of  one sql query.
> May be we can put the SqlConformance config in ThreadLocal, avoiding pass it 
> frequently.
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to