Hi,

I am encountering a problem in Calcite that causes my query to result in an
StackOverflow exception. A simple query that can reproduces this issue is
something liken SELECT ARRAY ['Hello', NULL]

I believe this is the cause (and also the fix)
https://issues.apache.org/jira/browse/CALCITE-3845
However, we are still currently using Calcite 1.21.0 which does not have
this fix (fix above is in 1.23.0). I found that a workaround that can work
without upgrading Calcite is to set currentProgram.matchLimit. I was able
to confirm that the workaround (setting a limit on matchLimit) fixes this
issue without needing to upgrade. I am wondering if there is any
recommendation on a sensible value to use for the matchLimit
for HepProgramBuilder?

The default value is Integer.MAX_VALUE which I don't think will ever be
possible due to stack / memory limitations.

- Maytas

Reply via email to