You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "strongduanmu (via GitHub)" <gi...@apache.org> on 2023/03/30 05:56:41 UTC

[GitHub] [shardingsphere] strongduanmu commented on a diff in pull request #24888: support for Char function

strongduanmu commented on code in PR #24888:
URL: https://github.com/apache/shardingsphere/pull/24888#discussion_r1152766465


##########
test/it/parser/src/main/resources/case/dml/select-special-function.xml:
##########
@@ -125,10 +125,26 @@
         </projections>
     </select>
     <select sql-case-id="select_char">
-        <projections start-index="7" stop-index="29">
-            <expression-projection text="CHAR(77,121,83,81,'76')" start-index="7" stop-index="29">
+        <projections start-index="7" stop-index="44">

Review Comment:
   Why modify `stop-index` to `44`? The projection stop index in sql `SELECT CHAR(77,121,83,81,'76')` is 29, you should keep it with correct value.



##########
test/it/parser/src/main/resources/case/dml/select-special-function.xml:
##########
@@ -125,10 +125,26 @@
         </projections>
     </select>
     <select sql-case-id="select_char">
-        <projections start-index="7" stop-index="29">
-            <expression-projection text="CHAR(77,121,83,81,'76')" start-index="7" stop-index="29">
+        <projections start-index="7" stop-index="44">
+            <expression-projection text="CHAR(77,121,83,81,'76')" start-index="7" stop-index="44">
                 <expr>
-                    <function function-name="CHAR" start-index="7" stop-index="29" text="CHAR(77,121,83,81,'76')" />
+                    <function function-name="CHAR" start-index="7" stop-index="44" text="CHAR(77,121,83,81,'76')" >
+                        <parameter>
+                            <literal-expression value="77" start-index="12" stop-index="13" />
+                        </parameter>
+                        <parameter>
+                            <literal-expression value="121" start-index="15" stop-index="17" />
+                        </parameter>
+                        <parameter>
+                            <literal-expression value="83" start-index="20" stop-index="21" />
+                        </parameter>
+                        <parameter>
+                            <literal-expression value="81" start-index="24" stop-index="25" />
+                        </parameter>
+                        <parameter>
+                            <literal-expression value="'76'" start-index="29" stop-index="32" />

Review Comment:
   This start-index and stop-index seems also wrong.



-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org