klboke commented on issue #6140:
URL: https://github.com/apache/paimon/issues/6140#issuecomment-3265891481

   ```python
       def test_reader(self):
           """Example usage of RESTCatalogServer"""
           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'
           }
           rest_catalog = 
RESTCatalog(CatalogContext.create_from_options(Options(options)))
           table = rest_catalog.get_table('adn.wide_table_200cols')
           predicate_builder = table.new_read_builder().new_predicate_builder()
           read_builder = (table.new_read_builder()
           .with_projection(['f0', 'f1'])
           .with_filter(
               predicate=predicate_builder.equal("dt", "2025-09-01")))
           table_read = read_builder.new_read()
           splits = read_builder.new_scan().plan().splits()
           print(table_read.to_arrow(splits).num_rows)
   
   ```
   The code above raises the following exception — could this be caused by 
mismatched software versions? Could you list the compatible dependencies, for 
example the pyarrow version?
   ``` python
   Error
   Traceback (most recent call last):
     File 
"/Users/kl/githubnamespace/paimon/paimon-python/pypaimon/tests/reader_test_kl.py",
 line 66, in test_reader
       print(table_read.to_arrow(splits).num_rows)
     File 
"/Users/kl/githubnamespace/paimon/paimon-python/pypaimon/read/table_read.py", 
line 64, in to_arrow
       arrow_table = batch_reader.read_all()
     File "pyarrow/ipc.pxi", line 556, in pyarrow.lib.RecordBatchReader.read_all
     File 
"/Users/kl/githubnamespace/paimon/paimon-python/pypaimon/read/table_read.py", 
line 74, in _arrow_batch_generator
       yield from iter(reader.read_arrow_batch, None)
     File 
"/Users/kl/githubnamespace/paimon/paimon-python/pypaimon/read/reader/concat_batch_reader.py",
 line 43, in read_arrow_batch
       self.current_reader = supplier()
     File 
"/Users/kl/githubnamespace/paimon/paimon-python/pypaimon/read/split_read.py", 
line 81, in file_reader_supplier
       self._get_final_read_data_fields(), self.push_down_predicate)
     File 
"/Users/kl/githubnamespace/paimon/paimon-python/pypaimon/read/reader/format_pyarrow_reader.py",
 line 37, in __init__
       self.reader = self.dataset.scanner(
   AttributeError: 'pyarrow._dataset.FileSystemDataset' object has no attribute 
'scanner'
   ```


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