Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
1.35.0
Description
In SparkSQL, POSITION(substr, str[, pos]) function only accept comma-separated when there are 3 arguments.
For example:
// SparkSQL accepted SQL select POSITION('a', 'abc', 1);
Calcite will use the IN and FROM keyword to separate the input arguments when unparsing.
// Calcite accepted and unparsed SQL select POSITION('a' IN 'abc' FROM 1)
For 2 augument inputs, SparkSQL accept both syntaxes. So I think we should write a rule in SparkSqlDialect to convert keyword-separated syntax to comma-separted syntax for POSITION function.
Attachments
Issue Links
- links to