Skip to content

Commit d325ffb

Browse files
gengliangwangsrowen
authored andcommitted
[SPARK-25851][SQL][MINOR] Fix deprecated API warning in SQLListener
## What changes were proposed in this pull request? In #21596, Jackson is upgraded to 2.9.6. There are some deprecated API warnings in SQLListener. Create a trivial PR to fix them. ``` [warn] SQLListener.scala:92: method uncheckedSimpleType in class TypeFactory is deprecated: see corresponding Javadoc for more information. [warn] val objectType = typeFactory.uncheckedSimpleType(classOf[Object]) [warn] [warn] SQLListener.scala:93: method constructSimpleType in class TypeFactory is deprecated: see corresponding Javadoc for more information. [warn] typeFactory.constructSimpleType(classOf[(_, _)], classOf[(_, _)], Array(objectType, objectType)) [warn] [warn] SQLListener.scala:97: method uncheckedSimpleType in class TypeFactory is deprecated: see corresponding Javadoc for more information. [warn] val longType = typeFactory.uncheckedSimpleType(classOf[Long]) [warn] [warn] SQLListener.scala:98: method constructSimpleType in class TypeFactory is deprecated: see corresponding Javadoc for more information. [warn] typeFactory.constructSimpleType(classOf[(_, _)], classOf[(_, _)], Array(longType, longType)) ``` ## How was this patch tested? Existing unit tests. Closes #22848 from gengliangwang/fixSQLListenerWarning. Authored-by: Gengliang Wang <[email protected]> Signed-off-by: Sean Owen <[email protected]>
1 parent 6aa5063 commit d325ffb

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

sql/core/src/main/scala/org/apache/spark/sql/execution/ui/SQLListener.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,12 @@ private class LongLongTupleConverter extends Converter[(Object, Object), (Long,
8989
}
9090

9191
override def getInputType(typeFactory: TypeFactory): JavaType = {
92-
val objectType = typeFactory.uncheckedSimpleType(classOf[Object])
93-
typeFactory.constructSimpleType(classOf[(_, _)], classOf[(_, _)], Array(objectType, objectType))
92+
val objectType = typeFactory.constructType(classOf[Object])
93+
typeFactory.constructSimpleType(classOf[(_, _)], Array(objectType, objectType))
9494
}
9595

9696
override def getOutputType(typeFactory: TypeFactory): JavaType = {
97-
val longType = typeFactory.uncheckedSimpleType(classOf[Long])
98-
typeFactory.constructSimpleType(classOf[(_, _)], classOf[(_, _)], Array(longType, longType))
97+
val longType = typeFactory.constructType(classOf[Long])
98+
typeFactory.constructSimpleType(classOf[(_, _)], Array(longType, longType))
9999
}
100100
}

0 commit comments

Comments
 (0)