mathiasschw-db commented on code in PR #30:
URL: https://github.com/apache/spark-connect-go/pull/30#discussion_r1666530076
##########
spark/sql/session/sparksession.go:
##########
@@ -49,21 +51,27 @@ func (s *SparkSessionBuilder) Remote(connectionString
string) *SparkSessionBuild
return s
}
-func (s *SparkSessionBuilder) Build(ctx context.Context) (SparkSession, error)
{
+func (s *SparkSessionBuilder) ChannelBuilder(cb channel.Builder)
*SparkSessionBuilder {
+ s.channelBuilder = cb
+ return s
+}
- cb, err := channel.NewBuilder(s.connectionString)
- if err != nil {
- return nil, sparkerrors.WithType(fmt.Errorf("failed to connect
to remote %s: %w", s.connectionString, err), sparkerrors.ConnectionError)
+func (s *SparkSessionBuilder) Build(ctx context.Context) (SparkSession, error)
{
Review Comment:
I guess if you want a builder pattern, then the natural way would be to have
a `WithChannelBuilder` call
--
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]