MOBIN-F commented on pull request #3095:
URL: https://github.com/apache/iceberg/pull/3095#issuecomment-950653689


   I merged this PR and did some testing and when I update a record, it 
actually inserts a new record
   
   Flink SQL> CREATE TABLE iceberg_table_upsert8(
   >     id   BIGINT,
   >     data STRING,
   >     PRIMARY KEY (id) NOT ENFORCED
   > ) WITH (
   >      'connector'='iceberg',
   >      'format-version' = '2',
   >      'catalog-name'='hive_prod',
   >      'catalog-type'='hive',
   >      'write.upsert.enable'='true',
   >      'uri'='thrift://localhost:9083',
   >      'warehouse'='file:///tmp/iceberg/'
   > );
   
   INSERT INTO iceberg_table_upsert1 VALUES(1,'qq');
   
   INSERT INTO iceberg_table_upsert1 VALUES(1,'aa');
   
   Flink SQL> SELECT * FROM iceberg_table_upsert8 /*+ 
OPTIONS('streaming'='true', 'monitor-interval'='1s')*/ ;
   +----+----------------------+--------------------------------+
   | op |                   id |                           data |
   +----+----------------------+--------------------------------+
   | -D |                    1 |                             qq |
   | +I |                    1 |                             qq |
   | -D |                    1 |                             aa |
   | +I |                    1 |                             aa |
   
   When I use Flink Batch query table ,it has tow records
   Flink SQL> select * from iceberg_table_upsert8;
   +----+----------------------+--------------------------------+
   | op |                   id |                           data |
   +----+----------------------+--------------------------------+
   | +I |                    1 |                             qq |
   | +I |                    1 |                             aa |
   +----+----------------------+--------------------------------+
   Received a total of 2 rows


-- 
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