You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Andrew Schoenberger (Jira)" <ji...@apache.org> on 2019/08/20 10:16:00 UTC

[jira] [Updated] (ARROW-6290) [Rust] [DataFusion] sql_csv example errors when running

     [ https://issues.apache.org/jira/browse/ARROW-6290?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Schoenberger updated ARROW-6290:
---------------------------------------
    Description: 
The current version of [https://github.com/apache/arrow/blob/master/rust/datafusion/examples/csv_sql.rs] errors when running it.
{code:java}
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: ExecutionError("Cannot compare Float32 with Float64")', src/libcore/result.rs:1084:5{code}
I believe that this is due to column c11 being declared as DataType::Float32 while the WHERE clause parses the numbers as DataType::Float64. Since the comparison_ops only matches when the parsed data types for left and right are the same, this errors out.

I was able to get this running locally through either of the following two methods:

(1) by changing the schema for c11 to be a DataType::Float64.

(2) by forcing a compute::cast in the case that the left data type is different from the right data type in the BinaryExpr (this is likely not the best long-term fix, but it works for this case).

It is also possible that this issue could be due to some mistake or incorrect assumption I am making when running it on my end (I am pretty new to the project).

 

  was:
The current version of [https://github.com/apache/arrow/blob/master/rust/datafusion/examples/csv_sql.rs] errors when running it.
{code:java}
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: ExecutionError("Cannot compare Float32 with Float64")', src/libcore/result.rs:1084:5{code}
I believe that this is due to column c11 being declared as DataType::Float32 while the WHERE clause parses the numbers as DataType::Float64. Since the comparison_ops only matches when the parsed data types for left and right are the same, this errors out.

I was able to get this running locally through the following two methods:

(1) by changing the schema for c11 to be a DataType::Float64.

(2) by forcing a compute::cast in the case that the left data type is different from the right data type in the BinaryExpr (this is likely not the best long-term fix, but it works for this case).

It is also possible that this issue could be due to some mistake or incorrect assumption I am making when running it on my end (I am pretty new to the project).

 


> [Rust] [DataFusion] sql_csv example errors when running
> -------------------------------------------------------
>
>                 Key: ARROW-6290
>                 URL: https://issues.apache.org/jira/browse/ARROW-6290
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: Rust, Rust - DataFusion
>            Reporter: Andrew Schoenberger
>            Priority: Minor
>
> The current version of [https://github.com/apache/arrow/blob/master/rust/datafusion/examples/csv_sql.rs] errors when running it.
> {code:java}
> thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: ExecutionError("Cannot compare Float32 with Float64")', src/libcore/result.rs:1084:5{code}
> I believe that this is due to column c11 being declared as DataType::Float32 while the WHERE clause parses the numbers as DataType::Float64. Since the comparison_ops only matches when the parsed data types for left and right are the same, this errors out.
> I was able to get this running locally through either of the following two methods:
> (1) by changing the schema for c11 to be a DataType::Float64.
> (2) by forcing a compute::cast in the case that the left data type is different from the right data type in the BinaryExpr (this is likely not the best long-term fix, but it works for this case).
> It is also possible that this issue could be due to some mistake or incorrect assumption I am making when running it on my end (I am pretty new to the project).
>  



--
This message was sent by Atlassian Jira
(v8.3.2#803003)