Skip to content

[SQL] Lambda function does not correctly resolve field names #6354

@mihaibudiu

Description

@mihaibudiu
CREATE TABLE t (id INT, arr ROW(name VARCHAR, score INT) ARRAY);
CREATE MATERIALIZED VIEW v AS
SELECT id, TRANSFORM(arr, x -> x.name) AS names FROM t;

This complains about parameter x.name not being found. That is not even a parameter!
The problem seems to be that x.name is treated as a single compound identifier instead of a field access.

Metadata

Metadata

Assignees

Labels

CalciteFix available in the next Calcite releaseSQL compilerRelated to the SQL compiler

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions