Repository navigation
Conversation
genezhang
requested changes
Nov 15, 2026
genezhang
left a comment
Owner
There was a problem hiding this comment.
Thanks for taking #1419. The generated SQL calls a function that ClickHouse does not have, so the query still fails.
Repro (db_standard, ClickHouse 26.7.1 and 25.8.33):
MATCH (u:User) UNWIND u.name AS x RETURN x ORDER BY x
-- main: Code 43 "Argument 0 for function arrayConcat must be an array but it has type String"
-- PR: Code 46 "Function with name `isArray` does not exist"
SELECT isArray([1]) gives Code 46 on both versions. The same happens for UNWIND u.user_id. The lowering test was edited to expect the new SQL text, so it passes without the query ever being run.
Beyond the missing function
- ClickHouse is statically typed, and
if(cond, x, [x])needsxand[x]to have a common type. Even with a real predicate, a column that is aStringin one branch and anArray(String)in the other cannot be chosen between at run time. The decision has to come from what is known at lowering time. The typed path already does this: for a declared integer property the test above expectsif(isNull(v0.age), [], [v0.age]). - The old comment on
list_onlysays it is "an identity of arrays that refuses a map". The new spelling would wrap a map in a one-element list, which changes behaviour and is not discussed. - The column expression is repeated four times in the SQL, so a non-deterministic one such as
rand()could take different values in each place.
A real fix probably needs the property's type from the schema's column_types (T1) rather than a runtime test. I'd suggest running the query against a ClickHouse container before updating a test expectation to match new SQL.
Happy to re-review.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
list_only on ClickHouse now wraps a non-array value in an array instead of calling arrayConcat (which fails on strings). Fixes UNWIND of a property with undeclared type.