Details
-
Sub-task
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
Description
TableAPI testAllPassingFilter:
val t = util.addTable[(Int, Long, String)]('int, 'long, 'string) val resScala = t.filter(Literal(true)).select('int as 'myInt, 'string) val resJava = t.filter("TrUe").select("int as myInt, string")
We got error:
org.apache.flink.table.api.ValidationException: Cannot resolve [TrUe] given input [int, long, string].
The error is caused by :
lazy val boolLiteral: PackratParser[Expression] = ("true" | "false") ^^ { str => Literal(str.toBoolean) }
I want improve the method as follow:
lazy val boolLiteral: PackratParser[Expression] = ("(t|T)(r|R)(u|U)(e|E)".r | "(f|F)(a|A)(l|L)(s|S)(e|E)".r) ^^ { str => Literal(str.toBoolean)}
Is there any drawback to this improvement? Welcome anyone feedback ?
Attachments
Issue Links
- links to