sarutak commented on code in PR #52756:
URL: https://github.com/apache/spark/pull/52756#discussion_r2469637865


##########
sql/connect/client/jdbc/src/main/scala/org/apache/spark/sql/connect/client/jdbc/SparkConnectResultSet.scala:
##########
@@ -253,13 +263,25 @@ class SparkConnectResultSet(
   override def getBigDecimal(columnLabel: String): java.math.BigDecimal =
     throw new SQLFeatureNotSupportedException
 
-  override def isBeforeFirst: Boolean = throw new 
SQLFeatureNotSupportedException
+  override def isBeforeFirst: Boolean = {
+    checkOpen()
+    cursor < 1

Review Comment:
   Oh wait, should `isBeforeFirst` return `false` if the result contains zero 
rows?
   
https://docs.oracle.com/en/java/javase/17/docs/api/java.sql/java/sql/ResultSet.html#isBeforeFirst()



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