trino
trino copied to clipboard
Use SortedPositionLink for BETWEEN joins
Currently, we use inequality joins only for expressions like probe_symbol < build_symbol AND probe_symbol + 1 > build_symbol
, but we don't inequality join for probe_symbol <> build_symbol
.
Affected queries:
tpch/q21
tpcds/q16
tpcds/q19
tpcds/q46
tpcds/q64
tpcds/q68
tpcds/q94
tpcds/q95
It would be great to know how big build side per hash entry in these joins in order to determine if such optimization makes sense. cc @skrzypo987 @lukasz-stec