You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "Timothy Potter (Jira)" <ji...@apache.org> on 2021/08/06 21:05:00 UTC
[jira] [Created] (SOLR-15579) SQL WHERE filter with 20 or more
values in the IN clause results in no filtering on that field
Timothy Potter created SOLR-15579:
-------------------------------------
Summary: SQL WHERE filter with 20 or more values in the IN clause results in no filtering on that field
Key: SOLR-15579
URL: https://issues.apache.org/jira/browse/SOLR-15579
Project: Solr
Issue Type: Bug
Security Level: Public (Default Security Level. Issues are Public)
Components: Parallel SQL
Reporter: Timothy Potter
Assignee: Timothy Potter
Calcite has a default threshold of 20 for the number of values in an {{IN}} clause. If this threshold is reached, then Calcite transforms the IN clause into an inline table + sub-query which is not handled by {{SolrFilter}}, so that filter clause gets dropped from the resulting query to Solr, see:
https://github.com/apache/calcite/blob/master/core/src/main/java/org/apache/calcite/sql2rel/SqlToRelConverter.java#L1143
The easiest solution is to update the {{config.withInSubQueryThreshold(Integer.MAX_VALUE)}}
I think we should also explore how to work with the sub-query against the inline table if possible.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org