Skip to content

arrow-flight CommandGetDbSchemas schema not matching documentation #7416

@jwimberl

Description

@jwimberl

Describe the bug
Going back some time (< release 33.0.0) the documentation for CommandGetDbSchemas states the catalog_name field should be nullable:

The returned Arrow schema will be: < catalog_name: utf8, db_schema_name: utf8 not null

https://docs.rs/arrow-flight/55.0.0/arrow_flight/sql/struct.CommandGetDbSchemas.html

However, using arrow-flight v53.2.0 (the newest version I'm able to test with easily), the returned schema has a non-nullable catalog_name field.

To Reproduce
Given a CommandGetDbSchemas object cmd, examine

dbg!(&cmd.into_builder().schema()

Output:

[... my file...] &cmd.into_builder().schema() = Schema {
    fields: [
        Field {
            name: "catalog_name",
            data_type: Utf8,
            nullable: false,
            dict_id: 0,
            dict_is_ordered: false,
            metadata: {},
        },
        Field {
            name: "db_schema_name",
            data_type: Utf8,
            nullable: false,
            dict_id: 0,
            dict_is_ordered: false,
            metadata: {},
        },
    ],
    metadata: {},
}

Expected behavior
nullable should be true in the catalog_name field to match the documentation. This is also the downstream expectation, e.g. in adbc_driver_manager.adbc_get_objects() when using adbc_driver_flightsql.

Additional context
I’m using arrow-flight v53.2.0 -- ideally I’d test this on the newest arrow-flight version, but that would be a time investment for compatibility reasons, and I don’t see mention of CommandDbGetTables in release notes or issues. If there is a good chance that this was fixed in a subsequent release, I can make the effort to update and retest.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions