caldempsey commented on code in PR #152:
URL: https://github.com/apache/spark-connect-go/pull/152#discussion_r2808366613


##########
spark/sql/dataframe.go:
##########
@@ -936,6 +942,17 @@ func (df *dataFrameImpl) ToArrow(ctx context.Context) 
(*arrow.Table, error) {
        return &table, nil
 }
 
+func (df *dataFrameImpl) StreamRows(ctx context.Context) (types.RowPull2, 
error) {
+       responseClient, err := df.session.client.ExecutePlan(ctx, 
df.createPlan())
+       if err != nil {
+               return nil, sparkerrors.WithType(fmt.Errorf("failed to execute 
plan: %w", err), sparkerrors.ExecutionError)
+       }
+
+       seq2 := responseClient.ToRecordSequence(ctx)
+
+       return types.NewRowPull2(ctx, seq2), nil

Review Comment:
   Agree, not really sure why we have an abstraction over it, wasn't sure if it 
made sense to prefer types.RowPull2 over iter.Pull2 since RowPull2 was already 
in the codebase



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

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to