You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datafusion.apache.org by al...@apache.org on 2025/02/15 11:22:27 UTC
(datafusion) branch main updated: bug: fix offset type mismatch when prepending lists (#14672)
This is an automated email from the ASF dual-hosted git repository.
alamb pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/datafusion.git
The following commit(s) were added to refs/heads/main by this push:
new 1626c00a1b bug: fix offset type mismatch when prepending lists (#14672)
1626c00a1b is described below
commit 1626c00a1b2f14057c8c4357ef9ea349350bbb60
Author: Matthew Kim <38...@users.noreply.github.com>
AuthorDate: Sat Feb 15 06:22:23 2025 -0500
bug: fix offset type mismatch when prepending lists (#14672)
---
datafusion/functions-nested/src/concat.rs | 4 ++--
datafusion/sqllogictest/test_files/array.slt | 13 ++++++-------
2 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/datafusion/functions-nested/src/concat.rs b/datafusion/functions-nested/src/concat.rs
index f404173869..17fb1a3731 100644
--- a/datafusion/functions-nested/src/concat.rs
+++ b/datafusion/functions-nested/src/concat.rs
@@ -468,8 +468,8 @@ where
};
let res = match list_array.value_type() {
- DataType::List(_) => concat_internal::<i32>(args)?,
- DataType::LargeList(_) => concat_internal::<i64>(args)?,
+ DataType::List(_) => concat_internal::<O>(args)?,
+ DataType::LargeList(_) => concat_internal::<O>(args)?,
data_type => {
return generic_append_and_prepend::<O>(
list_array,
diff --git a/datafusion/sqllogictest/test_files/array.slt b/datafusion/sqllogictest/test_files/array.slt
index 4418d426cc..6b5b246aee 100644
--- a/datafusion/sqllogictest/test_files/array.slt
+++ b/datafusion/sqllogictest/test_files/array.slt
@@ -2664,13 +2664,12 @@ select array_prepend(arrow_cast(make_array(1), 'FixedSizeList(1, Int64)'), make_
----
[[1], [2], [3], [4]] [[1.0], [2.0], [3.0], [4.0]] [[h], [e], [l], [l], [o]]
-# TODO: https://github.com/apache/datafusion/issues/14613
-#query ???
-#select array_prepend(arrow_cast(make_array(1), 'FixedSizeList(1, Int64)'), arrow_cast(make_array(make_array(2), make_array(3), make_array(4)), 'LargeList(FixedSizeList(1, Int64))')),
-# array_prepend(arrow_cast(make_array(1.0), 'FixedSizeList(1, Float64)'), arrow_cast(make_array([2.0], [3.0], [4.0]), 'LargeList(FixedSizeList(1, Float64))')),
-# array_prepend(arrow_cast(make_array('h'), 'FixedSizeList(1, Utf8)'), arrow_cast(make_array(['e'], ['l'], ['l'], ['o']), 'LargeList(FixedSizeList(1, Utf8))'));
-#----
-#[[1], [2], [3], [4]] [[1.0], [2.0], [3.0], [4.0]] [[h], [e], [l], [l], [o]]
+query ???
+select array_prepend(arrow_cast(make_array(1), 'FixedSizeList(1, Int64)'), arrow_cast(make_array(make_array(2), make_array(3), make_array(4)), 'LargeList(FixedSizeList(1, Int64))')),
+ array_prepend(arrow_cast(make_array(1.0), 'FixedSizeList(1, Float64)'), arrow_cast(make_array([2.0], [3.0], [4.0]), 'LargeList(FixedSizeList(1, Float64))')),
+ array_prepend(arrow_cast(make_array('h'), 'FixedSizeList(1, Utf8)'), arrow_cast(make_array(['e'], ['l'], ['l'], ['o']), 'LargeList(FixedSizeList(1, Utf8))'));
+----
+[[1], [2], [3], [4]] [[1.0], [2.0], [3.0], [4.0]] [[h], [e], [l], [l], [o]]
query ???
select array_prepend(arrow_cast([1], 'FixedSizeList(1, Int64)'), arrow_cast([[1], [2], [3]], 'FixedSizeList(3, FixedSizeList(1, Int64))')),
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datafusion.apache.org
For additional commands, e-mail: commits-help@datafusion.apache.org