Skip to content

Regression: no longer support the substring function #10240

@jonahgao

Description

@jonahgao

Describe the bug

Found while working on #10013.

An error was reported stating, This feature is not implemented: Unsupported ast node in sqltorel: Substring.
It worked prior to #10137, but it stopped working after upgrading sqlparser to 0.45.0.

Related to apache/datafusion-sqlparser-rs#1173

To Reproduce

DataFusion CLI v37.1.0
> select substring('xxxx', 1, 2);
This feature is not implemented: Unsupported ast node in sqltorel: Substring { expr: Value(SingleQuotedString("xxxx")), substring_from: Some(Value(Number("1", false))), substring_for: Some(Value(Number("2", false))), special: true }

Expected behavior

No response

Additional context

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions