pan3793 commented on code in PR #56688:
URL: https://github.com/apache/spark/pull/56688#discussion_r3457489315


##########
sql/connect/client/jdbc/src/main/scala/org/apache/spark/sql/connect/client/jdbc/SparkConnectDatabaseMetaData.scala:
##########
@@ -598,14 +598,51 @@ class SparkConnectDatabaseMetaData(conn: 
SparkConnectConnection) extends Databas
       catalog: String, schema: String, table: String): ResultSet =
     throw new SQLFeatureNotSupportedException
 
-  override def getPrimaryKeys(catalog: String, schema: String, table: String): 
ResultSet =
-    throw new SQLFeatureNotSupportedException
+  // Spark has no primary keys, so return an empty result set with the JDBC 
schema

Review Comment:
   oh, seems it does not have a public API to retrieve the table constraints in 
a structured format using connect client. I guess we are facing the same issue 
for other table info, e.g., `index`
   
   cc @gengliangwang @cloud-fan, do you have any suggestions for this case? how 
should we model such a public API?



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