Forgot to mention that there is a workaround that worked for me: format(toDate(toString(/fieldName, "UTF-8"), "yyyy-MM-dd HH:mm:ss"), "yyyy-MM-dd HH:mm:ss")
On Tue, Dec 11, 2018 at 11:31 AM Mike Thomsen <[email protected]> wrote: > FYI, ran into this bug. It's fixed in 1.9.0-SNAPSHOT > > 1. Declare an avro timestamp-millis field. > 2. Try to convert to string with format(/fieldName, "yyyy-MM-dd") > > Get an exception saying DataTypeUtils cannot convert java.sql.Timestamp to > java.sql.Date > > This is the line that fixed it, FWIW, in 1.9.0-SNAPSHOT (sharing so others > can give it a quick review): > > if (value instanceof java.util.Date) { > java.util.Date _temp = (java.util.Date)value; > return new Date(_temp.getTime()); > } > > >
