cloud-fan commented on a change in pull request #23276: [SPARK-26321][SQL]
Improve the behavior of sql text splitting for the spark-sql command line
URL: https://github.com/apache/spark/pull/23276#discussion_r251279142
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/StringUtils.scala
##########
@@ -90,12 +93,145 @@ object StringUtils {
funcNames.toSeq
}
+ /**
+ * Split the text into one or more SQLs with bracketed comments reserved
+ *
+ * Highlighted Corner Cases: semicolon in double quotes, single quotes or
inline comments.
+ * Expected Behavior: The blanks will be trimed and a blank line will be
omitted.
+ *
+ * @param text One or more SQLs separated by semicolons
+ * @return the trimmed SQL array (Array is for Java introp)
+ */
+ def split(text: String): Array[String] = {
Review comment:
where do we call this method?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]