himadripal commented on issue #325:
URL:
https://github.com/apache/datafusion-comet/issues/325#issuecomment-2526865883
I was looking at this issue and now - with comet and comet disabled shows
same result -
```sql
+-----+-----------+
| n| converted|
+-----+-----------+
|-10.0| -10.00|
| +1.0| 1.00|
| .34| 0.34|
| 4e7|40000000.00|
| 1| 1.00|
| 0| 0.00|
| | null|
+-----+-----------+
scala> spark.conf.set("spark.comet.enabled", false)
scala> df2.show
+-----+-----------+
| n| converted|
+-----+-----------+
|-10.0| -10.00|
| +1.0| 1.00|
| .34| 0.34|
| 4e7|40000000.00|
| 1| 1.00|
| 0| 0.00|
| | null|
+-----+-----------+
```
But even with comet enabled it does not go through DataFusion as it is
marked as incompatible, I then checked this in the DataFusion project the
following queries
```sql
query TR
select arrow_typeof(cast(4e7 as decimal(10,2))), cast(4e7 as decimal(10,2));
----
Decimal128(10, 2) 40000000
```
works fine but the following one if I add a '4e7' as shown below it throws
arrow-error
```sql
External error: query failed: DataFusion error: Arrow error: Cast error:
Cannot cast string '4e7' to value of Decimal128(38, 10) type
[SQL] select arrow_typeof(cast('4e7' as decimal(10,2))), cast('4e7' as
decimal(10,2));
```
I think, if we add the functionality for string to decimal in arrow-rs, then
the above error would be resolved and also this issue will be addressed.
Previous attempt to fix this issue was made on DataFusion project. Can someone
please help me understand, why aren't we fixing it in arrow-rs project?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]