LuciferYang commented on code in PR #43603:
URL: https://github.com/apache/spark/pull/43603#discussion_r1377847272


##########
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/parser/PlanParserSuite.scala:
##########
@@ -1678,23 +1678,27 @@ class PlanParserSuite extends AnalysisTest {
           List.empty, List.empty, None, None, false)))
 
     // verify with ROW FORMAT DELIMETED
+    val collectionItemsTerminated1 = '\u0002'

Review Comment:
   - '\u0002' corresponds to "STX" (Start of Text), a non-printing character 
used to mark the beginning of text.
   - '\u0003' corresponds to "ETX" (End of Text), a non-printing character used 
to mark the end of text.
   - '\u0004' corresponds to "EOT" (End of Transmission), a non-printing 
character used to mark the end of transmission.
   - '\u0005' corresponds to "ENQ" (Enquiry), a non-printing character used to 
inquire whether the receiving device is ready to receive data.
   
   I'm not sure if this cases really need to test using `non-printing 
characters` as delimiters, can we use printable characters for testing, so we 
can replace them with the actual corresponding characters. 
   
   If indeed we need to test using `non-printing characters` as delimiters, I 
think we can add a `@nowarn` annotation to suppress warnings at a fine 
granularity like:
   
   ```
       // verify with ROW FORMAT DELIMITED
       @nowarn("cat=deprecation")
       val sqlWithRowFormatDelimited: String =
         """
           |SELECT TRANSFORM(a, b, c)
           |  ROW FORMAT DELIMITED
           |  FIELDS TERMINATED BY '\t'
           |  COLLECTION ITEMS TERMINATED BY '\u0002'
           |  MAP KEYS TERMINATED BY '\u0003'
           |  LINES TERMINATED BY '\n'
           |  NULL DEFINED AS 'null'
           |  USING 'cat' AS (a, b, c)
           |  ROW FORMAT DELIMITED
           |  FIELDS TERMINATED BY '\t'
           |  COLLECTION ITEMS TERMINATED BY '\u0004'
           |  MAP KEYS TERMINATED BY '\u0005'
           |  LINES TERMINATED BY '\n'
           |  NULL DEFINED AS 'NULL'
           |FROM testData
       """.stripMargin
   
       assertEqual(
         sqlWithRowFormatDelimited,
   ```



-- 
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-unsubscr...@spark.apache.org

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


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

Reply via email to