You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Someone might want to draw from a kind of fibre product -- for each model satisfying a certain predicate, simulate a bunch of answers to obtain rows of the form
SELECT m.modelno, (SIMULATE col0, col1, col2 FROM t USING MODEL m.modelno LIMIT 10)
FROM MODELS OF t AS m
WHERE (ESTIMATE MUTUAL INFORMATION OF col8 WITH col1 IN t USING MODEL m.modelno) > 0.8
but SQL has no concept of generating multiple output rows from a single input row. In that context, only the first column of the first row of the SIMULATE will be relevant, because it is a scalar context.
The text was updated successfully, but these errors were encountered:
riastradh-probcomp
changed the title
SIMULATE can't refer to enclosing scope
SIMULATE can't be used in a SELECT to generate multiple output rows from a single input row
May 22, 2015
One danger of any attempt to do this is that the query language may become Turing-complete.
Probably a better approach would be to do something like:
SIMULATE m.modelno, col0, col1, col2
FROM GENERATOR t_cc, MODELS OF t AS m
USING MODEL m.modelno
WHERE (ESTIMATE MUTUAL INFORMATION OF col8 WITH col1 IN t USING MODEL m.modelno) > 0.8
But this level of detail will probably require writing our own query planner and perhaps whole SQL execution engine in the first place.
Someone might want to draw from a kind of fibre product -- for each model satisfying a certain predicate, simulate a bunch of answers to obtain rows of the form
It is tempting to try to write something like
but SQL has no concept of generating multiple output rows from a single input row. In that context, only the first column of the first row of the SIMULATE will be relevant, because it is a scalar context.
The text was updated successfully, but these errors were encountered: