Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] AVRO table - [TABLE_OR_VIEW_NOT_FOUND] #6649

Open
2 of 4 tasks
prsklark opened this issue Aug 30, 2024 · 1 comment
Open
2 of 4 tasks

[Bug] AVRO table - [TABLE_OR_VIEW_NOT_FOUND] #6649

prsklark opened this issue Aug 30, 2024 · 1 comment
Labels
kind:bug This is a clearly a bug priority:major

Comments

@prsklark
Copy link

Code of Conduct

Search before asking

  • 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.
  • No. I cannot submit a PR at this time.
@prsklark prsklark added kind:bug This is a clearly a bug priority:major labels Aug 30, 2024
Copy link

Hello @prsklark,
Thanks for finding the time to report the issue!
We really appreciate the community's efforts to improve Apache Kyuubi.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug This is a clearly a bug priority:major
Projects
None yet
Development

No branches or pull requests

1 participant