Menu

#3 Support analytics (window) functions

sqlbuilder-2.1.7
closed
nobody
None
1
2017-04-13
2017-02-09
No

Please, add to FunctionCall class support for analitycs function.
Ie, max(field_1) over(partition by field_2 order by field3)

1 Attachments

Discussion

  • Andrey Karepin

    Andrey Karepin - 2017-02-09

    Sorry, i attach new patch file.

     
  • Andrey Karepin

    Andrey Karepin - 2017-02-10

    use in this case CustomSql() extremely inconvenient

     
  • Andrey Karepin

    Andrey Karepin - 2017-02-10

    New patch with JavaDoc and additional method for order specification.

     
  • Andrey Karepin

    Andrey Karepin - 2017-02-13

    Are any changes required on my side?

     
  • James Ahlborn

    James Ahlborn - 2017-02-13

    sorry, i haven't gotten a chance to look at it in detail. i looked a little into window functions because i wasn't familiar with them, and found that they have a whole pile of potential syntax. i haven't had the time to digest the possibilities and determine whether tacking that functionality on the FunctionCall makes the most sense or not.

     
  • James Ahlborn

    James Ahlborn - 2017-04-10

    just an fyi, i think i have a handle on this now, should be able get something in over the next week or so.

     
  • James Ahlborn

    James Ahlborn - 2017-04-13
    • status: open --> closed
    • Group: sqlbuilder-2.0.0 --> sqlbuilder-2.1.7
     
  • James Ahlborn

    James Ahlborn - 2017-04-13

    so, i didn't directly use the patch you provided. i went with a new WindowDefinitionClause class (which should support all of the standard-defined sql syntax for this construct). This can be added to the FunctionCall or can be used with a SelectQuery to define named window definitions.

    this is fixed in trunk now and will be in the 2.1.7 release.

     
  • Andrey Karepin

    Andrey Karepin - 2017-04-13

    thanks

     

Log in to post a comment.