[GitHub] [calcite] praveenbingo commented on issue #1859: [CALCITE-3863] Make Truncate/Round return type inference overridable through rel data …

2020-03-26 Thread GitBox
praveenbingo commented on issue #1859: [CALCITE-3863] Make Truncate/Round 
return type inference overridable through rel data …
URL: https://github.com/apache/calcite/pull/1859#issuecomment-604246510
 
 
   > > @danny0405 This is similar to #1311 which made some of the other decimal 
related rules configurable using a custom type system.
   > > Our understanding back then was this was the recommended way. Could you 
please elaborate on your approach if you think this is not the right way to 
achieve the same.
   > 
   > In my opinion, #1311 is very different because `+` and `-` are builtin 
operators and we have no way for downstream projects to replace these 
operators, but `Round` and `Truncate` are different, they are sql functions, 
and if your project has maintained the sql operators by yourself, there is a 
chance you just override the type inference of these two instead of the whole 
type system, which seems too heavy and special to customize.
   
   Hi Danny,
   
   Thanks for the comments. I think we discussed something similar in this 
comment in 
1311(https://issues.apache.org/jira/browse/CALCITE-3187?focusedCommentId=16882084=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-16882084).
   
   I think the same holds true even now, I think we want to consistently 
override return type inference for all decimal functions so that even Calcite 
internals use the same rules as us. Having two sets of rules applied 
inconsistently between Calcite internals and Application internals will be hard 
to debug.
   
   Please let us know if you have an alternative that keeps the rules 
consistent across the board.
   
   Thx.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [calcite] praveenbingo commented on issue #1859: [CALCITE-3863] Make Truncate/Round return type inference overridable through rel data …

2020-03-24 Thread GitBox
praveenbingo commented on issue #1859: [CALCITE-3863] Make Truncate/Round 
return type inference overridable through rel data …
URL: https://github.com/apache/calcite/pull/1859#issuecomment-603368191
 
 
   @danny0405 This is similar to https://github.com/apache/calcite/pull/1311/ 
which made some of the other decimal related rules configurable using a custom 
type system.
   
   Our understanding back then was this was the recommended way. Could you 
please elaborate on your approach if you think this is not the right way to 
achieve the same.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services