Skip to content

Commit

Permalink
s TODO comment for future tests
Browse files Browse the repository at this point in the history
add TODO comment for future tests
  • Loading branch information
Weijun-H committed Jan 2, 2024
1 parent 24a0c11 commit 2cbb397
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion datafusion/expr/src/type_coercion/functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ fn get_valid_types(
Ok(vec![vec![elem_type.to_owned(), array_type.clone()]])
}
}
_ => {Ok(vec![vec![]])},
_ => Ok(vec![vec![]]),
}
}
let valid_types = match signature {
Expand Down
10 changes: 10 additions & 0 deletions datafusion/sqllogictest/test_files/array.slt
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ AS VALUES
(make_array(make_array(4, 5, 6), make_array(10, 11, 12), make_array(4, 9, 8), make_array(7, 8, 9), make_array(10, 11, 12), make_array(1, 8, 7)), make_array(10, 11, 12), 3, make_array([[11, 12, 13], [14, 15, 16]], [[17, 18, 19], [20, 21, 22]]), make_array(121, 131, 141))
;

# TODO: add this when #8305 is fixed
# statement ok
# CREATE TABLE large_nested_arrays
# AS
Expand Down Expand Up @@ -154,6 +155,7 @@ AS VALUES
(NULL, NULL, NULL, NULL)
;

# TODO: add this when #8305 is fixed
# statement ok
# CREATE TABLE large_arrays_values_v2
# AS SELECT
Expand Down Expand Up @@ -1563,6 +1565,7 @@ select
----
[4] [] [1, , 3, 4] [, , 1]

# TODO: add this when #8305 is fixed
# query ????
# select
# array_append(arrow_cast(make_array(), 'LargeList(Null)'), 4),
Expand Down Expand Up @@ -1590,6 +1593,7 @@ select
----
[[1, , 3], []] [[1, , 3], ]

# TODO: add this when #8305 is fixed
# query ??
# select
# array_append(arrow_cast(make_array(make_array(1, null, 3), 'LargeList(LargeList(Int64))')), arrow_cast(make_array(null), 'LargeList(Int64)')),
Expand All @@ -1614,6 +1618,7 @@ select array_append(make_array([1], [2], [3]), make_array(4)), array_append(make
----
[[1], [2], [3], [4]] [[1.0], [2.0], [3.0], [4.0]] [[h], [e], [l], [l], [o]]

# TODO: add this when #8305 is fixed
# query ???
# select array_append(arrow_cast(make_array([1], [2], [3]), 'LargeList(LargeList(Int64))'), arrow_cast(make_array(4), 'LargeList(Int64)')), array_append(arrow_cast(make_array([1.0], [2.0], [3.0]), 'LargeList(LargeList(Float64))'), arrow_cast(make_array(4.0), 'LargeList(Float64)')), array_append(arrow_cast(make_array(['h'], ['e'], ['l'], ['l']), 'LargeList(LargeList(Utf8))'), arrow_cast(make_array('o'), 'LargeList(Utf8)'));
# ----
Expand Down Expand Up @@ -1684,6 +1689,7 @@ select array_append(column1, column2) from nested_arrays;
[[1, 2, 3], [2, 9, 1], [7, 8, 9], [1, 2, 3], [1, 7, 4], [4, 5, 6], [7, 8, 9]]
[[4, 5, 6], [10, 11, 12], [4, 9, 8], [7, 8, 9], [10, 11, 12], [1, 8, 7], [10, 11, 12]]

# TODO: add this when #8305 is fixed
# query ?
# select array_append(column1, column2) from large_nested_arrays;
# ----
Expand Down Expand Up @@ -1720,6 +1726,7 @@ select array_append(column1, make_array(1, 11, 111)), array_append(make_array(ma
[[1, 2, 3], [2, 9, 1], [7, 8, 9], [1, 2, 3], [1, 7, 4], [4, 5, 6], [1, 11, 111]] [[1, 2, 3], [11, 12, 13], [7, 8, 9]]
[[4, 5, 6], [10, 11, 12], [4, 9, 8], [7, 8, 9], [10, 11, 12], [1, 8, 7], [1, 11, 111]] [[1, 2, 3], [11, 12, 13], [10, 11, 12]]

# TODO: add this when #8305 is fixed
# query ??
# select array_append(column1, arrow_cast(make_array(1, 11, 111), 'LargeList(Int64)')), array_append(arrow_cast(make_array(make_array(1, 2, 3), make_array(11, 12, 13)), 'LargeList(LargeList(Int64))'), column2) from large_nested_arrays;
# ----
Expand Down Expand Up @@ -1798,6 +1805,7 @@ select array_prepend(make_array(1), make_array(make_array(2), make_array(3), mak
----
[[1], [2], [3], [4]] [[1.0], [2.0], [3.0], [4.0]] [[h], [e], [l], [l], [o]]

# TODO: add this when #8305 is fixed
# query ???
# select array_prepend(arrow_cast(make_array(1), 'LargeList(Int64)'), arrow_cast(make_array(make_array(2), make_array(3), make_array(4)), 'LargeList(LargeList(Int64))')), array_prepend(arrow_cast(make_array(1.0), 'LargeList(Float64)'), arrow_cast(make_array([2.0], [3.0], [4.0]), 'LargeList(LargeList(Float64))')), array_prepend(arrow_cast(make_array('h'), 'LargeList(Utf8)'), arrow_cast(make_array(['e'], ['l'], ['l'], ['o']), 'LargeList(LargeList(Utf8))''));
# ----
Expand Down Expand Up @@ -1868,6 +1876,7 @@ select array_prepend(column2, column1) from nested_arrays;
[[7, 8, 9], [1, 2, 3], [2, 9, 1], [7, 8, 9], [1, 2, 3], [1, 7, 4], [4, 5, 6]]
[[10, 11, 12], [4, 5, 6], [10, 11, 12], [4, 9, 8], [7, 8, 9], [10, 11, 12], [1, 8, 7]]

# TODO: add this when #8305 is fixed
# query ?
# select array_prepend(column2, column1) from large_nested_arrays;
# ----
Expand Down Expand Up @@ -1904,6 +1913,7 @@ select array_prepend(make_array(1, 11, 111), column1), array_prepend(column2, ma
[[1, 11, 111], [1, 2, 3], [2, 9, 1], [7, 8, 9], [1, 2, 3], [1, 7, 4], [4, 5, 6]] [[7, 8, 9], [1, 2, 3], [11, 12, 13]]
[[1, 11, 111], [4, 5, 6], [10, 11, 12], [4, 9, 8], [7, 8, 9], [10, 11, 12], [1, 8, 7]] [[10, 11, 12], [1, 2, 3], [11, 12, 13]]

# TODO: add this when #8305 is fixed
# query ??
# select array_prepend(arrow_cast(make_array(1, 11, 111), 'LargeList(Int64)'), column1), array_prepend(column2, arrow_cast(make_array(make_array(1, 2, 3), make_array(11, 12, 13)), 'LargeList(LargeList(Int64))')) from large_nested_arrays;
# ----
Expand Down

0 comments on commit 2cbb397

Please sign in to comment.