junmuz opened a new issue, #6857:
URL: https://github.com/apache/paimon/issues/6857

   ### Search before asking
   
   - [x] I searched in the [issues](https://github.com/apache/paimon/issues) 
and found nothing similar.
   
   
   ### Paimon version
   
   1.3.1
   
   ### Compute Engine
   
   Spark / Flink
   
   ### Minimal reproduce step
   
   - First create a test table with write-only explicitly set as true to 
disable the compactions
   
       ```spark.sql("CREATE` TABLE paimon.test_db.test_table (id BIGINT NOT 
NULL, value STRING NOT NULL)  TBLPROPERTIES ('changelog-producer' = 'lookup', 
'primary-key' = 'id', 'write-only' = 'true')")```
   
   - Insert some data into the test table.
       ```spark.sql("INSERT INTO paimon.test_db.test_table (id, value) VALUES 
(1, 'one')")```
   
   - Changelog files aren't generated.
       ```
       >>> spark.sql("SELECT * from 
paimon.test_db.test_table").show(truncate=False)
       +---+-----+
       |id |value|
       +---+-----+
       |1  |one  |
       +---+-----+
       >>> spark.sql("SELECT * from 
paimon_incremental_query('paimon.test_db.test_table', 0, 
1)").show(truncate=False)
       +---+-----+
       |id |value|
       +---+-----+
       +---+-----+
       ```
   - Querying the snapshot table, I can confirm compaction is not triggered.
      ```
       >>> spark.sql("SELECT snapshot_id, commit_kind from 
paimon.test_db.`test_table$snapshots`").show(truncate=False)
       +-----------+-----------+
       |snapshot_id|commit_kind|
       +-----------+-----------+
       |1          |APPEND     |
       +-----------+-----------+
       ```
   
   
   
   ### What doesn't meet your expectations?
   
   The 
[documentation](https://paimon.apache.org/docs/master/primary-key-table/changelog-producer/#lookup)
 mentions that changelog files will be generated before committing written 
data, however that's not the case and this happens on compaction.
   
   ### Anything else?
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [x] I'm willing to submit a PR!


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

Reply via email to