vmingchen commented on issue #65:
URL: https://github.com/apache/datafusion-ray/issues/65#issuecomment-2678927679

   Diff for printing the schema:
   
   ```
   diff --git a/datafusion_ray/core.py b/datafusion_ray/core.py
   index d9c9742..e2f3cee 100644
   --- a/datafusion_ray/core.py
   +++ b/datafusion_ray/core.py
   @@ -465,6 +465,9 @@ class RayDataFrame:
   
            return self._stages
   
   +    def schema(self):
   +        return self.df.schema()
   +
   diff --git a/src/dataframe.rs b/src/dataframe.rs
   index 3878975..ed1faa5 100644
   --- a/src/dataframe.rs
   +++ b/src/dataframe.rs
   @@ -266,6 +266,10 @@ impl RayDataFrame {
            Ok(PyLogicalPlan::new(self.df.logical_plan().clone()))
        }
   
   +    fn schema(&self, py: Python) -> PyResult<PyObject> {
   +        self.df.schema().as_arrow().to_pyarrow(py)
   +    }
   +
        fn optimized_logical_plan(&self) -> PyResult<PyLogicalPlan> {
            Ok(PyLogicalPlan::new(self.df.clone().into_optimized_plan()?))
        }
   ```


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