[
https://issues.apache.org/jira/browse/CALCITE-5884?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Benchao Li resolved CALCITE-5884.
---------------------------------
Resolution: Fixed
Fixed via
[https://github.com/apache/calcite/commit/4c9011c388f826c36463ae7da875ddb525104376]
Thanks for the contribution [~mbudiu]
> ARRAY_TO_STRING function should return NULL if its 'nullValue' argument is
> NULL
> -------------------------------------------------------------------------------
>
> Key: CALCITE-5884
> URL: https://issues.apache.org/jira/browse/CALCITE-5884
> Project: Calcite
> Issue Type: Bug
> Components: core
> Affects Versions: 1.35.0
> Reporter: Mihai Budiu
> Assignee: Mihai Budiu
> Priority: Trivial
> Labels: pull-request-available
> Fix For: 1.36.0
>
>
> This is the current definition of the function ARRAY_TO_STRING in
> SqlLibraryOperators:
> {code:java}
> /** The "ARRAY_TO_STRING(array, delimiter [, nullText ])" function. */
> @LibraryOperator(libraries = {BIG_QUERY})
> public static final SqlFunction ARRAY_TO_STRING =
> SqlBasicFunction.create(SqlKind.ARRAY_TO_STRING,
> ReturnTypes.VARCHAR_NULLABLE,
> OperandTypes.STRING_ARRAY_CHARACTER_OPTIONAL_CHARACTER);
> {code}
> So the result is nullable if any of the arguments is nullable. However, the
> nullability of the last argument does not influence the result nullabillity:
> a NULL value for the third optional argument will not cause a NULL value to
> be output.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)