Skip to content

SessionState::sql_to_expr does not report unconsumed input #16810

@pepijnve

Description

@pepijnve

Describe the bug

When the SQL string passed to SessionState::sql_to_expr contains trailing tokens this is silently ignored. This can lead to rather unexpected results. It would be better to report this situation as an error.

To Reproduce

Parse 1234 as foo.bar. This results in an expression with the alias foo. The unprocessed input .bar is silently ignored instead of producing a parse error.

Expected behavior

A parse error is reported when the SQL expression string contains unused content.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    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