I know it sounds medieval but we basically used String for that fields 😢
So I guess, the most flexible and easy solution would be to have a field:
dateTypeClass where user could provide a full path to the desired class. Let it be current Calendar, Date or String.
steps
define schema A that has
type="dt:date"
element compile them.problem
expectation
Spark Encoders are actually a bit of pain in the ***, because there is not a lot of them right now: https://spark.apache.org/docs/2.1.0/api/java/org/apache/spark/sql/Encoders.html
So even the types prosed in https://github.com/eed3si9n/scalaxb/issues/376 will not solve the issue, because there is only an Encoder for
java.sql.Date
andjava.sql.Timestamp
I know it sounds medieval but we basically used
String
for that fields 😢So I guess, the most flexible and easy solution would be to have a field: dateTypeClass where user could provide a full path to the desired class. Let it be current Calendar, Date or String.
WDYT?