lincoln-lil commented on code in PR #25156:
URL: https://github.com/apache/flink/pull/25156#discussion_r1730692658
##########
flink-python/pyflink/table/expression.py:
##########
@@ -1028,6 +1028,16 @@ def truncate(self, n: Union[int, 'Expression[int]'] = 0)
-> 'Expression[T]':
# ---------------------------- string functions
----------------------------------
+ def starts_with(self, start_expr) -> 'Expression':
+ """
+ Returns if expr begins with start_expr. If start_expr is empty, the
result is true.
Review Comment:
ditto
##########
docs/data/sql_functions.yml:
##########
@@ -329,6 +329,18 @@ string:
STRING1.overlay(STRING2, INT1)
STRING1.overlay(STRING2, INT1, INT2)
description: Returns a string that replaces INT2 (STRING2's length by
default) characters of STRING1 with STRING2 from position INT1. E.g.,
'xxxxxtest'.overlay('xxxx', 6) returns "xxxxxxxxx"; 'xxxxxtest'.overlay('xxxx',
6, 2) returns "xxxxxxxxxst".
+ - sql: STARTSWITH(expr, startExpr)
+ table: expr.startsWith(startExpr)
+ description: |
+ Returns if expr begins with startExpr. If startExpr is empty, the result
is true.
Review Comment:
-> "Returns whether expr starts with startExpr" ?
##########
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/internal/BaseExpressions.java:
##########
@@ -846,6 +847,19 @@ public OutType truncate() {
// String operations
+ /**
+ * Returns if {@code expr} begins with {@code startExpr}. If {@code
startExpr} is empty, the
Review Comment:
ditto
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]