Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.2.0-incubating
    • Component/s: None
    • Labels:

      Description

      It seems our handling of Date types is not correct. We serialize to a String but then try to read back as a Date object.

      Jackson actually says explicitly to not use java.sql.Date: http://wiki.fasterxml.com/JacksonFAQDateHandling

      Perhaps related to CALCITE-64.

      1. 660test.patch
        2 kB
        Nick Dimiduk

        Issue Links

          Activity

          Hide
          ndimiduk Nick Dimiduk added a comment -

          Here's a unit test that demonstrates the problem.

          Show
          ndimiduk Nick Dimiduk added a comment - Here's a unit test that demonstrates the problem.
          Hide
          ndimiduk Nick Dimiduk added a comment -

          Julian Hyde mind taking a look at this one?

          Show
          ndimiduk Nick Dimiduk added a comment - Julian Hyde mind taking a look at this one?
          Hide
          julianhyde Julian Hyde added a comment -

          It is definitely wrong that we are sending dates over the wire. We should be sending int values (for DATE, TIME) or long values (for TIMESTAMP). That is what Calcite uses. I wonder if JdbcMeta needs to be fixed.

          I'll get to it on Friday.

          Show
          julianhyde Julian Hyde added a comment - It is definitely wrong that we are sending dates over the wire. We should be sending int values (for DATE, TIME) or long values (for TIMESTAMP). That is what Calcite uses. I wonder if JdbcMeta needs to be fixed. I'll get to it on Friday.
          Show
          julianhyde Julian Hyde added a comment - Fixed in http://git-wip-us.apache.org/repos/asf/incubator-calcite/commit/5648083f .
          Hide
          ndimiduk Nick Dimiduk added a comment -

          Thanks a log Julian Hyde!

          I'm seeing similar issues with setBytes() and the ByteString object. It looks like it's being deserialized as a LinkedHashMap who's key is "bytes" and value is a string. I'm not sure what the relationship is between the value and it's original.

          Trying adding a similar test but hsqldb isn't cooperating.

          Show
          ndimiduk Nick Dimiduk added a comment - Thanks a log Julian Hyde ! I'm seeing similar issues with setBytes() and the ByteString object. It looks like it's being deserialized as a LinkedHashMap who's key is "bytes" and value is a string. I'm not sure what the relationship is between the value and it's original. Trying adding a similar test but hsqldb isn't cooperating.
          Hide
          julianhyde Julian Hyde added a comment -

          Resolved in release 1.2.0-incubating (2015-04-16)

          Show
          julianhyde Julian Hyde added a comment - Resolved in release 1.2.0-incubating (2015-04-16)

            People

            • Assignee:
              julianhyde Julian Hyde
              Reporter:
              ndimiduk Nick Dimiduk
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development