alamb commented on a change in pull request #1987:
URL: https://github.com/apache/arrow-datafusion/pull/1987#discussion_r825343741
##########
File path: datafusion/src/execution/context.rs
##########
@@ -1220,6 +1233,74 @@ impl FunctionRegistry for ExecutionContextState {
}
}
+/// Task Context Properties
+pub enum TaskProperties {
Review comment:
I think this change is important (though we could do it as a follow on
PR)
Otherwise I was forced to use the following code in
https://github.com/influxdata/influxdb_iox/pull/4023 to get the batch size
which was quite messy:
```rust
async fn execute(
&self,
_partition: usize,
context: Arc<TaskContext>,
) -> DataFusionResult<SendableRecordBatchStream> {
let batch_size = {
if let TaskProperties::SessionConfig(config) =
&context.task_settings {
config.runtime.batch_size
} else {
todo!("Need to always have properties")
}
};
```
--
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]