datafusion icon indicating copy to clipboard operation
datafusion copied to clipboard

support cast to decimal data type in datafusion

Open liukun4515 opened this issue 3 years ago • 1 comments

Is your feature request related to a problem or challenge? Please describe what you are trying to do. In the #122 , we need to support the decimal data type.

In order to support column_a > 12 for the decimal data type, we need to support the cast/try_cast first. For some operations, such as comparison operations and mathematics operations, we need to convert some numeric data types to decimal first.

TODO

  • [x] signed numeric to decimal https://github.com/apache/arrow-datafusion/pull/1442
  • [ ] utf-8 to decimal
  • [x] decimal to signed numeric https://github.com/apache/arrow-datafusion/pull/1465
  • [x] remove duplicated code for cast/try_cast code https://github.com/apache/arrow-datafusion/pull/1465#pullrequestreview-853170945
  • [x] decimal to diff decimal https://github.com/apache/arrow-datafusion/pull/1603

The unsigned numeric is not the standard data type in SQL, we no need to support them. @alamb

Some parts in arrow-rs: https://github.com/apache/arrow-rs/issues/1043

Describe the solution you'd like A clear and concise description of what you want to happen.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.

liukun4515 avatar Dec 14 '21 08:12 liukun4515

please assign this issue to me.

liukun4515 avatar Dec 14 '21 08:12 liukun4515