Skip to content

isthmus: an empty map literal has no ExpressionRexConverter visit, so an empty map column fails to convert #1176

Description

@nielspardon

ExpressionRexConverter overrides visit(Expression.EmptyListLiteral) but has no override for Expression.EmptyMapLiteral, so an empty map reaches AbstractExpressionVisitor.visitFallback and throws UnsupportedOperationException instead of converting.

NamedStruct schema = NamedStruct.of(List.of("col1", "a"), R.struct(R.map(R.STRING, R.struct(R.I32))));
// row value:
ExpressionCreator.emptyMap(false, R.STRING, R.struct(R.I32))
// -> UnsupportedOperationException: Expression ... not handled by visitor type ...

The empty list case converts correctly through the same paths, so the two container kinds are inconsistently supported.

Found reviewing #1153, which added map handling to the virtual-table value conversion; that code is reachable for a populated or null map but not for an empty one.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions