Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BooleanType not supported #65

Open
ravindraSB opened this issue Dec 29, 2020 · 0 comments
Open

BooleanType not supported #65

ravindraSB opened this issue Dec 29, 2020 · 0 comments

Comments

@ravindraSB
Copy link

    val reader  = spark
      .read
      .format("com.springml.spark.salesforce")
      .option("username", config.userName)
      .option("password", config.password) 
      .option("login", s"${config.url}${config.apiVersion}")
      .option("inferSchema", "true")
      .option("dateFormat", "yyyy-MM-dd'T'HH:mm:ss.SSS")
      .option("version", config.apiVersion)
      .option("soql", query)

With the reader created as above, upon reading I see following error -
Job aborted due to stage failure: Task 0 in stage 1.0 failed 4 times, most recent failure: Lost task 0.3 in stage 1.0 (TID 53, 10.245.15.211, executor 8): java.lang.UnsupportedOperationException: Unexpected data type BooleanType
at com.springml.spark.salesforce.InferSchema$.inferField(InferSchema.scala:81)
at com.springml.spark.salesforce.InferSchema$.com$springml$spark$salesforce$InferSchema$$inferRowType(InferSchema.scala:47)
at com.springml.spark.salesforce.InferSchema$$anonfun$2.apply(InferSchema.scala:31)
at com.springml.spark.salesforce.InferSchema$$anonfun$2.apply(InferSchema.scala:31)
at scala.collection.TraversableOnce$$anonfun$foldLeft$1.apply(TraversableOnce.scala:157)
at scala.collection.TraversableOnce$$anonfun$foldLeft$1.apply(TraversableOnce.scala:157)
at scala.collection.Iterator$class.foreach(Iterator.scala:893)
at org.apache.spark.InterruptibleIterator.foreach(InterruptibleIterator.scala:28)
at scala.collection.TraversableOnce$class.foldLeft(TraversableOnce.scala:157)

It seems BooleanType is not supported during inferring schema. Is there a patch available, if this is not supported out of the box.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant