This is an automated email from the ASF dual-hosted git repository.
zhangliang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new e9f1b4bfbb9 Fixed Test Cases in xml files. All checks passing (#33335)
e9f1b4bfbb9 is described below
commit e9f1b4bfbb99d15df1e743243b70013ce7ae9b74
Author: Ganesh <[email protected]>
AuthorDate: Thu Nov 21 07:55:03 2024 +0530
Fixed Test Cases in xml files. All checks passing (#33335)
---
.../resources/case/dml/select-math-function.xml | 31 ++++++++++++
.../resources/case/dml/select-special-function.xml | 59 ++++++++++++++++++++++
.../sql/supported/dml/select-math-function.xml | 2 +
.../sql/supported/dml/select-special-function.xml | 4 ++
4 files changed, 96 insertions(+)
diff --git
a/test/it/parser/src/main/resources/case/dml/select-math-function.xml
b/test/it/parser/src/main/resources/case/dml/select-math-function.xml
index 484f7e1805b..bbf762aeea3 100644
--- a/test/it/parser/src/main/resources/case/dml/select-math-function.xml
+++ b/test/it/parser/src/main/resources/case/dml/select-math-function.xml
@@ -162,4 +162,35 @@
</expression-projection>
</projections>
</select>
+
+ <select sql-case-id="select_least">
+ <projections start-index="7" stop-index="17">
+ <expression-projection start-index="7" stop-index="17"
text="LEAST(2, 0)">
+ <expr>
+ <function start-index="7" stop-index="17"
function-name="LEAST" text="LEAST(2, 0)">
+ <parameter>
+ <literal-expression start-index="13"
stop-index="13" value="2"/>
+ </parameter>
+ <parameter>
+ <literal-expression start-index="16"
stop-index="16" value="0"/>
+ </parameter>
+ </function>
+ </expr>
+ </expression-projection>
+ </projections>
+ </select>
+
+ <select sql-case-id="select_ln">
+ <projections start-index="7" stop-index="11">
+ <expression-projection start-index="7" stop-index="11"
text="LN(2)">
+ <expr>
+ <function start-index="7" stop-index="11"
function-name="LN" text="LN(2)">
+ <parameter>
+ <literal-expression start-index="10"
stop-index="10" value="2"/>
+ </parameter>
+ </function>
+ </expr>
+ </expression-projection>
+ </projections>
+ </select>
</sql-parser-test-cases>
diff --git
a/test/it/parser/src/main/resources/case/dml/select-special-function.xml
b/test/it/parser/src/main/resources/case/dml/select-special-function.xml
index c5e9fe11de0..ac2e2441214 100644
--- a/test/it/parser/src/main/resources/case/dml/select-special-function.xml
+++ b/test/it/parser/src/main/resources/case/dml/select-special-function.xml
@@ -4764,4 +4764,63 @@
</expression-projection>
</projections>
</select>
+
+ <select sql-case-id="select_lcase_function">
+ <projections start-index="7" stop-index="28">
+ <expression-projection start-index="7" stop-index="28"
text="LCASE('QUADRATICALLY')">
+ <expr>
+ <function start-index="7" stop-index="28"
function-name="LCASE" text="LCASE('QUADRATICALLY')">
+ <parameter>
+ <literal-expression start-index="13"
stop-index="27" value="QUADRATICALLY"/>
+ </parameter>
+ </function>
+ </expr>
+ </expression-projection>
+ </projections>
+ </select>
+
+ <select sql-case-id="select_lower_function">
+ <projections start-index="7" stop-index="28">
+ <expression-projection start-index="7" stop-index="28"
text="LOWER('QUADRATICALLY')">
+ <expr>
+ <function start-index="7" stop-index="28"
function-name="LOWER" text="LOWER('QUADRATICALLY')">
+ <parameter>
+ <literal-expression start-index="13"
stop-index="27" value="QUADRATICALLY"/>
+ </parameter>
+ </function>
+ </expr>
+ </expression-projection>
+ </projections>
+ </select>
+
+ <select sql-case-id="select_length">
+ <projections start-index="7" stop-index="20">
+ <expression-projection start-index="7" stop-index="20"
text="LENGTH('TEXT')">
+ <expr>
+ <function start-index="7" stop-index="20"
function-name="LENGTH" text="LENGTH('TEXT')">
+ <parameter>
+ <literal-expression start-index="14"
stop-index="19" value="TEXT"/>
+ </parameter>
+ </function>
+ </expr>
+ </expression-projection>
+ </projections>
+ </select>
+
+ <select sql-case-id="select_locate">
+ <projections start-index="7" stop-index="31">
+ <expression-projection start-index="7" stop-index="31"
text="LOCATE('bar','foobarbar')">
+ <expr>
+ <function start-index="7" stop-index="31"
function-name="LOCATE" text="LOCATE('bar','foobarbar')">
+ <parameter>
+ <literal-expression value="bar" start-index="14"
stop-index="18"/>
+ </parameter>
+ <parameter>
+ <literal-expression value="foobarbar"
start-index="20" stop-index="30"/>
+ </parameter>
+ </function>
+ </expr>
+ </expression-projection>
+ </projections>
+ </select>
</sql-parser-test-cases>
diff --git
a/test/it/parser/src/main/resources/sql/supported/dml/select-math-function.xml
b/test/it/parser/src/main/resources/sql/supported/dml/select-math-function.xml
index 4f9a93f13ca..39d36b7b1c8 100644
---
a/test/it/parser/src/main/resources/sql/supported/dml/select-math-function.xml
+++
b/test/it/parser/src/main/resources/sql/supported/dml/select-math-function.xml
@@ -26,4 +26,6 @@
<sql-case id="select_power" value="SELECT POWER(2,2)" db-types="MySQL" />
<sql-case id="select_rand" value="SELECT RAND()" db-types="MySQL" />
<sql-case id="select_radians" value="SELECT RADIANS(90)" db-types="MySQL"
/>
+ <sql-case id="select_least" value="SELECT LEAST(2, 0)" db-types="MySQL" />
+ <sql-case id="select_ln" value="SELECT LN(2)" db-types="MySQL" />
</sql-cases>
diff --git
a/test/it/parser/src/main/resources/sql/supported/dml/select-special-function.xml
b/test/it/parser/src/main/resources/sql/supported/dml/select-special-function.xml
index 3cfeb4a4fa0..8d8dcd4a0e8 100644
---
a/test/it/parser/src/main/resources/sql/supported/dml/select-special-function.xml
+++
b/test/it/parser/src/main/resources/sql/supported/dml/select-special-function.xml
@@ -275,4 +275,8 @@
<sql-case id="select_bitxor" value="SELECT BITXOR(3,5)" db-types="Doris" />
<sql-case id="select_instr" value="SELECT INSTR('foobar','bar')"
db-types="Doris" />
<sql-case id="select_strright" value="SELECT STRRIGHT('foobarbar',4)"
db-types="Doris" />
+ <sql-case id="select_lcase_function" value="SELECT LCASE('QUADRATICALLY')"
db-types="MySQL" />
+ <sql-case id="select_lower_function" value="SELECT LOWER('QUADRATICALLY')"
db-types="MySQL" />
+ <sql-case id="select_length" value="SELECT LENGTH('TEXT')"
db-types="MySQL" />
+ <sql-case id="select_locate" value="SELECT LOCATE('bar','foobarbar')"
db-types="MySQL" />
</sql-cases>