grundprinzip commented on code in PR #10:
URL: https://github.com/apache/spark-connect-go/pull/10#discussion_r1221138909


##########
client/sql/dataframereader.go:
##########
@@ -0,0 +1,41 @@
+package sql
+
+import proto "github.com/apache/spark-connect-go/v_3_4/internal/generated"
+
+type DataFrameReader interface {

Review Comment:
   Same for doc here and below for the methods.



##########
client/sql/dataframe.go:
##########
@@ -31,6 +31,7 @@ type DataFrame interface {
        Show(numRows int, truncate bool) error
        Schema() (*StructType, error)
        Collect() ([]Row, error)
+       Write() DataFrameWriter
 }
 
 type dataFrameImpl struct {

Review Comment:
   I'm wondering if we should split the interfaces and the impls across 
multiple files for readability?



##########
client/sql/dataframereader.go:
##########
@@ -0,0 +1,41 @@
+package sql
+
+import proto "github.com/apache/spark-connect-go/v_3_4/internal/generated"
+
+type DataFrameReader interface {
+       Format(source string) DataFrameReader
+       Load(path string) (DataFrame, error)

Review Comment:
   I think it's fine to create incremental PRs for the new features, but it 
would be great to leave a comment here showing which methods are missing in the 
interface.



##########
client/sql/dataframe.go:
##########
@@ -31,6 +31,7 @@ type DataFrame interface {
        Show(numRows int, truncate bool) error
        Schema() (*StructType, error)
        Collect() ([]Row, error)
+       Write() DataFrameWriter

Review Comment:
   My suggestion is to add the basic documentation (even though it's replicated 
from OSS Spark)



##########
client/sql/sparksession.go:
##########
@@ -154,3 +163,17 @@ func (s *sparkSessionImpl) analyzePlan(plan *proto.Plan) 
(*proto.AnalyzePlanResp
        }
        return response, nil
 }
+
+func consumeExecutePlanClient(responseClient 
proto.SparkConnectService_ExecutePlanClient) error {

Review Comment:
   Can you add a bit doc on how the data is consumed and how it deals with 
streaming results etc.



##########
client/sql/dataframewriter.go:
##########
@@ -0,0 +1,79 @@
+package sql
+
+import (
+       "fmt"
+       proto "github.com/apache/spark-connect-go/v_3_4/internal/generated"
+       "strings"
+)
+
+type DataFrameWriter interface {

Review Comment:
   Doc :) Same comment on the missing methods for incremental changes.



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

Reply via email to