NobiGo commented on PR #4057:
URL: https://github.com/apache/calcite/pull/4057#issuecomment-2502511425

   > Does it solve them by rejecting the illegal queries or by rewriting them 
into a different query that is legal?
   
   We can't reject this query because we have supported it. 
https://github.com/apache/calcite/blob/main/core/src/test/resources/sql/some.iq#L515
   It returns the right result because It converted to OR condition.` (the 
SqlNodeList's size is less than config.getInSubQueryThreshold())`.
   But if we set `config.getInSubQueryThreshold()` less than the SqlNodeList's 
size. The Sql will return the wrong answer.
   
   This PR resolved it by converting SqlNodeList to Values is legal? I think it 
is legal. The results of these two SQL statements are actually consistent, or 
in other words, the expression of Values is a more standard way of writing SQL 
NodeList subqueries. WDYT?


-- 
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