alamb commented on a change in pull request #7959:
URL: https://github.com/apache/arrow/pull/7959#discussion_r470819775



##########
File path: rust/datafusion/src/logicalplan.rs
##########
@@ -1128,6 +1153,32 @@ impl LogicalPlanBuilder {
     }
 }
 
+/// Represents some sort of execution plan, in String form
+#[derive(Debug, Clone, PartialEq)]
+pub struct StringifiedPlan {
+    /// An identifier of what type of plan this string represents
+    pub plan_type: Arc<String>, // TODO make this an enum?
+    /// The string representation of the plan
+    pub plan: Arc<String>,
+}
+
+impl StringifiedPlan {
+    /// Create a new Stringified plan of `plan_type` with string
+    /// representation `plan`
+    pub fn new(plan_type: impl Into<String>, plan: impl Into<String>) -> Self {
+        StringifiedPlan {
+            plan_type: Arc::new(plan_type.into()),
+            plan: Arc::new(plan.into()),
+        }
+    }
+
+    /// returns true if this plan should be displayed. Generally
+    /// `verbose_mode = true` will display all available plans
+    pub fn should_display(&self, verbose_mode: bool) -> bool {

Review comment:
       @jorgecarleitao  -- check this out: 
https://github.com/apache/arrow/pull/7959/commits/7e9e42ce385a4825ff986b70f87960cec6a18f1c




----------------------------------------------------------------
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:
[email protected]


Reply via email to