[
https://issues.apache.org/jira/browse/IOTDB-5736?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17709641#comment-17709641
]
xiaozhihong commented on IOTDB-5736:
------------------------------------
I verified.
> The old syntax of the string function substring needs to be removed
> -------------------------------------------------------------------
>
> Key: IOTDB-5736
> URL: https://issues.apache.org/jira/browse/IOTDB-5736
> Project: Apache IoTDB
> Issue Type: Bug
> Components: mpp-cluster
> Affects Versions: master branch
> Reporter: xiaozhihong
> Assignee: Zhijia Cao
> Priority: Major
> Labels: pull-request-available
>
> Branch : Master
> commit 40871077555ea07556aba185121bbcf1d12b5d0b
> The following SQL is about V1.1.X, as for new string function 'substring'
> need to remove, just need to support new grammar rules.
> The old SQL is : (noted: V1.1.x)
> {code:java}
> IoTDB> select s4,SUBSTRING(s4, 'start'='0','end'='2') from root.sg.d1;
> +-----------------------------+-------------+-----------------------------+
> | Time|root.sg.d1.s4|SUBSTRING(root.sg.d1.s4,null)|
> +-----------------------------+-------------+-----------------------------+
> |1970-01-01T08:00:00.001+08:00| 1731| 1731|
> |1970-01-01T08:00:00.002+08:00| 0.001| 0.001|
> |1970-01-01T08:00:00.003+08:00| 111| 111|
> |1970-01-01T08:00:00.004+08:00| warn:-8721| warn:-8721|
> |1970-01-01T08:00:00.005+08:00| error:-37229| error:-37229|
> |1970-01-01T08:00:00.006+08:00| 100| 100|
> |1970-01-01T08:00:00.007+08:00| FALSE| FALSE|
> |1970-01-01T08:00:00.008+08:00| warn:-8721| warn:-8721|
> |1970-01-01T08:00:00.009+08:00| false| false|
> |1970-01-01T08:00:00.010+08:00| true| true|
> |1970-01-01T08:00:00.011+08:00| -37229.1| -37229.1|
> |1970-01-01T08:00:00.012+08:00| false| false|
> +-----------------------------+-------------+-----------------------------+
> Total line number = 12
> It costs 0.006s {code}
> The new SQL is :
> {code:java}
> IoTDB> select s4, substring(s4,3,2) from root.sg.d1;
> +-----------------------------+-------------+----------------------------+
> | Time|root.sg.d1.s4|SUBSTRING(root.sg.d1.s4,3,2)|
> +-----------------------------+-------------+----------------------------+
> |1970-01-01T08:00:00.001+08:00| 1731| 31|
> |1970-01-01T08:00:00.002+08:00| 0.001| 00|
> |1970-01-01T08:00:00.003+08:00| 111| 1|
> |1970-01-01T08:00:00.004+08:00| warn:-8721| rn|
> |1970-01-01T08:00:00.005+08:00| error:-37229| ro|
> |1970-01-01T08:00:00.006+08:00| 100| 0|
> |1970-01-01T08:00:00.007+08:00| FALSE| LS|
> |1970-01-01T08:00:00.008+08:00| warn:-8721| rn|
> |1970-01-01T08:00:00.009+08:00| false| ls|
> |1970-01-01T08:00:00.010+08:00| true| ue|
> |1970-01-01T08:00:00.011+08:00| -37229.1| 72|
> |1970-01-01T08:00:00.012+08:00| false| ls|
> +-----------------------------+-------------+----------------------------+
> Total line number = 12
> It costs 0.019s
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)