Uploaded image for project: 'ORC'
  1. ORC
  2. ORC-1047

[C++] Handle quoted field names during string schema parsing

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.8.0
    • 1.8.0
    • C++
    • None

    Description

      The current implementation of Type::buildTypeFromString cannot handle string schemas with quoted field names. The following code will raise a logic error of "Unrecognized character.":

      auto schema = Type::buildTypeFromString("struct<`quoted.field`:string>"); // Fails
      

      Besides that, two other limitations have been encountered:

      • Cannot parse a string schema that only has a timestamp with local time zone type in root.
        Type::buildTypeFromString("timestamp with local time zone"); // Fails
        
      • It allows to create struct types without setting a field name, which (based on the Java implementation) should not be a valid ORC schema.
        Type::buildTypeFromString("struct<struct<bigint>>"); // Works
        

      Attachments

        Issue Links

          Activity

            People

              noirello noirello
              noirello noirello
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: