Skip to content

BaseLanceNamespaceSparkCatalog passes lowercased option keys to LanceNamespace.connect() #717

Description

@Yohahaha

Description

CaseInsensitiveStringMap is Spark's wrapper that lowercases all config keys. In BaseLanceNamespaceSparkCatalog.initialize(), there are two places extracting options from it:

Line Code Result
225 new HashMap<>(options.asCaseSensitiveMap()) ✅ Keys preserve original case
254 new HashMap<>(options) ❌ Keys are lowercased

Line 254 produces namespaceOptions with all-lowercase keys, which is then passed to LanceNamespace.connect() and eventually to the storage backend. Any backend that expects case-sensitive config keys will fail to find them.

Fix

One-line change at line 254:

- Map<String, String> namespaceOptions = new HashMap<>(options);
+ Map<String, String> namespaceOptions = new HashMap<>(options.asCaseSensitiveMap());

Other paths (LanceDataset, LanceDataSource) already correctly use asCaseSensitiveMap().

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