Skip to content

Return scalar result when all inputs are constant for map and make_map udfs #11460

Closed
@Rachelint

Description

@Rachelint

Is your feature request related to a problem or challenge?

Part of #11429
Similar to #6485
Now the map and make_map udfs only return ColumnarValue::Array result, that lead to some sql can't work(see example in following):

SELECT make_map('type', 'test') FROM ordered_table

The returned error is like:

UDF returned a different number of rows than expected. Expected: x, Got: y

Describe the solution you'd like

Check if all inputs are constants in map and make_map, and return scalar result when they are.

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions