This is an automated email from the ASF dual-hosted git repository.
comphead 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 8484c96ed7 chore: add tests for out of bounds for NullArray (#16802)
8484c96ed7 is described below
commit 8484c96ed74c02d07d5b42e978bcc865b237f9c3
Author: Oleks V <[email protected]>
AuthorDate: Sat Jul 19 22:05:48 2025 -0700
chore: add tests for out of bounds for NullArray (#16802)
* chore: add tests for out of bounds for NullArray
* chore: add tests for out of bounds for NullArray
---
datafusion/sqllogictest/test_files/array.slt | 7 +++++++
datafusion/sqllogictest/test_files/map.slt | 7 +++++++
2 files changed, 14 insertions(+)
diff --git a/datafusion/sqllogictest/test_files/array.slt
b/datafusion/sqllogictest/test_files/array.slt
index a3d9c3e1d9..8cbc427250 100644
--- a/datafusion/sqllogictest/test_files/array.slt
+++ b/datafusion/sqllogictest/test_files/array.slt
@@ -8065,6 +8065,13 @@ FixedSizeList(Field { name: "item", data_type: Int32,
nullable: true, dict_id: 0
statement error
create table varying_fixed_size_col_table (a int[3]) as values ([1,2,3]),
([4,5]);
+# https://github.com/apache/datafusion/issues/16187
+# should be NULL in case of out of bounds for Null Type
+query ?
+select [named_struct('a', 1, 'b', null)][-2];
+----
+NULL
+
### Delete tables
statement ok
diff --git a/datafusion/sqllogictest/test_files/map.slt
b/datafusion/sqllogictest/test_files/map.slt
index 56481936e7..4f1e5ef39a 100644
--- a/datafusion/sqllogictest/test_files/map.slt
+++ b/datafusion/sqllogictest/test_files/map.slt
@@ -833,5 +833,12 @@ select column3[true] from tt;
----
3
+# https://github.com/apache/datafusion/issues/16187
+# should be NULL in case of out of bounds for Null Type
+query ?
+select map_values(map([named_struct('a', 1, 'b', null)], [named_struct('a', 1,
'b', null)]))[0] as a;
+----
+NULL
+
statement ok
drop table tt;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]