Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-7373

Fix problems involving reading from DICT type

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.17.0
    • Fix Version/s: 1.17.0
    • Component/s: None
    • Labels:

      Description

      Add better support for different key types (boolean, decimal, float, double etc.) when retrieving values by key from DICT column when querying data source with known (during query validation phase) field types (such as Hive table), so that actual key object instance is created in generated code and is passed to given DICT reader instead of generating its value for every row based on int (ArraySegment) or String (NamedSegment) value.

      This may be achieved by storing original literal value of passed key (as Object) in PathSegment and its type (as MajorType) and using it during code generation when reading DICT's values by key in EvaluationVisitor.

      Also, fix NPE when reading some cases involving reading values from DICT and fix wrong result when reading complex structures using many ITEM operators (i.e. , [] brackets), e.g.

      SELECT rid, mc.map_arr_map['key01'][1]['key01.1'] p16 FROM hive.map_complex_tbl mc
      

      where map_arr_map is of following type: MAP<STRING, ARRAY<MAP<STRING, INT>>>

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                KazydubB Bohdan Kazydub
                Reporter:
                KazydubB Bohdan Kazydub
                Reviewer:
                Igor Guzenko
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: