pan3793 commented on code in PR #52995:
URL: https://github.com/apache/spark/pull/52995#discussion_r2513168663
##########
sql/connect/client/jdbc/src/main/scala/org/apache/spark/sql/connect/client/jdbc/SparkConnectDatabaseMetaData.scala:
##########
@@ -618,4 +706,6 @@ object SparkConnectDatabaseMetaData {
"XMLFOREST", "XMLNAMESPACES", "XMLPARSE", "XMLPI", "XMLROOT",
"XMLSERIALIZE",
"YEAR"
)
+
+ private[jdbc] val TABLE_TYPES = Seq("TABLE", "VIEW")
Review Comment:
this follows Spark Thrift Server behavior (see SPARK-28293 for more
details): `o.a.s.sql.hive.thriftserver.SparkGetTableTypesOperation` returns
`Array("TABLE", "VIEW")`
as a reference, HiveServer2 has a configuration
`hive.server2.table.type.mapping` to control the returned values
https://github.com/apache/hive/blob/rel/release-2.3.10/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java#L2583-L2587
```
HIVE_SERVER2_TABLE_TYPE_MAPPING("hive.server2.table.type.mapping",
"CLASSIC", new StringSet("CLASSIC", "HIVE"),
"This setting reflects how HiveServer2 will report the table types for
JDBC and other\n" +
"client implementations that retrieve the available tables and supported
table types\n" +
" HIVE : Exposes Hive's native table types like MANAGED_TABLE,
EXTERNAL_TABLE, VIRTUAL_VIEW\n" +
" CLASSIC : More generic types like TABLE and VIEW"),
```
Databricks JDBC driver supports more table types: "SYSTEM TABLE", "TABLE",
"VIEW", "METRIC_VIEW"
https://github.com/databricks/databricks-jdbc/blob/v3.0.3/src/main/java/com/databricks/jdbc/common/MetadataResultConstants.java#L249
https://github.com/databricks/databricks-jdbc/blob/v3.0.3/src/main/java/com/databricks/jdbc/common/MetadataResultConstants.java#L13
--
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]