...
Code Block | ||
---|---|---|
| ||
query Q_2(dorewrite = false, runquery = true) { double memoryInGB = runtime.totalMemory / 1073741824.0; long windowSize = 10; if (memoryInGB < 1) windowSize = 5; ElementWindow windowOp{size = windowSize}; Aggregate aggregateOp{ aggregations = [["AVG", bid.PRICE, "AVG_PRICE"]], group_by = [bid.AUCTION]}; Operator[] sinks(); for (int i = 1; i<=5; i++) { sinks += new ODLSelect{predicate = "bid.AUCTION = "+i}; } bid -> windowOp -> aggregateOp -> sinks; } |
Multiple
...
queries
Normally one query is installed in Odysseus when executing a qdl-query. However, sometimes it might be useful to create several queries in a loop. Therefore you can call methods in a qdl-query to manually create queries. In this context you should set the metadata ‘auto_create’ to false.