You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2021/08/12 16:42:00 UTC
[jira] [Commented] (SOLR-15579) SQL WHERE filter with 20 or more
values in the IN clause results in no filtering on that field
[ https://issues.apache.org/jira/browse/SOLR-15579?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17398166#comment-17398166 ]
ASF subversion and git services commented on SOLR-15579:
--------------------------------------------------------
Commit 38848e62b246ff41fffb4347efd56c949a7b6f49 in solr's branch refs/heads/main from Timothy Potter
[ https://gitbox.apache.org/repos/asf?p=solr.git;h=38848e6 ]
SOLR-15579: Re-configure calcite to allow more values in an IN clause (#249)
> 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
> Priority: Major
> Labels: RobustSQL
> Time Spent: 20m
> Remaining Estimate: 0h
>
> 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