t8y2/dbx · error
HiveServer2 metadata failed (%v); DESCRIBE fallback failed:
Error message
HiveServer2 metadata failed (%v); DESCRIBE fallback failed: %w
What it means
Column listing (getColumns/describe) tries HiveServer2 metadata (GetHiveColumns) first; on failure it runs 'DESCRIBE <schema>.<table>' as a fallback. This error is returned only when the metadata call AND the DESCRIBE fallback both fail, wrapping the metadata error (%v) and the DESCRIBE error (%w).
Source
Thrown at agents/drivers/argo-go/metadata.go:629
dataType := metadataString(rows.value(row, "TYPE_NAME"))
columnSize := metadataIntPointer(rows.value(row, "COLUMN_SIZE"))
values = append(values, columnInfo{
Name: name,
DataType: dataType,
IsNullable: metadataNullable(rows.value(row, "NULLABLE", "IS_NULLABLE")),
ColumnDefault: optionalString(metadataString(rows.value(row, "COLUMN_DEF"))),
Comment: optionalString(metadataString(rows.value(row, "REMARKS", "COMMENT"))),
NumericPrecision: columnSize,
NumericScale: metadataIntPointer(rows.value(row, "DECIMAL_DIGITS")),
CharacterMaximumLength: characterLengthForType(dataType, columnSize),
})
}
return values, nil
}
qualified := qualifiedHiveName(schema, table)
result, err := server.executeQuery(queryOptions{SQL: "DESCRIBE " + qualified, MaxRows: metadataQueryLimit})
if err != nil {
return nil, fmt.Errorf("HiveServer2 metadata failed (%v); DESCRIBE fallback failed: %w", metadataErr, err)
}
values := make([]columnInfo, 0, len(result.Rows))
for _, row := range result.Rows {
name := rowString(row, 0)
if name == "" || strings.HasPrefix(name, "#") {
continue
}
dataType := rowString(row, 1)
comment := optionalString(rowString(row, 2))
values = append(values, columnInfo{
Name: name,
DataType: dataType,
IsNullable: true,
Comment: comment,
})
}
return values, nil
}View on GitHub (pinned to c0390bff16)
Solutions
- Verify the table exists: run SHOW TABLES IN <schema> and confirm the exact name/case.
- Run 'DESCRIBE <schema>.<table>' manually as the same user to see the underlying failure.
- Check the user has SELECT/DESCRIBE privileges on the table.
- Reconnect if the session was dropped (both attempts failing together often indicates a dead session).
Example fix
// before getColumns(schema: "sales", table: "orderss") // after getColumns(schema: "sales", table: "orders")
Defensive patterns
Strategy: validation
Validate before calling
// Verify the table exists before asking for its columns.
func tableExists(server *server, schema, table string) bool {
tables, err := server.listTables(schema, metadataListConstraints{Filter: table})
if err != nil {
return false
}
for _, t := range tables {
if strings.EqualFold(t.Name, table) {
return true
}
}
return false
}
if !tableExists(server, "sales", "orders") {
return nil, fmt.Errorf("table %s.%s does not exist or is not accessible", "sales", "orders")
} Try / catch
cols, err := server.getColumns(schema, table)
if err != nil {
var inner error
if errors.As(err, &inner) {
log.Printf("describe failed for %s.%s: %v", schema, table, inner)
}
if !tableExists(server, schema, table) {
return nil, fmt.Errorf("unknown table %s.%s", schema, table)
}
return fmt.Errorf("column metadata unavailable: %w", err)
} Prevention
- Validate schema and table names (spelling and case) before requesting columns.
- Ensure the connecting role has DESCRIBE/SELECT privileges on target tables.
- Refresh metadata caches after DDL so dropped/renamed tables are not requested.
- Check connection health with test_connection if metadata and DESCRIBE both fail.
When it happens
Trigger: Requesting columns for a table when the JDBC metadata call fails and 'DESCRIBE schema.table' also fails — typically the table does not exist, is misspelled, or the user lacks describe privileges.
Common situations: Wrong schema/table name in the request (typos, wrong case); table dropped or renamed; user without DESC privileges; connection dropped between the two attempts.
Related errors
- SHOW DATABASES failed (%v); HiveServer2 metadata fallback fa
- HiveServer2 metadata failed (%v); %s fallback failed: %w
- HiveServer2 table comment metadata failed (%v); table listin
- HiveServer2 metadata failed (%v); %s fallback failed: %w
- HiveServer2 table comment metadata failed (%v); table listin
AI-assisted analysis of t8y2/dbx@c0390bff16 (2026-09-05).
Data as JSON: /api/errors/817b69328f88073d.
Report an issue: GitHub.