Graph with ou without functions

PAscal
2011-03-31
2013-04-15
  • PAscal

    PAscal - 2011-03-31

    This post to get users opinion regarding the content of the graph  :

    1-Should the graph be simplified as today: to display the columns with predicates and aggregates / order by clauses (without any function), to be a kind of ER diagram
    or 
    _2-Should the graph be as close as possible to the SQL: with to_date, case, concat … functions displayed as arithmetic opérations and other details/i]

    Regards
    PAscal_

     
  • alxtoth

    alxtoth - 2011-04-01

    Hi,

    Technically, there is function splitByCommasWithoutParens(). It is used to separate aliases for columns (while discarding the formulas). If called upon the original SQL, it migth even work ..

    But there is need for substantial changes. Currently the Simplifier is invoked before  splitByCommasWithoutParens(). Parsing would fail without prior simplification

    -Alex

     
  • PAscal

    PAscal - 2011-04-08

    And what about :

    keeping a track on the graph (adding "!" for example) to the field or the constant where a function has been removed ?

    This applying for f(a), f('1'), a||b, a||' str', case, arithmetic operations +,-,*,/ like a+b, a+1 …

    Regards
    PAscal

     
  • alxtoth

    alxtoth - 2011-04-11

    Hi,

    Would it be enough to show formulas for joins ? If you think about huge SELECTS over tens of tables, there is little sense to show all columns and variations  A, A+1, B, B+2, C, 'Mr' || C, etc

    -Alex

     
  • PAscal

    PAscal - 2011-04-11

    Initial need if for joins …
    but for filters also (and today's meaning is wrong if simplified, returns A='2' for f(A)='2' or A=g('2')  …)
    and finally for projections also (when field is coming from a subquery joined at the outer level).

    If simply keeping original text is not easy,
    what about the second alternativ:
    field name becomes x! or '2'! when used with a function or an arithmetic operation ?

    Regards
    PAscal

     
  • PAscal

    PAscal - 2011-04-12

    For private usage

    Adding +"_" like
       func.setParseAction(lambda x: x.pre + " " + x.inner.replace(',', '+')     +"_"    )
    in buildRemovers, adds an "_" at the end of each column where there was a function

    Doesn't works with "!' nor "@"
    Seems effectively much more complicated for other operands :f('1'), a||b, a||' str', case, arithmetic operations …

    Regards
    PAscal

     
  • alxtoth

    alxtoth - 2011-04-12

    I am working  to fix the other open issues before starting the big work. Simplifier should be called from SingleSelect (nto before as now). That also means that almost all test cases must be rewritten.

    Now looking at reducign extra long IN clauses .

    -Alex

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks