Skip to content

native: SELECT properties FROM schema:types returns each property as a str, not a map as on the JVM build #195

Closed

Description

@tae898

Found by the new native examples job (#192, PR #193): examples/04_csv_import_documents.py fails on the native wheel at its schema step.

result = db.query("sql", "SELECT properties FROM schema:types WHERE name = 'Movie'")
for record in result:
    for prop in record.get("properties"):
        prop_map = dict(prop.toMap()) if hasattr(prop, "toMap") else prop
        prop_map.get("name")

On the JVM build each element of properties is a map (name, type, ...). On the native build the element is a str, so the example stops with AttributeError: 'str' object has no attribute 'get' (CI run 41430479689, Linux x86-64, Python 3.12, native wheel of main 52dec6f).

Expected on both builds: each element is a dict with the same keys the JVM build exposes, so code that reads the schema works the same way on either package. Examples 05 and 06 read the export that 04 writes, so they fail with it; PR #193 lists all three on the native skip list with a pointer to this issue until it is fixed.

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