We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3f7b2d8 commit 6edf7f8Copy full SHA for 6edf7f8
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/CatalystTypeConverters.scala
@@ -353,6 +353,15 @@ object CatalystTypeConverters {
353
case other => other
354
}
355
356
+ /**
357
+ * Converts Catalyst types used internally in rows to standard Scala types
358
+ * This method is slow, and for batch conversion you should be using converter
359
+ * produced by createToScalaConverter.
360
+ */
361
+ def convertToScala(catalystValue: Any, dataType: DataType): Any = {
362
+ getConverterForType(dataType).toScala(catalystValue)
363
+ }
364
+
365
/**
366
* Creates a converter function that will convert Catalyst types to Scala type.
367
* Typical use case would be converting a collection of rows that have the same schema. You will
0 commit comments