Hi all, Having worked on a bug related to IN clauses, I believe I found an issue which has not been reported yet. When executing a query with more then 19 id's in the IN clause, an underflow exception is thrown.
I created a Jira ticket for this: https://issues.apache.org/jira/browse/CALCITE-1051 But besides this, I was wondering about the reason why a large IN clause is converted into a join to an inline table. (This happens in the SqlToRelConverter). More specifically how does this optimise the query execution? How would a storage engine be able to handle a join to an inline table more efficiently? Is this not a storage engine specific optimisation? Thank you ! Frankie
