foryou7242 opened a new issue, #4932:
URL: https://github.com/apache/gravitino/issues/4932

   ### Version
   
   main branch
   
   ### Describe what's wrong
   
   I want to use federation query using hive metastore stored in 2 hadoop 
clusters.
   
   So we added two hive catalogues to metalake.
   
   There is a difference between the location path in the show create table and 
the actual location information when sql-sql querying.
   
   <img width="1475" alt="image" 
src="https://github.com/user-attachments/assets/7301f3a6-626b-4f97-bf51-ea6bed217f28";>
   
   
   
   It seems to be an effect of the actual spark-sql query 
`spark.sql.metastore.uris` option, so I'm wondering if it's possible to 
federate query 2 hives?
   
   ### Error message and/or stacktrace
   
   ```sql
   >  show create table   portal_test_schema;
   CREATE TABLE portal_test_schema (
   ...
     month INT,
     day INT,
     hour INT
   )
   PARTITIONED BY (month, day, hour)
   LOCATION 'hdfs://test1/test1'
   TBLPROPERTIES (
     'bucketing_version' = '2',
     'discover.partitions' = 'true',
     'input-format' = 
'org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat',
   ```
   
   explain query
   ```sql
   spark-sql ()> EXPLAIN show create table   portal_test_schema;
   == Physical Plan ==
   ShowCreateTable [createtab_stmt#0], 
HiveTable(org.apache.spark.sql.SparkSession@14144cc9,CatalogTable(
   Database: ladp
   Table: portal_test_schema
   Created Time: Thu Jan 26 18:40:15 JST 2023
   Last Access: UNKNOWN
   Created By: Spark 2.2 or prior
   Type: EXTERNAL
   Provider: hive
   Table Properties: [bucketing_version=2, numFilesErasureCoded=0, 
transient_lastDdlTime=1725947686]
   Location: hdfs://test2/portal_test_schema
   Serde Library: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
   InputFormat: org.apache.hadoop.mapred.TextInputFormat
   OutputFormat: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
   Storage Properties: [serialization.format=1]
   Partition Provider: Catalog
   Schema: root
   ...
   ),org.apache.kyuubi.spark.connector.hive.HiveTableCatalog@64cbc28e)
   ```
   
   ### How to reproduce
   
   gravitino branch main
   
   ### Additional context
   
   _No response_


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

Reply via email to