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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to