db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dag H. Wanvik (JIRA)" <j...@apache.org>
Subject [jira] Updated: (DERBY-4087) Clean up debug printing of the abstract syntax trees after parsing, binding and optimization
Date Thu, 20 Aug 2009 23:44:14 GMT

     [ https://issues.apache.org/jira/browse/DERBY-4087?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Dag H. Wanvik updated DERBY-4087:
---------------------------------

    Attachment: derby-4087-b.stat
                derby-4087-b.diff

Thanks for looking at this guys.

Uploading a version "b" which:

- fixes the wrong formatted Knut and Brian saw in the run-time
  statistics. This touches:

    RealDistinctScanStatistics.java,
    RealHashScanStatistics.java, 
    RealTableScanStatistics.java
    StringUtil

- adds the comments Knut requested. And no, no special reason to use AbstractMap, replaced
it with Map.

- adds some more formatting to OrderByList, OrderByColumn and
  IndexColumnOrder.

- I forgot to mention that this patch also adds a "brief structure mode
  dump" mode, which only prints the tree structure, e.g. thus:

        org.apache.derby.impl.sql.compile.VirtualColumnNode@4fdf11
        sourceColumn:               
            org.apache.derby.impl.sql.compile.ResultColumn@1be0369
            expression:                     
                org.apache.derby.impl.sql.compile.VirtualColumnNode@1d1fc02
                sourceColumn:                       
                    org.apache.derby.impl.sql.compile.ResultColumn@f800db
                    expression:                             
                        org.apache.derby.impl.sql.compile.UnaryArithmeticOperatorNode@5364
                        operand:                                
                            org.apache.derby.impl.sql.compile.UnaryArithmeticOperatorNode@162f030
                            operand:                                    
                                org.apache.derby.impl.sql.compile.ColumnReference@870e2f
                                source:                                         
                                    org.apache.derby.impl.sql.compile.ResultColumn@b44eb4
                                    expression:                                          
  
                                        org.apache.derby.impl.sql.compile.VirtualColumnNode@19b2faf
                                        sourceColumn:                                    
          
                                            org.apache.derby.impl.sql.compile.ResultColumn@157bf4c
                                            expression:                                  
                  
                                            :

I am not sure this is has much value. The brief mode is enabled by
-Dderby.debug.true=DumpBrief. I'll take it out if people think this is
unnecessary cruft. I find it useful to get an overview sometimes. It
does show shared (aliased) nodes as in the normal mode.


> Clean up debug printing of the abstract syntax trees after parsing, binding and optimization

> ---------------------------------------------------------------------------------------------
>
>                 Key: DERBY-4087
>                 URL: https://issues.apache.org/jira/browse/DERBY-4087
>             Project: Derby
>          Issue Type: Improvement
>          Components: Miscellaneous, SQL
>            Reporter: Dag H. Wanvik
>            Assignee: Dag H. Wanvik
>            Priority: Trivial
>         Attachments: derby-4087-a.diff, derby-4087-a.stat, derby-4087-b.diff, derby-4087-b.stat,
dumpquery, sample.log
>
>
> Currently, the printing is often inconsistent:
> - some subtrees not printed
> - wrong indentation due to missing newlines, or lacking level increments
> - redundant printing of subtrees (AST is really a DAG, would be nice to print only once
and then refer back to show aliasing)
> - some items printed twice due to inconsistent usage of pattern

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message