In case anyone is interested, I have finished the "next leg" of the GraphQL
implementation. Now the "DataFetcher" functions (what I would call a
"resolver")
are auto-generated as well.

This makes the GraphQL API actually queryable/executable, rather than what
I'd
shown before which was hand-running RelNode expressions from parsed queries.

Using an in-memory HSQLDB, and selecting a single table I get an average
execution time of ~2ms. This is on my high-end laptop though.

Just trying to establish a lower-bound and understand the weight of
Calcite's
code generation + query planning and parsing before seeing if it's even
worth
continuing.

So far, signs point to "Yes!" =)

Code for the benchmark is here:
https://gist.github.com/GavinRay97/05538fb9ce3b25aa94fe6dd9afe484cc

Iteration 1: 2.099 ±(99.9%) 0.034 ms/op
Iteration 2: 2.138 ±(99.9%) 0.086 ms/op
Iteration 3: 2.131 ±(99.9%) 0.037 ms/op
Iteration 4: 2.163 ±(99.9%) 0.039 ms/op
Iteration 5: 2.202 ±(99.9%) 0.037 ms/op

N = 11659
  mean =      2.146 ±(99.9%) 0.023 ms/op

benchmark summary:
Benchmark                                         Mode    Cnt   Score
 Error
query                                            sample  11659  2.146 ±
0.023
query:query·p0.00                        sample          1.939
ms/op
query:query·p0.50                        sample          2.056
ms/op
query:query·p0.90                        sample          2.281
ms/op
query:query·p0.95                        sample          2.404
ms/op
query:query·p0.99                        sample          3.016
ms/op
query:query·p0.999                       sample         10.896
ms/op
query:query·p0.9999                      sample         48.382
ms/op
query:query·p1.00                        sample         55.181
ms/op

Reply via email to