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

Parse wide OR and wide AND trees to flat OR/AND trees

Log workAgile BoardRank to TopRank to BottomBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.3.0, 2.0.0
    • None
    • Logical Optimizer, UDF
    • None

    Description

      Deep trees of AND/OR are hard to traverse particularly when they are merely the same structure in nested form as a version of the operator that takes an arbitrary number of args.

      One potential way to convert the DFS searches into a simpler BFS search is to introduce a new Operator pair named ALL and ANY.

      ALL(A, B, C, D, E) represents AND(AND(AND(AND(E, D), C), B), A)

      ANY(A, B, C, D, E) represents OR(OR(OR(OR(E, D), C),B),A)

      The SemanticAnalyser would be responsible for generating these operators and this would mean that the depth and complexity of traversals for the simplest case of wide AND/OR trees would be trivial.

      Attachments

        1. HIVE-11398.5.patch
          163 kB
          jcamachorodriguez
        2. HIVE-11398.4.patch
          163 kB
          jcamachorodriguez
        3. HIVE-11398.3.patch
          214 kB
          jcamachorodriguez
        4. HIVE-11398.2.patch
          195 kB
          jcamachorodriguez
        5. HIVE-11398.patch
          13 kB
          jcamachorodriguez

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            jcamacho Jesús Camacho Rodríguez Assign to me
            gopalv Gopal Vijayaraghavan
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment