Lordworms commented on issue #9354:
URL: 
https://github.com/apache/arrow-datafusion/issues/9354#issuecomment-1969083816

   > I think this type of construct is called a `TableFunction` and we can 
define them in DataFUsion
   > 
   > This is how we implement the `parquet_metadata` function in 
datafusion-cli: https://arrow.apache.org/datafusion/user-guide/cli.html
   > 
   > ```sql
   > SELECT path_in_schema, row_group_id, row_group_num_rows, stats_min, 
stats_max, total_compressed_size
   > FROM parquet_metadata('hits.parquet')
   > WHERE path_in_schema = '"WatchID"'
   > LIMIT 3;
   > 
   > 
+----------------+--------------+--------------------+---------------------+---------------------+-----------------------+
   > | path_in_schema | row_group_id | row_group_num_rows | stats_min           
| stats_max           | total_compressed_size |
   > 
+----------------+--------------+--------------------+---------------------+---------------------+-----------------------+
   > | "WatchID"      | 0            | 450560             | 4611687214012840539 
| 9223369186199968220 | 3883759               |
   > | "WatchID"      | 1            | 612174             | 4611689135232456464 
| 9223371478009085789 | 5176803               |
   > | "WatchID"      | 2            | 344064             | 4611692774829951781 
| 9223363791697310021 | 3031680               |
   > 
+----------------+--------------+--------------------+---------------------+---------------------+-----------------------+
   > 3 rows in set. Query took 0.053 seconds.
   > ```
   > 
   > Thus I think for this particular issue, we could implement a Table 
function `range`and register it via 
https://docs.rs/datafusion/latest/datafusion/execution/context/struct.SessionContext.html#method.register_udtf
   
   Got it


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