Zoltan Borok-Nagy has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/22407 )

Change subject: IMPALA-12588: Don't UPDATE rows that already have the desired 
value
......................................................................


Patch Set 8:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/22407/8/common/thrift/Query.thrift
File common/thrift/Query.thrift:

http://gerrit.cloudera.org:8080/#/c/22407/8/common/thrift/Query.thrift@773
PS8, Line 773: 10
It would be nice to get some idea about the perf implications.

 create table ice_lineitem
 stored as iceberg
 tblproperties ('format-version'='2')
     as select * from tpch_parquet.lineitem;

 -- 1 assignment
 update t set
   t.l_suppkey = s.l_suppkey
 from ice_lineitem t join ice_lineitem s
 on t.l_orderkey=s.l_orderkey and t.l_linenumber=s.l_linenumber;

 -- 2 assignment
 update t set
    t.l_suppkey = s.l_suppkey,
    t.l_partkey=s.l_partkey
 from ice_lineitem t join ice_lineitem s
 on t.l_orderkey=s.l_orderkey and t.l_linenumber=s.l_linenumber;

 -- 3 assignment
 update t set
    t.l_suppkey = s.l_suppkey,
    t.l_partkey=s.l_partkey,
    t.l_quantity=s.l_quantity
 from ice_lineitem t join ice_lineitem s
 on t.l_orderkey=s.l_orderkey and t.l_linenumber=s.l_linenumber;

 -- 4 assignment
 update t set
    t.l_suppkey = s.l_suppkey,
    t.l_partkey=s.l_partkey,
    t.l_quantity=s.l_quantity,
    t.l_returnflag=s.l_returnflag
 from ice_lineitem t join ice_lineitem s
 on t.l_orderkey=s.l_orderkey and t.l_linenumber=s.l_linenumber;

 -- 5 assignment
 update t set
    t.l_suppkey = s.l_suppkey,
    t.l_partkey=s.l_partkey,
    t.l_quantity=s.l_quantity,
    t.l_returnflag=s.l_returnflag,
    t.l_shipmode=s.l_shipmode
 from ice_lineitem t join ice_lineitem s
 on t.l_orderkey=s.l_orderkey and t.l_linenumber=s.l_linenumber;

If the runtime increases aggressively then probably we should bail out early. 
Especially that the more predicates we have the lower are the chances of 
benefitting from this optimization.



--
To view, visit http://gerrit.cloudera.org:8080/22407
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I926c80e8110de5a4615a3624a81a330f54317c8b
Gerrit-Change-Number: 22407
Gerrit-PatchSet: 8
Gerrit-Owner: Noemi Pap-Takacs <[email protected]>
Gerrit-Reviewer: Daniel Becker <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Noemi Pap-Takacs <[email protected]>
Gerrit-Reviewer: Peter Rozsa <[email protected]>
Gerrit-Reviewer: Steve Carlin <[email protected]>
Gerrit-Reviewer: Zoltan Borok-Nagy <[email protected]>
Gerrit-Comment-Date: Tue, 25 Feb 2025 18:20:07 +0000
Gerrit-HasComments: Yes

Reply via email to