Uploaded image for project: 'Spark Connector'
  1. Spark Connector
  2. SPARK-44

Mongo Date type breaks load

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None

      Records, which contain date type, e.g.:

      { "_id" : ObjectId("5733062119afaa698d1a0398"), "a" : ISODate("2015-12-31T23:00:00Z") }
      

      Throw an exception on load.

      case _: DateType      => new Date(element.asInstanceOf[Date].getTime)
      

      Here the Date constructor is java.util.Date, while Spark expects java.sql.Date

            Assignee:
            Unassigned Unassigned
            Reporter:
            lokm01 Jan Scherbaum
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: