You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/11/29 04:45:28 UTC

[GitHub] [spark] amaliujia commented on a diff in pull request #38829: [SPARK-41310][CONNECT][PYTHON] Implement DataFrame.toDF

amaliujia commented on code in PR #38829:
URL: https://github.com/apache/spark/pull/38829#discussion_r1034294597


##########
python/pyspark/sql/connect/dataframe.py:
##########
@@ -1068,6 +1068,23 @@ def inputFiles(self) -> List[str]:
         query = self._plan.to_proto(self._session.client)
         return self._session.client._analyze(query).input_files
 
+    def toDF(self, *cols: str) -> "DataFrame":

Review Comment:
   I found hard to support `def toDF(self, *cols: "ColumnOrName") -> "DataFrame":` for the Connect case.
   
   How can we convert a Column to a string? This PySpark API is quite different from Scala side as Scala API only supports a list of strings ` def toDF(colNames: String*): DataFrame`.



-- 
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: reviews-unsubscribe@spark.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org