Skip to content
Prev Previous commit
Next Next commit
fix bug
  • Loading branch information
AngersZhuuuu committed Oct 8, 2019
commit ba22b627acc254a0ff9798477f6580191e1bfe4b
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import org.apache.spark.sql.catalyst.FunctionIdentifier
import org.apache.spark.sql.catalyst.analysis.{FunctionRegistry, NoSuchFunctionException}
import org.apache.spark.sql.catalyst.catalog.{CatalogFunction, FunctionResource}
import org.apache.spark.sql.catalyst.expressions.{Attribute, ExpressionInfo}
import org.apache.spark.sql.catalyst.util.StringUtils
import org.apache.spark.sql.types.{StringType, StructField, StructType}


Expand Down Expand Up @@ -222,6 +223,8 @@ case class ShowFunctionsCommand(
case (f, "USER") if showUserFunctions => f.unquotedString
case (f, "SYSTEM") if showSystemFunctions => f.unquotedString
}
(functionNames ++ Seq("!=", "<>", "between", "case")).sorted.map(Row(_))
(functionNames ++
StringUtils.filterPattern(Seq("!=", "<>", "between", "case"), pattern.getOrElse("*")))
.sorted.map(Row(_))
}
}