You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by "xuzifu666 (via GitHub)" <gi...@apache.org> on 2026/07/01 02:00:35 UTC
Re: [PR] [CALCITE-5261] UNION(ALL) inside of the CURSOR throws an exception while validating the query [calcite]
xuzifu666 commented on PR #5056:
URL: https://github.com/apache/calcite/pull/5056#issuecomment-4849583312
> Are there any quidem tests with cursor? (If so, it would be nice to have one, but maybe it's not supported)
Yes, That was my plan at first, too. But Maybe there is no way to add a quidem test for `CURSOR` alone either.
The reason is that `CURSOR` itself is not executable SQL. It is just a constructor that only makes sense as an argument to a table function. In Calcite, the only built-in function that accepts a `CURSOR` argument is `DEDUP`, which is a mock function without an actual execution implementor.
Since quidem is an end-to-end execution test framework:
- Without `DEDUP`, there is no function to wrap `CURSOR(...)`, so the SQL is not syntactically valid.
- With `DEDUP`, the execution phase fails because `DEDUP` has no Enumerable implementor.
I verified earlier that `select * from table(dedup(cursor(select ...), 'ENAME'))` passes validation and SqlToRel conversion, but fails at execution.
So `CURSOR` can only be covered in validator / SqlToRel converter unit tests for now, not in quidem. @mihaibudiu
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@calcite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org