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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to