On 25.08.2014 20:47, Richard Hipp wrote:
On Mon, Aug 25, 2014 at 1:21 PM, forkandwait <webb.spra...@gmail.com> wrote:

You used the word "immense" which I like - it is an apt description of
the
knowledge and effort needed to add windowing functions to SQLite (and
probably any other database engine for that matter).

Hehe.  I would be interested in any of your specific thoughts on the
immensity of it.  I can imagine that most of the work would be in the
parser, but things always simpler to non-experts ;)


Parsing is the easy part.  The tricky part is the code generator - the
piece that takes the abstract syntax tree that the parser generates and
turns it into bytecode that renders the desired output, taking care to
correctly handle the myriad corner cases.   Then comes the tedious part of
writing 100% MC/DC test cases.


This is not a fresh idea, I am dropping it again, because I continue to think that something in that direction could be useful - mostly for studying SQLite in a university environment, but also for on-demand research like the OPs feature request, where nor compilation time, nor the full soundness of the generated code are critical:

- Single new supported SQLite feature bundle:
  - "Standard" database schema for representing "disassembled"
    VDBE programs
  - SQLite extension consisting of:
    - function "disassemble" for dumping prepared statement to the
      above schema
    - function "assemble" for loading and linking VDBE program from
      given rowid of the schema for execution as prepared statement.

- Community project sqlite-asm-tools (possibly coordinated trough dedicated list @sqlite.org), aimed to help further development with more high level tools over that VDBE schema like: code templates application, code pattern marchers, manipulation methods, visualizations, etc.

It seems to me that the above basis will be enough for student projects like MERGE implementation or Stored procedures or even new languages experiments, just like the myriad of academic experiments on top of JVM, LLVM and other backends, some of them far away of the popularity of SQLite.

Kind regards,
Alek

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to