jnturton opened a new pull request, #2638:
URL: https://github.com/apache/drill/pull/2638

   # [DRILL-8136](https://issues.apache.org/jira/browse/DRILL-8136): Overhaul 
implict type casting logic
   
   ## Description
   
   The existing implicit casting system is built on simplistic total ordering 
of data types[1] that yields oddities such as TINYINT being regarded as the 
closest numeric type to VARCHAR or DATE the closest type to FLOAT8. This, in 
turn, hurts the range of data types with which SQL functions can be used. E.g. 
`select sqrt('3.1415926')` works in many RDBMSes but not in Drill while, 
confusingly, `select '123' + 456` does work in Drill. In addition the 
limitations of the existing type precedence list mean that it has been 
supplmented with ad hoc secondary casting rules that go in the opposite 
direction.
   
   This PR introduces a new, more flexible definition of casting distance based 
on a weighted directed graph built over the Drill data types.
   
   ## Documentation
   Update [the description of implcit casting 
precedence](https://drill.apache.org/docs/supported-data-types/#implicit-casting-precedence-of-data-types).
   
   ## Testing
   Existing implcit cast unit tests plus new additions.
   


-- 
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.

To unsubscribe, e-mail: dev-unsubscr...@drill.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to