Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-26454

BINARY types within complex types are not quoted

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      While STRINGs are quoted and escaped, this is not done for BINARY members:
      select named_struct("s", "a", "b", cast("a" as binary));
      result:

      {"s":"a","b":a}

      This is mainly problematic if special characters are involved, as this can lead to totally unparseble JSON:
      select named_struct("s", "a \"{", "b", cast("a \"{" as binary));
      result: {"s":"a \"{","b":a "{}

      As existing workloads may rely on the current behavior, I think that it would be the best to add a configuration for this.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              csringhofer Csaba Ringhofer
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: