friendlymatthew commented on code in PR #18253:
URL: https://github.com/apache/datafusion/pull/18253#discussion_r2466510221
##########
datafusion/datasource/src/file_scan_config.rs:
##########
@@ -317,10 +322,25 @@ impl FileScanConfigBuilder {
self
}
+ pub fn table_schema(&self) -> &SchemaRef {
+ self.table_schema.table_schema()
+ }
+
/// Set the columns on which to project the data. Indexes that are higher
than the
/// number of columns of `file_schema` refer to `table_partition_cols`.
- pub fn with_projection(mut self, projection: Option<Vec<usize>>) -> Self {
- self.projection = projection;
+ ///
+ /// # Deprecated
+ /// Use [`Self::with_projection_indices`] instead. This method will be
removed in a future release.
+ #[deprecated(since = "51.0.0", note = "Use with_projection_indices
instead")]
+ pub fn with_projection(self, indices: Option<Vec<usize>>) -> Self {
+ self.with_projection_indices(indices)
+ }
+
+ /// Set the columns on which to project the data using column indices.
+ ///
+ /// Indexes that are higher than the number of columns of `file_schema`
refer to `table_partition_cols`.
+ pub fn with_projection_indices(mut self, indices: Option<Vec<usize>>) ->
Self {
Review Comment:
> Is the idea here to "reserve" the with_projection API to accept a
&ProjectionExprs later on?
No, I'm planning to add `with_projection_exprs`. I just haven't wired it up
yet-- I'm working through this incrementally to fix the test breakages first
--
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]