convertExprTypeToRelDataType builds STRUCT as MAP<VARCHAR, ANY>, since the v2
path only passes _source JSON through and needs no field types. So the reverse
mapping only had `case MAP -> STRUCT` — a genuine Calcite ROW matched nothing,
fell through to `default -> UNKNOWN`, and surfaced as "type": "unknown" in the
response schema.
That is reachable from the analytics engine, which materializes an `object`
field as a real ROW built from typed columns. Before, `fields city` reported
"unknown"; now "struct", matching what a lucene-only cluster returns for the
same mapping.
Signed-off-by: Marc Handalian <[email protected]>
Signed-off-by: Marc Handalian <[email protected]>
Description
convertExprTypeToRelDataType builds STRUCT as MAP<VARCHAR, ANY>, since the v2 path only passes _source JSON through and needs no field types. So the reverse mapping only had
case MAP -> STRUCT— a genuine Calcite ROW matched nothing, fell through todefault -> UNKNOWN, and surfaced as "type": "unknown" in the response schema.That is reachable from the analytics engine, which materializes an
objectfield as a real ROW built from typed columns. Before,fields cityreported "unknown"; now "struct", matching what a lucene-only cluster returns for the same mapping.Related Issues
Resolves #[Issue number to be closed when this PR is merged]
Check List
--signoffor-s.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.