You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by al...@apache.org on 2022/10/24 21:25:23 UTC
[arrow-datafusion] branch master updated: Add test for querying predicate on dictionary (#3937)
This is an automated email from the ASF dual-hosted git repository.
alamb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow-datafusion.git
The following commit(s) were added to refs/heads/master by this push:
new ae13455cf Add test for querying predicate on dictionary (#3937)
ae13455cf is described below
commit ae13455cf0ee20ff54fba12d095125b6534d84c2
Author: Andrew Lamb <an...@nerdnetworks.org>
AuthorDate: Mon Oct 24 17:25:17 2022 -0400
Add test for querying predicate on dictionary (#3937)
---
datafusion/core/tests/sql/predicates.rs | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/datafusion/core/tests/sql/predicates.rs b/datafusion/core/tests/sql/predicates.rs
index 07e016a27..b233ff516 100644
--- a/datafusion/core/tests/sql/predicates.rs
+++ b/datafusion/core/tests/sql/predicates.rs
@@ -427,6 +427,34 @@ async fn csv_in_set_test() -> Result<()> {
Ok(())
}
+#[tokio::test]
+#[ignore]
+// https://github.com/apache/arrow-datafusion/issues/3936
+async fn in_set_string_dictionaries() -> Result<()> {
+ let input = vec![Some("foo"), Some("bar"), None, Some("fazzz")]
+ .into_iter()
+ .collect::<DictionaryArray<Int32Type>>();
+
+ let batch = RecordBatch::try_from_iter(vec![("c1", Arc::new(input) as _)]).unwrap();
+
+ let ctx = SessionContext::new();
+ ctx.register_batch("test", batch)?;
+
+ let sql = "SELECT * FROM test WHERE c1 IN ('foo', 'Bar', 'fazz')";
+ let actual = execute_to_batches(&ctx, sql).await;
+ let expected = vec![
+ "+-------+",
+ "| c1 |",
+ "+-------+",
+ "| foo |",
+ "| fazzz |",
+ "+-------+",
+ ];
+
+ assert_batches_eq!(expected, &actual);
+ Ok(())
+}
+
#[tokio::test]
#[ignore]
// https://github.com/apache/arrow-datafusion/issues/3635