Copilot commented on code in PR #24483:
URL: https://github.com/apache/datafusion/pull/24483#discussion_r3867555126


##########
datafusion/datasource/src/file_scan_config/proto.rs:
##########
@@ -245,14 +250,23 @@ impl FileScanConfig {
             file_source
         };
 
+        let limit = conf
+            .limit
+            .as_ref()
+            .map(|limit| usize_from_wire(limit.limit, "FileScanConfig", 
"limit"))
+            .transpose()?;
+        let batch_size = conf
+            .batch_size
+            .map(|size| usize_from_wire(size, "FileScanConfig", "batch_size"))
+            .transpose()?;

Review Comment:
   An explicitly encoded `batch_size = 0` is still accepted here. Because this 
protobuf field is optional, `None` already represents the legacy/default case; 
`Some(0)` should be rejected rather than propagated through 
`FileScanConfig::open_with_args` into CSV/JSON/Parquet/Avro readers as an 
invalid batch size.



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