trafodion-codereview mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anoopsharma00 <...@git.apache.org>
Subject [GitHub] incubator-trafodion pull request #1173: TRAFODION-2683 add a new explain opt...
Date Tue, 11 Jul 2017 19:12:33 GMT
GitHub user anoopsharma00 opened a pull request:

    https://github.com/apache/incubator-trafodion/pull/1173

    TRAFODION-2683 add a new explain option to mask variant fields in output

    --Syntax extension to cleanse and mask:
      Full explain:
      explain options 'c' select ...
    
      Formatted explain:
      explain options 'fc' select...
    
      Full explain on prepared statement:
      prepare s from select ...
      explain option 'c' s;
    
    --Masked fields will show up as "###" in explain output.
    
    --Both option and options keyword can be used in explain and showplan.
        -- explain option/options ...
        -- showplan option/options ...
    
    -- showplan can be used on explain statement.
    
    -- Here is an example of what the output will look like:
    >>explain option 'c' select * from dual;
    
    ----------------------------------------------- PLAN SUMMARY
    MODULE_NAME .............. DYNAMICALLY COMPILED
    STATEMENT_NAME ........... NOT NAMED
    PLAN_ID ................ ###
    ROWS_OUT ............... ###
    EST_TOTAL_COST ......... ###
    STATEMENT ................ select * from dual;
    
    ------------------------------------------- NODE LISTING
    ROOT ================================  SEQ_NO 2        ONLY CHILD 1
    REQUESTS_IN ............ ###
    ROWS_OUT ............... ###
    EST_OPER_COST .......... ###
    EST_TOTAL_COST ......... ###
    DESCRIPTION
      max_card_est ......... ###
      fragment_id ............ 0
      parent_frag ............ (none)
      fragment_type .......... master
      statement_index ........ 0
      affinity_value ....... ###
      max_max_cardinality    ###
      total_overflow_size    ###
      xn_access_mode ......... read_only
      xn_autoabort_interval    0
      auto_query_retry ....... enabled
      plan_version ....... 2,600
      embedded_arkcmp ........ used
      select_list ............ %(0)
      input_variables ........ %(0), %(0), %(0)
    
    VALUES ========================  SEQ_NO 1        NO CHILDREN
    REQUESTS_IN ............ ###
    ROWS_OUT ............... ###
    EST_OPER_COST .......... ###
    EST_TOTAL_COST ......... ###
    DESCRIPTION
      max_card_est ......... ###
      fragment_id ............ 0
      parent_frag ............ (none)
      fragment_type .......... master
      tuple_expr ............. %(0)
    
    --- SQL operation complete.
    >>

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/anoopsharma00/incubator-trafodion ansharma_explain_br

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-trafodion/pull/1173.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1173
    
----
commit 2a520b5e75ebfb87672ddd2b1cf100062fad64c2
Author: Anoop Sharma <anoop.sharma@esgyn.com>
Date:   2017-07-11T19:09:53Z

    TRAFODION-2683 add a new explain option to mask variant fields in output
    
    --Syntax extension to cleanse and mask:
      explain options 'c' select ...
      explain options 'fc' select...
      prepare s from select ...
      explain option 'c' s;
    
    --Masked fields will show up as "###" in explain output.
    
    --Both option and options keyword can be used in explain and showplan.
        -- explain option/options ...
        -- showplan option/options ...
    
    -- showplan can be used on explain statement.
    
    -- Here is an example of what the output will look like:
    >>explain option 'c' select * from dual;
    
    ----------------------------------------------- PLAN SUMMARY
    MODULE_NAME .............. DYNAMICALLY COMPILED
    STATEMENT_NAME ........... NOT NAMED
    PLAN_ID ................ ###
    ROWS_OUT ............... ###
    EST_TOTAL_COST ......... ###
    STATEMENT ................ select * from dual;
    
    ------------------------------------------- NODE LISTING
    ROOT ================================  SEQ_NO 2        ONLY CHILD 1
    REQUESTS_IN ............ ###
    ROWS_OUT ............... ###
    EST_OPER_COST .......... ###
    EST_TOTAL_COST ......... ###
    DESCRIPTION
      max_card_est ......... ###
      fragment_id ............ 0
      parent_frag ............ (none)
      fragment_type .......... master
      statement_index ........ 0
      affinity_value ....... ###
      max_max_cardinality    ###
      total_overflow_size    ###
      xn_access_mode ......... read_only
      xn_autoabort_interval    0
      auto_query_retry ....... enabled
      plan_version ....... 2,600
      embedded_arkcmp ........ used
      select_list ............ %(0)
      input_variables ........ %(0), %(0), %(0)
    
    VALUES ========================  SEQ_NO 1        NO CHILDREN
    REQUESTS_IN ............ ###
    ROWS_OUT ............... ###
    EST_OPER_COST .......... ###
    EST_TOTAL_COST ......... ###
    DESCRIPTION
      max_card_est ......... ###
      fragment_id ............ 0
      parent_frag ............ (none)
      fragment_type .......... master
      tuple_expr ............. %(0)
    
    --- SQL operation complete.
    >>

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message