You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2020/11/14 14:41:13 UTC

[GitHub] [arrow] waynexia commented on a change in pull request #8662: ARROW-9911: [Rust][DataFusion] SELECT with no FROM clause should produce a single row of output

waynexia commented on a change in pull request #8662:
URL: https://github.com/apache/arrow/pull/8662#discussion_r523426357



##########
File path: rust/datafusion/src/physical_plan/projection.rs
##########
@@ -114,14 +117,33 @@ impl ExecutionPlan for ProjectionExec {
     }
 
     async fn execute(&self, partition: usize) -> Result<SendableRecordBatchStream> {
+        let input = if self.input.as_any().downcast_ref::<EmptyExec>().is_some() {

Review comment:
       I add this field in commit ef09e12.
   
   This flag is set in logical plan phase, `from_join_to_plan()`. If ast has no `FROM` clause then an `EmptyRelation` node will be added with `produce_one_row` set to true. And then comes to exec phase, `EmptyExec` will produce a placeholder row.
   
   Maybe this is better? :smiley: 




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

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