Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/sql/src/func.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1627,6 +1627,17 @@ fn coerce_args_to_types(
// polymorphic type.
PlanError::UnsolvablePolymorphicFunctionInput
})?;
if let SqlScalarType::Array(elem) = &target {
if matches!(
**elem,
SqlScalarType::List { .. } | SqlScalarType::Map { .. }
) {
bail_unsupported!(format!(
"{}[]",
ecx.humanize_sql_scalar_type(elem, false)
));
}
}
do_convert(cexpr, &target)?
}
};
Expand Down
15 changes: 15 additions & 0 deletions test/sqllogictest/arrays.slt
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,21 @@ SELECT array_remove(ARRAY[1,1,1], 1)
query error removing elements from multidimensional arrays is not supported
SELECT array_remove(ARRAY[[1]], 1)

query error integer list\[\] not yet supported
SELECT array_remove(NULL, LIST[1])

query error map\[text=>integer\]\[\] not yet supported
SELECT array_remove(NULL, '{a=>1}'::map[text=>int4])

statement ok
CREATE TABLE t0 (c3 int4 list)

query error integer list\[\] not yet supported
SELECT array_remove('[2020-01-01,2021-01-01)', t0.c3) AS col0 FROM t0

statement ok
DROP TABLE t0

# array_cat

query T
Expand Down
Loading