[GitHub] [calcite] danny0405 commented on issue #706: [CALCITE-2302] Implicit type cast support

2019-08-19 Thread GitBox
danny0405 commented on issue #706: [CALCITE-2302] Implicit type cast support
URL: https://github.com/apache/calcite/pull/706#issuecomment-522831585
 
 
   > integeralTypes, fractionalTypes, dateSecondIntervalType, varchar10Type in 
`TypeCoercionTest` are not used.
   > select '9'/2 returns integer 4 for Postgres, but in the POSTGRESQL_11 
conformance, it still returns double.
   
   Thanks, i have remove the useless types in TypeCoercionTest. Also add an 
issue and TODO 
[CALCITE-3269](https://issues.apache.org/jira/browse/CALCITE-3269) for 
PostgreSQL.


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] danny0405 commented on issue #706: [CALCITE-2302] Implicit type cast support

2019-08-15 Thread GitBox
danny0405 commented on issue #706: [CALCITE-2302] Implicit type cast support
URL: https://github.com/apache/calcite/pull/706#issuecomment-521902508
 
 
   > This is a large contribution, thanks for your effort. My only concern is 
that should we provide the option of implicit cast strategy or dialect? 
Different databases has some different cast strategy. like '9'/2, PostgreSQL 
will cast '9' to integer, which returns 4, while Hive may cast '9' to decimal, 
which returns 4.5. The current implementation will break many Postgres queries, 
and generate wrong results.
   
   I think we can, because the `TypeCoercion` can see the `SqlValidator` then 
the `SqlConformance`, but i can not find a conformance of POSTGRES now. There 
are 2 choices:
   1. Add a conformance for `POSTGRE`
   2. disable the whole type coercion when doing `POSTGRE` query
   
   I prefer 1 but add a conformance only for the DIV seems a little not that 
necessary.


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] danny0405 commented on issue #706: [CALCITE-2302] Implicit type cast support

2019-05-26 Thread GitBox
danny0405 commented on issue #706: [CALCITE-2302] Implicit type cast support
URL: https://github.com/apache/calcite/pull/706#issuecomment-496096851
 
 
   Thanks @zhztheplayer , i would rebase and do some little refactor for this 
patch.


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