imvtsl commented on PR #84: URL: https://github.com/apache/spark-connect-go/pull/84#issuecomment-2440920523
Hi @grundprinzip I added functionality for the `Sample` function. While working on this PR, I noticed that existing functions don't currently support optional arguments. For instance, in the [Show](https://github.com/apache/spark-connect-go/blob/a8fccbf4619bb1a59fe87d9a1fcd7361e26142ab/spark/sql/dataframe.go#L420) function, the `numRows` argument is not optional. However, in [PySpark](https://spark.apache.org/docs/latest/api/python/reference/pyspark.sql/api/pyspark.sql.DataFrame.show.html), it is optional. I observed a similar pattern in other functions as well. In PySpark’s implementation of [Sample](https://spark.apache.org/docs/latest/api/python/_modules/pyspark/sql/dataframe.html#DataFrame.sample), the `withReplacement` and `seed` arguments are optional. Following that model, I used pointers for these arguments in my implementation (so they can be set to nil). Please let me know if this approach is correct or if there's something I might be overlooking. This is my first contribution to this repository, and I'm new to working with Spark. -- 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-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org