Petr Masopust created CALCITE-6068: -------------------------------------- Summary: Whitespaces are removed from filter values Key: CALCITE-6068 URL: https://issues.apache.org/jira/browse/CALCITE-6068 Project: Calcite Issue Type: Bug Affects Versions: 1.35.0 Reporter: Petr Masopust
SqlImplementor.java has hardcoded "true" for trimming whitespaces in Context.toIn method (https://github.com/apache/calcite/blob/c83ac69111fd9e75af5e3615af29a72284667a4a/core/src/main/java/org/apache/calcite/rel/rel2sql/SqlImplementor.java#L908). This makes troubles for our customer who use values like "Value 1 " etc. (don't ask me why). E.g. val filter = relBuilder.`in`( opportunityId, relBuilder.literal("value 1 "), relBuilder.literal("value 2 ") ) is translated to "id" IN ('value 1', 'value 2') WITHOUT spaces at the end. I don't know why is such trimming implemented but calcite should not touch user inputs. Please make this at least configurable because I don't know any workaround. Obvious one with OR and equalities is optimized to IN and trimmed too. -- This message was sent by Atlassian Jira (v8.20.10#820010)