ueshin commented on code in PR #40358:
URL: https://github.com/apache/spark/pull/40358#discussion_r1132736845
##########
connector/connect/client/jvm/src/main/scala/org/apache/spark/sql/DataFrameWriter.scala:
##########
@@ -228,7 +228,9 @@ final class DataFrameWriter[T] private[sql] (ds:
Dataset[T]) {
// Set path or table
f(builder)
- require(builder.hasPath != builder.hasTable) // Only one can be set
+
+ // Cannot both be set, hasPath or hasTable or nothing
+ require(builder.hasPath || builder.hasTable || (!builder.hasPath &&
!builder.hasTable))
Review Comment:
It seems to pass for both set case?
`require(!(builder.hasPath && builder.hasTable))`?
--
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]