Skip to content

[Java] Some questions about the metadata api of jdbc #180

Open

Description

@yukkit

Describe the usage question you have. Please include as many useful details as possible.

When I call the getTables interface, I get an error

java.sql.SQLException: Failed to transform VectorSchemaRoot.

	at org.apache.arrow.driver.jdbc.ArrowFlightJdbcFlightStreamResultSet.executeForCurrentFlightStream(ArrowFlightJdbcFlightStreamResultSet.java:150)
	at org.apache.arrow.driver.jdbc.ArrowFlightJdbcFlightStreamResultSet.execute(ArrowFlightJdbcFlightStreamResultSet.java:139)
	at org.apache.arrow.driver.jdbc.ArrowFlightJdbcFlightStreamResultSet.fromFlightInfo(ArrowFlightJdbcFlightStreamResultSet.java:105)
	at org.apache.arrow.driver.jdbc.ArrowDatabaseMetadata.getTables(ArrowDatabaseMetadata.java:902)

My server returns the result as follows

SELECT
                TABLE_TENANT as TABLE_CAT,
                TABLE_DATABASE as TABLE_SCHEM,
                TABLE_NAME,
                TABLE_TYPE
            FROM
                INFORMATION_SCHEMA.TABLES
            WHERE TABLE_TENANT = 'cnosdb' AND TABLE_DATABASE LIKE 'public' AND TABLE_NAME LIKE '%' AND TABLE_TYPE IN ('TABLE')
            ORDER BY
                TABLE_TYPE, TABLE_CAT, TABLE_SCHEM, TABLE_NAME

By the code, I found that

  • Convert catalog_name to TABLE_CAT in the ArrowDatabaseMetadata.getCatalogs api.
  • Convert db_schema_name to TABLE_SCHEM in the ArrowDatabaseMetadata.getSchemas api.
  • ......

For the above, can I think that the ResultSet Schema of my getSchemas implementation must be db_schema_name, catalog_name instead of TABLE_SCHEM, TABLE_CATALOG. The same goes for other API?

Component(s)

Java

Activity

  1. changed the title [-]Some questions about the metadata api of jdbc[/-] [+][Java] Some questions about the metadata api of jdbc[/+] on Jul 26, 2023
  2. transferred this issue fromapache/arrowon Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions