Skip to content

Table function supports non-literal args #14958

Closed
@jonahgao

Description

@jonahgao

Is your feature request related to a problem or challenge?

Currently, table functions like range only support literal arguments.

DataFusion CLI v45.0.0
> select * from range(1,3);
+-------+
| value |
+-------+
| 1     |
| 2     |
+-------+
2 row(s) fetched.
Elapsed 0.007 seconds.

> select * from range(1, 2+3);
Error during planning: First argument must be an integer literal

Describe the solution you'd like

We may need the ability to optimize the args of table functions, such as applying SimplifyExpressions, to transform 2+3 into a literal.

Describe alternatives you've considered

No response

Additional context

Found while working on #14801

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