bytebase/bytebase · error
unsupported oracle table source: %T
Error message
unsupported oracle table source: %T
What it means
extractOmniTableExpr dispatches on the FROM-clause element type and throws for node types it does not implement — the default case. The message includes the Go type of the unsupported table expression so the missing case is easy to identify.
Source
Thrown at backend/plugin/parser/plsql/query_span_extractor_omni.go:568
database = q.defaultDatabase
}
tableSource, err := q.plsqlFindTableSchema(nil, database, expr.Name.Name)
if err != nil {
return nil, err
}
return aliasOmniTableSource(tableSource, expr.Alias), nil
case *oracleast.InlineExternalTable:
return extractOmniInlineExternalTable(expr), nil
case *oracleast.TableCollectionExpr:
return q.extractOmniTableCollection(expr)
case *oracleast.PivotClause:
return q.extractOmniPivot(expr)
case *oracleast.UnpivotClause:
return q.extractOmniUnpivot(expr)
case *oracleast.MatchRecognizeClause:
return q.extractOmniMatchRecognize(expr)
default:
return nil, errors.Errorf("unsupported oracle table source: %T", expr)
}
}
func (q *omniQuerySpanExtractor) extractOmniPivot(pivot *oracleast.PivotClause) (base.TableSource, error) {
if pivot == nil {
return nil, nil
}
// Capture the FROM scope before extracting the source: a join source
// appends its operands to tableSourcesFrom, and they must not leak past
// this transform — the clause replaces them with its own output.
oldFrom := q.tableSourcesFrom
defer func() {
q.tableSourcesFrom = oldFrom
}()
source, err := q.extractOmniTableExpr(pivot.Source)
if err != nil {
return nil, err
}View on GitHub (pinned to 1870550677)
Solutions
- Identify the unsupported type from %T in the message and add a case for it in extractOmniTableExpr
- Rewrite the SQL to use a supported FROM-clause form for lineage analysis
- If the feature must be supported (e.g. JSON_TABLE), implement extraction for that node type in the omni extractor
Example fix
// before
case *oracleast.JsonTableClause:
// not handled -> default: error
// after
case *oracleast.JsonTableClause:
return q.extractOmniJsonTable(expr) Defensive patterns
Strategy: validation
Validate before calling
if !supportedFromClauseKinds[stmtKind(sql)] { return errors.New("FROM clause contains unsupported expression") } Try / catch
src, err := extractor.GetQuerySpan(ctx, sql)
if err != nil && strings.Contains(err.Error(), "unsupported oracle table source") {
return nil, errUnsupportedFromClause
} Prevention
- Restrict lineage analysis to supported FROM-clause constructs
- Extend extractOmniTableExpr whenever the grammar adds node types
- Log the %T type from the error to identify the missing case quickly
When it happens
Trigger: A FROM clause containing a table expression type outside the supported set (e.g. an exotic join form, JSON table, flashback clause, or newly added AST node) reaching extractOmniTableExpr via extractOmniSelect, pivot/unpivot, model, or match_recognize handling.
Common situations: Using advanced Oracle FROM-clause features (lateral, JSON_TABLE, SAMPLE, AS OF TIMESTAMP) not yet supported by the lineage extractor; grammar upgrades introducing new node types the extractor switch lags behind on.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- MongoDB does not support EXPLAIN
- no parse results
- no DML statement found in extracted SQL
- cannot rewrite PERCENT FETCH expression
- failed to prepare transformation
AI-assisted analysis of bytebase/bytebase@1870550677 (2026-09-06).
Data as JSON: /api/errors/b1debd12f6b6c320.
Report an issue: GitHub.