You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/04/13 17:40:07 UTC

[GitHub] [arrow-datafusion] wangxiaoying opened a new issue, #2225: Comparison on LargeUtf8 doesn't work

wangxiaoying opened a new issue, #2225:
URL: https://github.com/apache/arrow-datafusion/issues/2225

   **Describe the bug**
   The `sql` function will throw an error: ` Plan("'LargeUtf8 = Utf8' can't be evaluated because there isn't a common type to coerce the types to")` when filtering on a `LargeUtf8` column.
   
   **To Reproduce**
   ```Rust
   fn main() {
       let id_array = Int32Array::from(vec![1, 2, 3, 4, 5]);
       let lrgstr_array = LargeStringArray::from(vec!["1", "2", "3", "4", "5"]);
       let schema = Schema::new(vec![
           Field::new("id", DataType::Int32, false),
           Field::new("lrgstr", DataType::LargeUtf8, false),
       ]);
       let batch = RecordBatch::try_new(
           Arc::new(schema),
           vec![
               Arc::new(id_array),
               Arc::new(lrgstr_array),
           ],
       )
       .unwrap();
   
       let mut ctx = ExecutionContext::new();
       let db1 = MemTable::try_new(batch.schema(), vec![vec![batch]]).unwrap();
   
       let sql = "select * from t1 where lrgstr = '1'";
       ctx.register_table("t1", Arc::new(db1)).unwrap();
       let rt = Arc::new(tokio::runtime::Runtime::new().expect("Failed to create runtime"));
       let df = rt.block_on(ctx.sql(sql)).unwrap();
   }
   ```
   
   **Expected behavior**
   No error.
   
   **Additional context**
   Add any other context about the problem here.
   


-- 
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: github-unsubscribe@arrow.apache.org.apache.org

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


[GitHub] [arrow-datafusion] WinkerDu commented on issue #2225: Comparison on LargeUtf8 doesn't work

Posted by GitBox <gi...@apache.org>.
WinkerDu commented on issue #2225:
URL: https://github.com/apache/arrow-datafusion/issues/2225#issuecomment-1100913198

   A rough fix here #2258 


-- 
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: github-unsubscribe@arrow.apache.org

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


[GitHub] [arrow-datafusion] yjshen closed issue #2225: Comparison on LargeUtf8 doesn't work

Posted by GitBox <gi...@apache.org>.
yjshen closed issue #2225: Comparison on LargeUtf8 doesn't work
URL: https://github.com/apache/arrow-datafusion/issues/2225


-- 
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: github-unsubscribe@arrow.apache.org

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