File tree Expand file tree Collapse file tree 1 file changed +0
-13
lines changed
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/encoders Expand file tree Collapse file tree 1 file changed +0
-13
lines changed Original file line number Diff line number Diff line change @@ -60,19 +60,6 @@ object ExpressionEncoder {
6060 ClassTag [T ](cls))
6161 }
6262
63- /**
64- * Unlike apply(), this method return None instead of throwing exception
65- * when there's no encoder found for the type `T`. This's mainly used for
66- * typed Scala UDF to workaround 'Any' type.
67- */
68- def applyOption [T : TypeTag ](): Option [ExpressionEncoder [T ]] = {
69- try {
70- Option (ExpressionEncoder [T ]())
71- } catch {
72- case _ : Exception => None
73- }
74- }
75-
7663 // TODO: improve error message for java bean encoder.
7764 def javaBean [T ](beanClass : Class [T ]): ExpressionEncoder [T ] = {
7865 val schema = JavaTypeInference .inferDataType(beanClass)._1
You can’t perform that action at this time.
0 commit comments