parameters: (self, inf)
docstring: Walk through impala query plan and parse each section accordingly.
      A section ends when delimiter of that section is found.
docstring_summary: Walk through impala query plan and parse each section accordingly.
      A section ends when delimiter of that section is found.
docstring_tokens: Walk through impala query plan and parse each section accordingly . A section ends when delimiter of that section is found .
function: def parse(self, inf):
      """Walk through impala query plan and parse each section accordingly.
      A section ends when delimiter of that section is found."""
      i = 0
      for line in inf:
        if i > len(SECTIONS) - 1:
          break
        if (line.rstrip().startswith(SECTIONS[i].delimiter) or
              (not SECTIONS[i].delimiter and not line.rstrip())):
          debug('Found delimiter ' + SECTIONS[i].delimiter + ' in ' + line)
          i += 1
          continue
        if SECTIONS[i].task == Task.DISCARD:
          continue
        elif SECTIONS[i].task == Task.PARSE_OPTIONS:
          self.parse_options(line)
        elif SECTIONS[i].task == Task.PARSE_PLAN:
          self.parse_plan(line)
        elif SECTIONS[i].task == Task.PARSE_EXEC_SUMM:
          self.parse_exec_summ(line)
        elif SECTIONS[i].task == Task.PARSE_FILTER_TABLE:
          self.parse_filter_table(line)
      self.time_shade()
      self.draw()
function_tokens: def parse ( self , inf ) : i = 0 for line in inf : if i > len ( SECTIONS ) - 1 : break if ( line . rstrip ( ) . startswith ( SECTIONS [ i ] . delimiter ) or ( not SECTIONS [ i ] . delimiter and not line . rstrip ( ) ) ) : debug ( 'Found delimiter ' + SECTIONS [ i ] . delimiter + ' in ' + line ) i += 1 continue if SECTIONS [ i ] . task == Task . DISCARD : continue elif SECTIONS [ i ] . task == Task . PARSE_OPTIONS : self . parse_options ( line ) elif SECTIONS [ i ] . task == Task . PARSE_PLAN : self . parse_plan ( line ) elif SECTIONS [ i ] . task == Task . PARSE_EXEC_SUMM : self . parse_exec_summ ( line ) elif SECTIONS [ i ] . task == Task . PARSE_FILTER_TABLE : self . parse_filter_table ( line ) self . time_shade ( ) self . draw ( )