Uploaded image for project: 'HPCC'
  1. HPCC
  2. HPCC-16478

New TRANSITION operator

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Accepted
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Code Generator, Roxie, Thor
    • Labels:
      None
    • Compatibility:
      Major

      Description

      The original need was for an index read to be able to return the first record that matches a condition, and the next row that doesn't match a condition - to allow running totals to be stored in the index, and using the difference in the two values to calculate deltas.

      Then to allow (low cardinality) wildcards we realised that you would need to return multiple sets of paired rows. Finally similar semantics would be very useful for spotting transitions in log files etc.

      The proposal is for something like:

      TRANSITION(dataset, filter, flags-to-indicate-which-rows-to-return)

      The flags would indicate whether you want the rows before/after a transition from false->true, and similarly before/after a transition from true to false. Syntax to be agreed.

      It may only support after(false->true and true->false) on indexes in the first instance.

      NOTE: Care would be taken to ensure duplicate rows were not added (e.g., if part of multiple transitions, or merging from multiple wildcarded prefixes introduced spurious transitions).

        Attachments

          Activity

            People

            • Assignee:
              ghalliday Gavin Halliday
              Reporter:
              ghalliday Gavin Halliday
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: