Github user viirya commented on a diff in the pull request:
https://github.com/apache/spark/pull/19492#discussion_r144834116
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/json/JacksonParser.scala
---
@@ -35,19 +35,25 @@ import org.apache.spark.util.Utils
/**
* Constructs a parser for a given schema that translates a json string to
an [[InternalRow]].
*/
-class JacksonParser(
- schema: StructType,
+private[sql] class JacksonParser(
+ schema: DataType,
val options: JSONOptions) extends Logging {
import JacksonUtils._
import com.fasterxml.jackson.core.JsonToken._
+ def this(schema: StructType, options: JSONOptions) = this(schema:
DataType, options)
+ def this(schema: ArrayType, options: JSONOptions) = this(schema:
DataType, options)
--- End diff --
If so, then I think the default constructor should be private?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]