You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Postgres one can use a column value for the boolean value to
`array_sort()` that indicates whether the sort should be reversed. In
ClickHouse reverse sort requires a different function, so we can't use a
dynamic value. When 1f2dedd added `array_sort()`, it simply pretended
that a dynamic argument wasn't present and would always sort without
reverse, which could be surprising.
So move the determination of whether the boolean value is passed as a
dynamic expression from `deparseFuncExpr()`, which is called and
execution time, to `chfdw_is_shippable()`, which is called at planning
time. This requires a node to be passed to `chfdw_is_shippable()` so it
can evaluate the arguments, so add it as a parameter.
Move the setting of the function name to the `CF_ARRAY_SORT_DESC` case
of the switch statement in `deparseFuncExpr()` to ensure we don't
overwrite the name in the cache of function definitions kept by
`chfdw_check_for_custom_function()`.
Add a test to validate that a dynamic argument causes the expression not
to be passed down, and put it before the use of a constant to ensure
that the function name isn't overwritten.
0 commit comments