Overview
GIVEN expressions are not greedy enough. model GIVEN x, y is interpreted as (model GIVEN x), y. Should be (model GIVEN x, y).
Reproduction steps
Execute a query that computes the probability of an event given two variables using commas to separate the variables. For example (column / variable names can be changed):
SELECT
PROBABILITY OF x
UNDER model
GIVEN y, z AS prob
FROM data
Expected results
A table with one column, prob, is returned. In other words, the query is interpreted as follows:
SELECT
(PROBABILITY OF x
UNDER model
GIVEN y, z AS prob)
FROM data
Actual results
A table with two columns are returned, one with the result of PROBABILITY OF x UNDER model GIVEN y, and the column data.z renamed to prob. In other words, the query is interpreted as follows:
SELECT
(PROBABILITY OF x
UNDER model
GIVEN y), (z AS prob)
FROM data
Overview
GIVENexpressions are not greedy enough.model GIVEN x, yis interpreted as(model GIVEN x), y. Should be(model GIVEN x, y).Reproduction steps
Execute a query that computes the probability of an event given two variables using commas to separate the variables. For example (column / variable names can be changed):
Expected results
A table with one column,
prob, is returned. In other words, the query is interpreted as follows:Actual results
A table with two columns are returned, one with the result of
PROBABILITY OF x UNDER model GIVEN y, and the columndata.zrenamed toprob. In other words, the query is interpreted as follows: