asdf2014 commented on code in PR #16388:
URL: https://github.com/apache/druid/pull/16388#discussion_r1594927998


##########
docs/querying/sql-query-context.md:
##########
@@ -52,7 +52,9 @@ Configure Druid SQL query planning using the parameters in 
the table below.
 |`sqlPullUpLookup`|Whether to consider the [pull-up 
rewrite](lookups.md#pull-up) of the `LOOKUP` function during SQL planning.|true|
 |`enableJoinLeftTableScanDirect`|`false`|This flag applies to queries which 
have joins. For joins, where left child is a simple scan with a filter,  by 
default, druid will run the scan as a query and the join the results to the 
right child on broker. Setting this flag to true overrides that behavior and 
druid will attempt to push the join to data servers instead. Please note that 
the flag could be applicable to queries even if there is no explicit join. 
since queries can internally translated into a join by the SQL planner.|
 |`maxNumericInFilters`|`-1`|Max limit for the amount of numeric values that 
can be compared for a string type dimension when the entire SQL WHERE clause of 
a query translates only to an [OR](../querying/filters.md#or) of [Bound 
filter](../querying/filters.md#bound-filter). By default, Druid does not 
restrict the amount of of numeric Bound Filters on String columns, although 
this situation may block other queries from running. Set this parameter to a 
smaller value to prevent Druid from running queries that have prohibitively 
long segment processing times. The optimal limit requires some trial and error; 
we recommend starting with 100.  Users who submit a query that exceeds the 
limit of `maxNumericInFilters` should instead rewrite their queries to use 
strings in the `WHERE` clause instead of numbers. For example, `WHERE 
someString IN (‘123’, ‘456’)`. This value cannot exceed the set system 
configuration `druid.sql.planner.maxNumericInFilters`. This value is ignored if 
`druid.s
 ql.planner.maxNumericInFilters` is not set explicitly.|
-|`inSubQueryThreshold`|`2147483647`| Threshold for minimum number of values in 
an IN clause to convert the query to a JOIN operation on an inlined table 
rather than a predicate. A threshold of 0 forces usage of an inline table in 
all cases; a threshold of [Integer.MAX_VALUE] forces usage of OR in all cases. |
+|`inFunctionThreshold`|`100`| At or beyond this threshold number of values, 
SQL `IN` is converted to [`SCALAR_IN_ARRAY`](sql-functions.md#scalar_in_array). 
A threshold of 0 forces this conversion in all cases. A threshold of 
[Integer.MAX_VALUE] disables this conversion. The converted function is 
eligible for fewer planning-time optimizations, which speeds up planning, but 
may prevent certain planning-time optimizations.|
+|`inFunctionExprThreshold`|`2`| At or beyond this threshold number of values, 
SQL `IN` is eligible for execution using the native function `scalar_in_array` 
rather than an `||` of `==`, even if the number of values is below 
`inFunctionThreshold`. This property only affects translation of SQL `IN` to a 
[native expression](math-expr.md). It does not affect translation of SQL `IN` 
to a [native filter](filters.md). This property is provided for backwards 
compatibility purposes, and may be removed in a future release.|

Review Comment:
   ```suggestion
   |`inFunctionExprThreshold`|`2`| At or beyond this threshold number of 
values, SQL `IN` is eligible for execution using the native function 
`scalar_in_array` rather than an <code>&#124;&#124;</code> of `==`, even if the 
number of values is below `inFunctionThreshold`. This property only affects 
translation of SQL `IN` to a [native expression](math-expr.md). It does not 
affect translation of SQL `IN` to a [native filter](filters.md). This property 
is provided for backwards compatibility purposes, and may be removed in a 
future release.|
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to