prestodb/presto · error · PrestoException
LANCE_ERROR
LANCE_ERROR
Error message
lance.root must be set when using lance.impl=dir
What it means
Configuration guard in LanceNamespaceHolder: the catalog was configured with lance.impl=dir (directory-backed namespace) but no lance.root property was supplied, so there is no root directory under which to resolve namespaces and datasets.
Source
Thrown at presto-lance/src/main/java/com/facebook/presto/lance/LanceNamespaceHolder.java:131
// Parse namespace properties from catalog config
String impl = config.getImpl();
Map<String, String> properties = new HashMap<>();
Map<String, String> storageOpts = new HashMap<>();
for (Map.Entry<String, String> entry : namespaceProperties.entrySet()) {
String key = entry.getKey();
if (key.startsWith("lance.")) {
String strippedKey = key.substring(6);
properties.put(strippedKey, entry.getValue());
if (strippedKey.startsWith("storage.")) {
storageOpts.put(strippedKey.substring(8), entry.getValue());
}
}
}
this.namespaceStorageOptions = ImmutableMap.copyOf(storageOpts);
// Validate that 'root' is set for directory namespace
if ("dir".equals(impl) && !properties.containsKey("root")) {
throw new PrestoException(LanceErrorCode.LANCE_ERROR,
"lance.root must be set when using lance.impl=dir");
}
// For DirectoryNamespace, ensure default settings are applied
if ("dir".equals(impl)) {
properties.putIfAbsent("manifest_enabled", "true");
properties.putIfAbsent("dir_listing_enabled", "true");
}
// Initialize namespace
this.namespace = LanceNamespace.connect(impl, properties, allocator);
// Initialize namespace level handling
this.singleLevelNs = config.isSingleLevelNs();
String parent = config.getParent();
if (parent != null && !parent.isEmpty()) {
// Parent uses '$' as delimiter to avoid conflicts with common path separators ('/' and '.')
// and namespace-level separators. Example: "org$warehouse" -> ["org", "warehouse"]View on GitHub (pinned to 55bb57d202)
Solutions
- Set lance.root in the catalog properties to the directory that holds the Lance datasets
- Or switch lance.impl to a managed-namespace implementation that does not require a local root
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at presto-lance/src/main/java/com/facebook/presto/lance/LanceNamespaceHolder.java:131 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/b9030cbb54b03a33.
Report an issue: GitHub.