[SPARK-25851][SQL][MINOR] Fix deprecated API warning in SQLListener

## What changes were proposed in this pull request?

In https://github.com/apache/spark/pull/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 <gengliang.wang@databricks.com>
Signed-off-by: Sean Owen <sean.owen@databricks.com>
This commit is contained in:
Gengliang Wang 2018-10-26 16:45:56 -05:00 committed by Sean Owen
parent 6aa5063949
commit d325ffbf3a

View file

@ -89,12 +89,12 @@ private class LongLongTupleConverter extends Converter[(Object, Object), (Long,
}
override def getInputType(typeFactory: TypeFactory): JavaType = {
val objectType = typeFactory.uncheckedSimpleType(classOf[Object])
typeFactory.constructSimpleType(classOf[(_, _)], classOf[(_, _)], Array(objectType, objectType))
val objectType = typeFactory.constructType(classOf[Object])
typeFactory.constructSimpleType(classOf[(_, _)], Array(objectType, objectType))
}
override def getOutputType(typeFactory: TypeFactory): JavaType = {
val longType = typeFactory.uncheckedSimpleType(classOf[Long])
typeFactory.constructSimpleType(classOf[(_, _)], classOf[(_, _)], Array(longType, longType))
val longType = typeFactory.constructType(classOf[Long])
typeFactory.constructSimpleType(classOf[(_, _)], Array(longType, longType))
}
}