udf: unimplemented: SELECT usage inside a function definition (when using EXISTS) #88373
Labels
A-sql-routine
UDFs and Stored Procedures
C-bug
Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
O-qa
T-sql-foundations
SQL Foundations Team (formerly SQL Schema + SQL Sessions)
Not sure if this is allowed, but when trying to use
WHERE EXISTS (SELECT ...)
inside a UDF I get anunimplemented: SELECT usage inside a function definition
error. Creating functions with the same query, rewritten in different ways, does not err.Here's the reproduction. It's kind of a silly semi-join query, finding the first value for which there exists value + 1 in the same table.
All three versions of the query should be the same. Functions can be made with the first two, but not with the last:
I would expect the
WHERE EXISTS (SELECT ...)
version to also work.This is on
v22.2.0-alpha.3-421-g77c412dfef
(tip of master).Jira issue: CRDB-19789
The text was updated successfully, but these errors were encountered: