Azure-Samples / cdm-azure-data-services-integration

Tutorials and sample code for integrating CDM folders with Azure Data Services
MIT License
70 stars 46 forks source link

java.lang.String cannot be cast to org.apache.spark.unsafe.types.UTF8String #15

Open Mimetis opened 5 years ago

Mimetis commented 5 years ago

Please provide us with the following information:

This issue is for a: (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

I make a cross post here, from the repository https://github.com/Azure/spark-cdm

See issue https://github.com/Azure/spark-cdm/issues/3

The issue is related to the new 2.4 spark-cdm branch, allowing to use spark 2.4 It seems we still have an issue when calling function like display(foo):

java.lang.ClassCastException: java.lang.String cannot be cast to org.apache.spark.unsafe.types.UTF8String
    at org.apache.spark.sql.catalyst.expressions.BaseGenericInternalRow$class.getUTF8String(rows.scala:46)
shamv commented 5 years ago

Facing the same issue...Please share latest spark-cdm-assembly-0.3.jar file to address this.

shamv commented 5 years ago

image image

java.lang.String cannot be cast to org.apache.spark.unsafe.types.UTF8String at org.apache.spark.sql.catalyst.expressions.BaseGenericInternalRow$class.getUTF8String(rows.scala:46) at org.apache.spark.sql.catalyst.expressions.GenericInternalRow.getUTF8String(rows.scala:195)