Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-1587

Error deserializing empty array (which represents null)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 4.3.0, 3.3.0
    • None
    • None

    Description

      Serializing null arrays results in an empty byte[]. The deserialization logic in PArrayDataType#createPhoenixArray has a check to return null if the provided byte[] is empty, however it checks the length of the byte[] rather than the provided length parameter. Note that the provided byte[] is typically the whole underlying row; it has to be interpreted only from offset to length.

      Therefor, the check has to be replaced with a check on length rather than on bytes.length.

      Attachments

        1. PHOENIX-1587.patch
          1 kB
          Jan Van Besien
        2. unit-test-for-PHOENIX-1587.patch
          2 kB
          Jan Van Besien

        Activity

          People

            janvanbesien Jan Van Besien
            janvanbesien Jan Van Besien
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: