You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "sandip-db (via GitHub)" <gi...@apache.org> on 2024/02/29 02:15:52 UTC

Re: [PR] [SPARK-47218][SQL] XML: Ignore commented row tags in XML tokenizer [spark]

sandip-db commented on code in PR #45325:
URL: https://github.com/apache/spark/pull/45325#discussion_r1506911224


##########
sql/core/src/test/resources/test-data/xml-resources/commented-row.xml:
##########
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<!-- Should read 1 to 8 without any 0s -->
+<ROWSET>
+    <ROW><a>1</a></ROW>
+    <!-- <ROW><a>0</a></ROW>-->
+    <ROW><a>2</a></ROW>
+    <!-- <ROW><a>0</a></ROW>-->
+    <ROW>
+        <!-- Just another comment -->
+        <a> <!-- before a value --> 3 <!-- after a value --></a>
+        <!-- <ROW>
+             <a>3</a>
+            </ROW> -->
+    </ROW>
+    <!-- --><ROW><!----><!----><a><!---->4<!----></a><!----></ROW><!-- -->
+    <!-- --> <!----><ROW><a>5</a></ROW><!--<ROW><a>0</a></ROW>--><ROW><a>6</a></ROW>
+    <ROW><a>7</a></ROW>
+    <!-- <ROW><a>0</a></ROW>-->
+    <ROW> <!-- 0 </ROW> --> <!-- --> <a> 8 </a> </ROW>
+    <ROW><a>9</a></ROW>
+    <NOTROW><!----></NOTROW>
+    <!----><!----><NOTROW><!----><!----></NOTROW><!----><!---->
+    <ROW><a>10</a></ROW>
+</ROWSET>

Review Comment:
   Add an unclosed comment scenario:
   ```suggestion
       <!-- <ROW><a>0</a></ROW>
   </ROWSET>
   ```



-- 
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: reviews-unsubscribe@spark.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org