KustoCode.ParseAndAnalyze does not detect certain semantic errors when two tables are being joined using $left/$right syntax (e.g. A | join B on $left.X == $right.Y)
In the above example, if the schema specifies that table A contains no column X, but table Ydoes contain a column named X, no semantic errors will be identified. This behavior is commutative and does not depend on which table contains each column. In other words, if X and/or Y are found in either table, the parser will always miss the expected error.
More generally, this behavior occurs if either of the following are true:
Both columns referenced by the join are found in the same table and do not exist in the other.
The left-hand table only contains the $right column and the right-hand table only contains the $left column.
These queries will not run, and the expected behavior is to return (up to) two semantic diagnostics with the messages:
The column 'X' must exist on the left side of the joinThe column 'Y' must exist on the right side of the join
KustoCode.ParseAndAnalyze
does not detect certain semantic errors when two tables are being joined using$left/$right
syntax (e.g.A | join B on $left.X == $right.Y
)In the above example, if the schema specifies that table
A
contains no columnX
, but tableY
does contain a column namedX
, no semantic errors will be identified. This behavior is commutative and does not depend on which table contains each column. In other words, ifX
and/orY
are found in either table, the parser will always miss the expected error.More generally, this behavior occurs if either of the following are true:
$right
column and the right-hand table only contains the$left
column.These queries will not run, and the expected behavior is to return (up to) two semantic diagnostics with the messages:
The column 'X' must exist on the left side of the join
The column 'Y' must exist on the right side of the join