Pig
  1. Pig
  2. PIG-965

PERFORMANCE: optimize common case in matches (PORegex)

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.8.0
    • Component/s: impl
    • Labels:
      None

      Description

      Some frequently seen use cases of 'matches' comparison operator have follow properties -
      1. The rhs is a constant string . eg "c1 matches 'abc%' "
      2. Regexes such that look for matching prefix , suffix etc are very common. eg - "abc%', "%abc", '%abc%'

      To optimize for these common cases , PORegex.java can be changed to -
      1. Compile the pattern (rhs of matches) re-use it if the pattern string has not changed.
      2. Use string comparisons for simple common regexes (in 2 above).

      The implementation of Hive like clause uses similar optimizations.

      1. poregex2.patch
        33 kB
        Ankit Modi
      2. automaton.jar
        168 kB
        Ankit Modi

        Issue Links

          Activity

          Thejas M Nair created issue -
          Ankit Modi made changes -
          Field Original Value New Value
          Assignee Ankit Modi [ ankit.modi ]
          Ankit Modi made changes -
          Attachment poregex.patch [ 12427305 ]
          Attachment poregex2.patch [ 12427306 ]
          Ankit Modi made changes -
          Attachment poregex2.patch [ 12427599 ]
          Ankit Modi made changes -
          Attachment poregex2.patch [ 12427306 ]
          Ankit Modi made changes -
          Attachment poregex2.patch [ 12427599 ]
          Ankit Modi made changes -
          Attachment poregex.patch [ 12427305 ]
          Ankit Modi made changes -
          Attachment poregex2.patch [ 12427699 ]
          Attachment automaton.jar [ 12427700 ]
          Ankit Modi made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Ankit Modi made changes -
          Status Patch Available [ 10002 ] Open [ 1 ]
          Ankit Modi made changes -
          Attachment automaton.jar [ 12427700 ]
          Ankit Modi made changes -
          Attachment poregex2.patch [ 12427699 ]
          Ankit Modi made changes -
          Attachment poregex2.patch [ 12427729 ]
          Attachment automaton.jar [ 12427730 ]
          Ankit Modi made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Ankit Modi made changes -
          Status Patch Available [ 10002 ] Open [ 1 ]
          Ankit Modi made changes -
          Attachment poregex2.patch [ 12427729 ]
          Ankit Modi made changes -
          Attachment poregex2.patch [ 12427913 ]
          Ankit Modi made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Ankit Modi made changes -
          Status Patch Available [ 10002 ] Open [ 1 ]
          Ankit Modi made changes -
          Attachment poregex2.patch [ 12427913 ]
          Ankit Modi made changes -
          Attachment poregex2.patch [ 12428066 ]
          Ankit Modi made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Ankit Modi made changes -
          Status Patch Available [ 10002 ] Open [ 1 ]
          Ankit Modi made changes -
          Attachment poregex2.patch [ 12428066 ]
          Ankit Modi made changes -
          Attachment poregex2.patch [ 12428184 ]
          Ankit Modi made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Assignee Ankit Modi [ ankit.modi ] Benjamin Francisoud [ francisoud ]
          Ankit Modi made changes -
          Assignee Benjamin Francisoud [ francisoud ] Ankit Modi [ ankit.modi ]
          Ankit Modi made changes -
          Attachment poregex2.patch [ 12428184 ]
          Ankit Modi made changes -
          Attachment poregex2.patch [ 12428211 ]
          Ankit Modi made changes -
          Status Patch Available [ 10002 ] Open [ 1 ]
          Ankit Modi made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Olga Natkovich made changes -
          Status Patch Available [ 10002 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Ankit Modi made changes -
          Resolution Fixed [ 1 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          Assignee Ankit Modi [ ankit.modi ]
          Thejas M Nair made changes -
          Fix Version/s 0.8.0 [ 12314562 ]
          Thejas M Nair made changes -
          Assignee Ankit Modi [ ankit.modi ]
          Thejas M Nair made changes -
          Status Reopened [ 4 ] Patch Available [ 10002 ]
          Thejas M Nair made changes -
          Resolution Fixed [ 1 ]
          Status Patch Available [ 10002 ] Resolved [ 5 ]
          Thejas M Nair made changes -
          Link This issue relates to PIG-1770 [ PIG-1770 ]
          Olga Natkovich made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

            • Assignee:
              Ankit Modi
              Reporter:
              Thejas M Nair
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development