hvanhovell commented on code in PR #41928:
URL: https://github.com/apache/spark/pull/41928#discussion_r1261822931
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/ParserUtils.scala:
##########
@@ -16,34 +16,20 @@
*/
package org.apache.spark.sql.catalyst.parser
-import java.lang.{Long => JLong}
-import java.nio.CharBuffer
import java.util
import java.util.Locale
import org.antlr.v4.runtime.{ParserRuleContext, Token}
import org.antlr.v4.runtime.misc.Interval
-import org.antlr.v4.runtime.tree.{ParseTree, TerminalNode, TerminalNodeImpl}
+import org.antlr.v4.runtime.tree.{ParseTree, TerminalNodeImpl}
-import org.apache.spark.sql.catalyst.trees.{CurrentOrigin, Origin}
+import org.apache.spark.sql.catalyst.util.SparkParserUtils
import org.apache.spark.sql.errors.QueryParsingErrors
/**
* A collection of utility methods for use during the parsing process.
*/
-object ParserUtils {
-
- val U16_CHAR_PATTERN = """\\u([a-fA-F0-9]{4})(?s).*""".r
- val U32_CHAR_PATTERN = """\\U([a-fA-F0-9]{8})(?s).*""".r
- val OCTAL_CHAR_PATTERN = """\\([01][0-7]{2})(?s).*""".r
- val ESCAPED_CHAR_PATTERN = """\\((?s).)(?s).*""".r
-
- /** Get the command which created the token. */
- def command(ctx: ParserRuleContext): String = {
- val stream = ctx.getStart.getInputStream
- stream.getText(Interval.of(0, stream.size() - 1))
- }
-
+object ParserUtils extends SparkParserUtils {
Review Comment:
Can't you move the entire utils class?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]