BaseLanceNamespaceSparkCatalog passes lowercased option keys to LanceNamespace.connect()

Open Beginner friendly
#717 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
88/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
java, spark

Research direction

Start in BaseLanceNamespaceSparkCatalog.initialize() at line 254 and compare its option extraction with the case-preserving path at line 225. Update the namespace options path so original-case keys reach LanceNamespace.connect(), then verify that backend configuration keys are preserved.

Written by the indexing model from the issue text.

Description

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().

Dominant language
Java
Stars
66
Forks
85
Avg merge
3d 4h
Merged PRs (30d)
30

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from lance-format/lance-spark

All issues in lance-format/lance-spark

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.