apache/seatunnel · error · TableNotExistException
Table schema is null or empty. DescribeTable returned:
Error message
Table schema is null or empty. DescribeTable returned:
What it means
LanceCatalog.getTable reads the table's Arrow schema and calls convertTableSchema; if conversion returns null (schema is null or empty), it throws a TableNotExistException wrapping a CatalogException describing what DescribeTable returned. This signals the Lance dataset exists but yields no usable schema.
Source
Thrown at seatunnel-connectors-v2/connector-lance/src/main/java/org/apache/seatunnel/connectors/seatunnel/lance/catalog/LanceCatalog.java:200
convertArrowSchemaToJsonArrowSchema(arrowSchemaFromDataset);
log.debug(
"Successfully got schema from dataset with {} fields",
arrowSchema.getFields().size());
}
}
dataset.close();
} catch (Exception e) {
log.debug(
"Failed to get schema from dataset at {}: {}",
datasetPath,
e.getMessage());
}
}
CatalogTable catalogTable =
convertTableSchema(arrowSchema, tablePath, arrowSchemaFromDataset);
if (catalogTable == null) {
throw new TableNotExistException(
catalogName,
tablePath,
new CatalogException(
"Table schema is null or empty. DescribeTable returned: "
+ (arrowSchema != null ? arrowSchema : "null schema")));
}
return catalogTable;
} catch (Exception e) {
String errorMsg = e.getMessage();
if (errorMsg != null
&& (errorMsg.contains("Table does not exist")
|| errorMsg.contains("TABLE_NOT_FOUND")
|| errorMsg.contains("404"))) {
throw new TableNotExistException(catalogName, tablePath, e);
} else {
throw new CatalogException("Failed to get table: " + tablePath.getTableName(), e);
}
}View on GitHub (pinned to cf67b549a7)
Solutions
- Verify the dataset at the table path is a valid, non-empty Lance dataset (inspect with lance tooling or read the manifest)
- Recreate/rewrite the table with a proper schema
- Check the catalog warehouse path configuration to ensure it points at the intended dataset
- Confirm the storage backend is accessible and the dataset files were not truncated by a failed write
Defensive patterns
Strategy: try-catch
Validate before calling
ArrowSchema schema = readArrowSchema(tablePath);
if (schema == null || schema.getFields().isEmpty()) {
// treat as missing/invalid table before calling catalog.getTable
} Try / catch
try {
catalogTable = lanceCatalog.getTable(tablePath);
} catch (TableNotExistException e) {
// table absent or schema empty: create or repair dataset
} Prevention
- Verify datasets are fully written before querying via the catalog
- Monitor for failed/interrupted writes that leave empty datasets
- Validate dataset manifests after storage migration
- Point the warehouse config at the correct dataset root
When it happens
Trigger: getTable is called for a tablePath whose underlying Lance dataset returns an empty/null Arrow schema, so convertTableSchema produces no CatalogTable.
Common situations: Empty or corrupt Lance dataset directory; dataset written without columns; storage metadata missing/truncated; wrong dataset path pointing at an empty location that still resolves as a table.
Understand the failure class
Background: EmptyResultError / "no results found": when an API or scraper succeeds but returns zero rows — this error's family across 9 libraries.
Related errors
- Failed to get table:
- Failed to create empty dataset at
- Failed to drop table:
- Preview action is not supported
- Can not find catalog table with factoryId [%s]
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/f6b192748964bc50.
Report an issue: GitHub.