[X] I have searched in the issues and found no similar issues.
Describe the bug
There is an issue when querying an Avro table through Kyuubi. The table is visible from the Spark side, and it is possible to execute a SELECT statement to retrieve data. The table also appears in the list of tables in Kyuubi, for example, when viewed through DBeaver. However, when attempting to query the table from Kyuubi, the following error occurs:
SQL Error: org.apache.kyuubi.KyuubiSQLException: org.apache.kyuubi.KyuubiSQLException: Error operating ExecuteStatement: org.apache.spark.sql.AnalysisException: [TABLE_OR_VIEW_NOT_FOUND] The table or view `spark_catalog`.`default`.`avro1` cannot be found.
The table is created from JupyterHub using the following Spark SQL command:
spark.sql(f'''
CREATE TABLE {table_name}
USING avro
OPTIONS (path '{path}')
''')
Where:
{table_name} is the name of the table,
{path} is the path to the Avro file on S3.
Kyuubi is integrated with the Hive Metastore, and the metadata is stored in a PostgreSQL database. Entries related to this table are visible in the PostgreSQL database; however, the metadata_location entry is missing. For Iceberg tables, everything works correctly, and the metadata_location is present in the PostgreSQL database.
This suggests that while the table's metadata exists in PostgreSQL, there is a specific problem with the Avro table's metadata_location not being recorded or managed correctly. The discrepancy between how Avro and Iceberg tables are handled may point to an issue in the integration between Kyuubi, Spark, Hive Metastore, and PostgreSQL.
Affects Version(s)
v1.9.1
Kyuubi Server Log Output
No response
Kyuubi Engine Log Output
No response
Kyuubi Server Configurations
No response
Kyuubi Engine Configurations
No response
Additional context
No response
Are you willing to submit PR?
[ ] Yes. I would be willing to submit a PR with guidance from the Kyuubi community to fix.
Code of Conduct
Search before asking
Describe the bug
There is an issue when querying an Avro table through Kyuubi. The table is visible from the Spark side, and it is possible to execute a SELECT statement to retrieve data. The table also appears in the list of tables in Kyuubi, for example, when viewed through DBeaver. However, when attempting to query the table from Kyuubi, the following error occurs:
SQL Error: org.apache.kyuubi.KyuubiSQLException: org.apache.kyuubi.KyuubiSQLException: Error operating ExecuteStatement: org.apache.spark.sql.AnalysisException: [TABLE_OR_VIEW_NOT_FOUND] The table or view `spark_catalog`.`default`.`avro1` cannot be found.
The table is created from JupyterHub using the following Spark SQL command:
Where:
{table_name}
is the name of the table,{path}
is the path to the Avro file on S3.Kyuubi is integrated with the Hive Metastore, and the metadata is stored in a PostgreSQL database. Entries related to this table are visible in the PostgreSQL database; however, the metadata_location entry is missing. For Iceberg tables, everything works correctly, and the metadata_location is present in the PostgreSQL database.
This suggests that while the table's metadata exists in PostgreSQL, there is a specific problem with the Avro table's metadata_location not being recorded or managed correctly. The discrepancy between how Avro and Iceberg tables are handled may point to an issue in the integration between Kyuubi, Spark, Hive Metastore, and PostgreSQL.
Affects Version(s)
v1.9.1
Kyuubi Server Log Output
No response
Kyuubi Engine Log Output
No response
Kyuubi Server Configurations
No response
Kyuubi Engine Configurations
No response
Additional context
No response
Are you willing to submit PR?