Github user twalthr commented on a diff in the pull request:
https://github.com/apache/flink/pull/1958#discussion_r62843680
--- Diff:
flink-libraries/flink-table/src/main/scala/org/apache/flink/api/scala/table/expressionDsl.scala
---
@@ -130,19 +130,17 @@ trait ImplicitExpressionOperations {
* @param endIndex last character of the substring (starting at 1,
inclusive)
* @return substring
*/
- def substring(beginIndex: Expression, endIndex: Expression) = {
- Call(BuiltInFunctionNames.SUBSTRING, expr, beginIndex, endIndex)
- }
+ def substring(beginIndex: Expression, endIndex: Expression) =
+ SubString(expr, beginIndex, endIndex)
/**
* Creates a substring of the given string beginning at the given index
to the end.
*
* @param beginIndex first character of the substring (starting at 1,
inclusive)
* @return substring
*/
- def substring(beginIndex: Expression) = {
- Call(BuiltInFunctionNames.SUBSTRING, expr, beginIndex)
- }
+ def substring(beginIndex: Expression) =
+ new SubString(expr, beginIndex)
--- End diff --
`new` can be removed.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---