File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed
catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical
hive/src/main/scala/org/apache/spark/sql/hive Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -101,8 +101,17 @@ abstract class LogicalPlan extends QueryPlan[LogicalPlan] {
101
101
val options = input.flatMap { option =>
102
102
// If the first part of the desired name matches a qualifier for this possible match, drop it.
103
103
val remainingParts =
104
- if (option.qualifiers.filter(resolver(_, parts.head)).nonEmpty && parts.size > 1 ) parts.drop(1 ) else parts
105
- if (resolver(option.name, remainingParts.head)) (option, remainingParts.tail.toList) :: Nil else Nil
104
+ if (option.qualifiers.filter(resolver(_, parts.head)).nonEmpty && parts.size > 1 ) {
105
+ parts.drop(1 )
106
+ } else {
107
+ parts
108
+ }
109
+
110
+ if (resolver(option.name, remainingParts.head)) {
111
+ (option, remainingParts.tail.toList) :: Nil
112
+ } else {
113
+ Nil
114
+ }
106
115
}
107
116
108
117
options.distinct match {
Original file line number Diff line number Diff line change @@ -42,8 +42,9 @@ private[hive] abstract class HiveFunctionRegistry
42
42
def lookupFunction (name : String , children : Seq [Expression ]): Expression = {
43
43
// We only look it up to see if it exists, but do not include it in the HiveUDF since it is
44
44
// not always serializable.
45
- val functionInfo : FunctionInfo = Option (FunctionRegistry .getFunctionInfo(name.toLowerCase)).getOrElse(
46
- sys.error(s " Couldn't find function $name" ))
45
+ val functionInfo : FunctionInfo =
46
+ Option (FunctionRegistry .getFunctionInfo(name.toLowerCase)).getOrElse(
47
+ sys.error(s " Couldn't find function $name" ))
47
48
48
49
val functionClassName = functionInfo.getFunctionClass.getName
49
50
You can’t perform that action at this time.
0 commit comments