From bc2a7bd5f7118f0ff7fa8aa6bf689896db056ef3 Mon Sep 17 00:00:00 2001 From: Andrew Or Date: Wed, 11 May 2016 17:34:18 -0700 Subject: [PATCH] Remove unnecessary method --- .../apache/spark/sql/execution/SparkSqlParser.scala | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/sql/core/src/main/scala/org/apache/spark/sql/execution/SparkSqlParser.scala b/sql/core/src/main/scala/org/apache/spark/sql/execution/SparkSqlParser.scala index af775a51dc337..aba8cf380f401 100644 --- a/sql/core/src/main/scala/org/apache/spark/sql/execution/SparkSqlParser.scala +++ b/sql/core/src/main/scala/org/apache/spark/sql/execution/SparkSqlParser.scala @@ -951,7 +951,9 @@ class SparkSqlAstBuilder(conf: SQLConf) extends AstBuilder { rowFormatCtx: RowFormatContext, createFileFormatCtx: CreateFileFormatContext, parentCtx: ParserRuleContext): Unit = { - val cff = createFileFormatContextString(createFileFormatCtx) + val cff = (0 until createFileFormatCtx.getChildCount) + .map { i => createFileFormatCtx.getChild(i).getText } + .mkString(" ") (rowFormatCtx, createFileFormatCtx.fileFormat) match { case (rf, null) => // only row format, no conflict case (null, ff) => // only file format, no conflict @@ -977,13 +979,6 @@ class SparkSqlAstBuilder(conf: SQLConf) extends AstBuilder { } } - /** - * Helper method to convert a [[CreateFileFormatContext]] to a human-readable form. - */ - private def createFileFormatContextString(ctx: CreateFileFormatContext): String = { - (0 until ctx.getChildCount).map { i => ctx.getChild(i).getText }.mkString(" ") - } - /** * Create or replace a view. This creates a [[CreateViewCommand]] command. *