Apache Drill
  1. Apache Drill
  2. DRILL-29

Implement Flatten Reference Operator

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.0.0-milestone-1
    • Labels:

      Description

      Flatten (1)

      Flatten will generate one or more output records based on a single input record. The output record will be the input record along with an appended additional appended field(s) for the flattening. The specific behavior depends upon the type of the flatten expression provided. In all cases, the drop parameter defines whether or not all fields referenced in the target expression are maintained in the output record or removed.
      Scalar/Map: In the case that the provided expression returns a scalar or map, flatten will return a single record for each input record with one additional field at the ref location defined with the same value as the input expression.
      Array: If the provided expression returns an array, flatten will return multiple copies of the original input record where each is appended with the value within the array at the ref position.

      { @id†: <opref>, op: “flatten”, input†: <input>, ref: <name>, expr: <expr>, drop: <boolean> }

        Activity

        Timothy Chen created issue -
        Jacques Nadeau made changes -
        Field Original Value New Value
        Description Flatten (1)

        Flatten will generate one or more output records based on a single input record. The output record will be the input record along with an appended additional appended field(s) for the flattening. The specific behavior depends upon the type of the flatten expression provided. In all cases, the drop parameter defines whether or not all fields referenced in the target expression are maintained in the output record or removed.
        Scalar: In the case that the provided expression returns a scalar, flatten will return a single record for each input record with one additional field at the ref location defined with the same value as the input expression.
        Array: If the provided expression returns an array, flatten will return multiple copies of the original input record where each is appended with the value within the array at the ref position.
        Map: ?? (Throw)

        { @id†: <opref>, op: “flatten”,

          input†: <input>,

          ref: <name>,

          expr: <expr>,

          drop: <boolean>

        }
        Flatten (1)

        Flatten will generate one or more output records based on a single input record. The output record will be the input record along with an appended additional appended field(s) for the flattening. The specific behavior depends upon the type of the flatten expression provided. In all cases, the drop parameter defines whether or not all fields referenced in the target expression are maintained in the output record or removed.
        Scalar/Map: In the case that the provided expression returns a scalar or map, flatten will return a single record for each input record with one additional field at the ref location defined with the same value as the input expression.
        Array: If the provided expression returns an array, flatten will return multiple copies of the original input record where each is appended with the value within the array at the ref position.


        { @id†: <opref>, op: “flatten”,

          input†: <input>,

          ref: <name>,

          expr: <expr>,

          drop: <boolean>

        }
        Hide
        Jacques Nadeau added a comment -

        Updated original description so that flatten is effectively a transform for scalar and map values.

        Show
        Jacques Nadeau added a comment - Updated original description so that flatten is effectively a transform for scalar and map values.
        Jacques Nadeau made changes -
        Assignee Christopher Merrick [ cmerrick ]
        Hide
        Jacques Nadeau added a comment -

        merged into master. I flattened changes into a single commit for master.

        Show
        Jacques Nadeau added a comment - merged into master. I flattened changes into a single commit for master.
        Jacques Nadeau made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Jake Farrell made changes -
        Workflow jira [ 12759252 ] no-reopen-closed, patch-avail [ 12807513 ]
        Jacques Nadeau made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Jacques Nadeau made changes -
        Target Version/s M1 [ 12324669 ]
        Fix Version/s M1 [ 12324669 ]

          People

          • Assignee:
            Christopher Merrick
            Reporter:
            Timothy Chen
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development