Skip to content

Commit e7b3941

Browse files
committed
more permisive checking for function registration
1 parent da91ba7 commit e7b3941

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveContext.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ class HiveContext(sc: SparkContext) extends SQLContext(sc) {
407407
}
408408

409409
protected[hive] def runSqlHive(sql: String): Seq[String] = {
410-
if (sql.toLowerCase.startsWith("create temporary function")) {
410+
if (sql.toLowerCase.contains("create temporary function")) {
411411
executionHive.runSqlHive(sql)
412412
} else if (sql.trim.toLowerCase.startsWith("set")) {
413413
metadataHive.runSqlHive(sql)

0 commit comments

Comments
 (0)