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

   ### Search before asking
   
   - [x] I searched in the [issues](https://github.com/apache/paimon/issues) 
and found nothing similar.
   
   
   ### Paimon version
   
   1.3
   
   ### Compute Engine
   
   spark
   
   ### Minimal reproduce step
   
   ```python
   class RESTCatalogTestCase(unittest.TestCase):
   
       def test_write(self):
           """Example usage of RESTCatalogServer"""
           # Setup logging
           logging.basicConfig(level=logging.INFO)
           options = {
               'metastore': 'rest',
               'uri': "https://cn-shanghai-vpc.dlf.aliyuncs.com";,
               'warehouse': 'lakehouse_rnd',
               'dlf.region': 'cn-shanghai',
               "token.provider": "dlf",
               'dlf.access-key-id': os.getenv("DLF_ACCESS_KEY_ID"),
               'dlf.access-key-secret': os.getenv("DLF_ACCESS_KEY_SECRET"),
               'data.token.enabled': 'true'
           }
           catalog = CatalogFactory.create(options)
           table =catalog.get_table("adn.test")
   
           import random
   
           num_rows = 20000
           data = {
               'f0': [f'value_{i}' for i in range(num_rows)],
               'f1': [random.choice(['A', 'B', 'C', 'D', 'E']) for _ in 
range(num_rows)],
               'f2': [f'detail_{random.randint(1, 1000)}' for _ in 
range(num_rows)],
               'f3': [f'id_{i:06d}' for i in range(num_rows)],
               'dt': [f'2025-{random.randint(1, 12):02d}-{random.randint(1, 
28):02d}' for _ in range(num_rows)]
           }
           # 将字典转换为PyArrow RecordBatch
           arrow_batch = pa.RecordBatch.from_pydict(data)
   
           write_builder = table.new_batch_write_builder()
           table_write = write_builder.new_write()
           table_commit = write_builder.new_commit()
           table_write.write_arrow_batch(arrow_batch)
           commit_messages = table_write.prepare_commit()
           table_commit.commit(commit_messages)
           table_write.close()
           table_commit.close()
   ```
   
   ### What doesn't meet your expectations?
   
   <img width="1086" height="484" alt="Image" 
src="https://github.com/user-attachments/assets/776d3678-41a2-4cc2-8418-db5ceade7e85";
 />
   
   As shown in the image, both the total number of rows in the table and the 
number of rows added in this commit are empty, while they are expected to have 
values.
   
   ### Anything else?
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [ ] 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