aprimadi commented on code in PR #6414:
URL: https://github.com/apache/arrow-datafusion/pull/6414#discussion_r1209445303
##########
benchmarks/expected-plans/q12.txt:
##########
@@ -7,7 +7,7 @@
| | Projection: lineitem.l_shipmode,
orders.o_orderpriority
|
| | Inner Join: lineitem.l_orderkey = orders.o_orderkey
|
| | Projection: lineitem.l_orderkey,
lineitem.l_shipmode
|
-| | Filter: (lineitem.l_shipmode = Utf8("SHIP") OR
lineitem.l_shipmode = Utf8("MAIL")) AND lineitem.l_commitdate <
lineitem.l_receiptdate AND lineitem.l_shipdate < lineitem.l_commitdate AND
lineitem.l_receiptdate >= Date32("8766") AND lineitem.l_receiptdate <
Date32("9131")
|
+| | Filter: (lineitem.l_shipmode = Utf8("MAIL") OR
lineitem.l_shipmode = Utf8("SHIP")) AND lineitem.l_commitdate <
lineitem.l_receiptdate AND lineitem.l_shipdate < lineitem.l_commitdate AND
lineitem.l_receiptdate >= Date32("8766") AND lineitem.l_receiptdate <
Date32("9131")
|
Review Comment:
Also, pretty sure that the current code actually preserves the ordering.
Previous code messes up the ordering of IN LIST. Actual query:
https://github.com/apache/arrow-datafusion/blob/main/benchmarks/queries/q12.sql
```
select
l_shipmode,
sum(case
when o_orderpriority = '1-URGENT'
or o_orderpriority = '2-HIGH'
then 1
else 0
end) as high_line_count,
sum(case
when o_orderpriority <> '1-URGENT'
and o_orderpriority <> '2-HIGH'
then 1
else 0
end) as low_line_count
from
lineitem
join
orders
on
l_orderkey = o_orderkey
where
l_shipmode in ('MAIL', 'SHIP')
and l_commitdate < l_receiptdate
and l_shipdate < l_commitdate
and l_receiptdate >= date '1994-01-01'
and l_receiptdate < date '1995-01-01'
group by
l_shipmode
order by
l_shipmode;
```
--
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]