Hi,

I'm using Calcite for a project and am attempting to implement the behavior
for ANY/ALL such as:

SELECT ... FROM ... WHERE a = ANY(SELECT ...)

When I attempt to have Calcite create a plan for this query, I get the
runtime exception from here:
https://github.com/apache/calcite/blob/717eb59a73e2b456266da1af5ff9b881b6f7eeed/core/src/main/java/org/apache/calcite/sql2rel/SqlToRelConverter.java#L5319

withExpand = true is the default behavior and, in other cases like HAVING,
it produces a more desirable plan so I'd prefer to keep withExpand to its
default value rather than overriding it. Is there a way to allow subqueries
to be expanded while also allowing subqueries that can't be expanded to
stay as subqueries? Would Calcite be open to a change that allowed this
behavior?

Thanks.

--Jonathan Sternberg

Reply via email to