Deprecate int64
as return type of array_length
and cardinality
#10285
Labels
Milestone
int64
as return type of array_length
and cardinality
#10285
The 2 functions return
integer
(int32) in PostgreSQL, but when they were first introduced in RisingWave, the return type was mistakenly implemented asbigint
(int64).This has been fixed by #10267 and new queries will generate plans with correct type. But we also allow old plans with
int64
to execute right now.We have several options:
cardinality(list) -> int32
andcardinality(list) -> int64
are considered valid function overloads. The frontend usesinfer_type_for_special
to select theint32
version. Note that most array functions requireinfer_type_for_special
anyways except forarray_to_string
/array-length
(singly-typed)/cardinality
(singly-typed).cardinality(list) -> int64
after we are confident it is not being used, possibly after we have a tool for users to transform an old-verson query plan to a new-version query plan.cardinality(list) -> int64
just buildcast(cardinality(list) -> int32) -> int64
. Note this cannot use thebuild_function
macro which still insertscardinality(list) -> int64
as a valid signature.The text was updated successfully, but these errors were encountered: