alamb commented on code in PR #14898:
URL: https://github.com/apache/datafusion/pull/14898#discussion_r1971829934


##########
datafusion/datasource/src/source.rs:
##########
@@ -139,51 +142,50 @@ impl ExecutionPlan for DataSourceExec {
         partition: usize,
         context: Arc<TaskContext>,
     ) -> datafusion_common::Result<SendableRecordBatchStream> {
-        self.source.open(partition, context)
+        self.data_source.open(partition, context)
     }
 
     fn metrics(&self) -> Option<MetricsSet> {
-        Some(self.source.metrics().clone_inner())
+        Some(self.data_source.metrics().clone_inner())
     }
 
     fn statistics(&self) -> datafusion_common::Result<Statistics> {
-        self.source.statistics()
+        self.data_source.statistics()
     }
 
     fn with_fetch(&self, limit: Option<usize>) -> Option<Arc<dyn 
ExecutionPlan>> {
-        let mut source = Arc::clone(&self.source);
-        source = source.with_fetch(limit)?;
+        let data_source = self.data_source.with_fetch(limit)?;
         let cache = self.cache.clone();
 
-        Some(Arc::new(Self { source, cache }))
+        Some(Arc::new(Self { data_source, cache }))
     }
 
     fn fetch(&self) -> Option<usize> {
-        self.source.fetch()
+        self.data_source.fetch()
     }
 
     fn try_swapping_with_projection(
         &self,
         projection: &ProjectionExec,
     ) -> datafusion_common::Result<Option<Arc<dyn ExecutionPlan>>> {
-        self.source.try_swapping_with_projection(projection)
+        self.data_source.try_swapping_with_projection(projection)
     }
 }
 
 impl DataSourceExec {
-    pub fn new(source: Arc<dyn DataSource>) -> Self {
-        let cache = Self::compute_properties(Arc::clone(&source));
-        Self { source, cache }
+    pub fn new(data_source: Arc<dyn DataSource>) -> Self {
+        let cache = Self::compute_properties(Arc::clone(&data_source));
+        Self { data_source, cache }
     }
 
     /// Return the source object
-    pub fn source(&self) -> &Arc<dyn DataSource> {
-        &self.source
+    pub fn data_source(&self) -> &Arc<dyn DataSource> {

Review Comment:
   Here is the actual API change -- the rest of the PR is making local variable 
names consistent



-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to