You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "hailong wang (Jira)" <ji...@apache.org> on 2020/10/29 12:44:00 UTC
[jira] [Commented] (FLINK-19753) Introduce 'STRCMP' function to
compare between two string fields
[ https://issues.apache.org/jira/browse/FLINK-19753?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17222874#comment-17222874 ]
hailong wang commented on FLINK-19753:
--------------------------------------
Hi [~jark] Is it reasonable to support STRCMP function? If yes, I would like to fix in 1.12.
> Introduce 'STRCMP' function to compare between two string fields
> ----------------------------------------------------------------
>
> Key: FLINK-19753
> URL: https://issues.apache.org/jira/browse/FLINK-19753
> Project: Flink
> Issue Type: New Feature
> Components: Table SQL / Planner
> Affects Versions: 1.11.0
> Reporter: hailong wang
> Priority: Major
>
> 'STRCMP' function have be supported by mysql[1] and calcite[2] which is useful to compare two string fields.
> 'STRCMP' function result type is Integer, and arguments are two string fields.
> 1. 0 if both of the strings are same and returns.
> 2. -1 when the first argument is smaller than the second according to the defined order.
> 3. 1 when the second one is smaller the first one.
> [1] [https://dev.mysql.com/doc/refman/8.0/en/string-comparison-functions.html#function_strcmp]
> [2] https://issues.apache.org/jira/browse/CALCITE-3704
--
This message was sent by Atlassian Jira
(v8.3.4#803005)