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
The first error is correct. The second error is confusing, and happens because the result of looking up x defaults to a scalar expression type, which then fails the expression type check of aggregate. We could just not emit that error if the data type is error, but that would remove some helpful instances of the error message, e.g. with aggregate: y is scalar_sql_native_typed_thing + 1 (where the data type is error but the expression type is known to be scalar).
In general, we are also not super careful of setting the expressionType correctly when we use errorFor or loggedErrorExpr; in many cases we know something to be an aggregate, but we generate an error/scalar when there are issues.
The text was updated successfully, but these errors were encountered:
If you have:
You get two errors:
The first error is correct. The second error is confusing, and happens because the result of looking up
x
defaults to a scalar expression type, which then fails the expression type check ofaggregate
. We could just not emit that error if the data type iserror
, but that would remove some helpful instances of the error message, e.g. withaggregate: y is scalar_sql_native_typed_thing + 1
(where the data type iserror
but the expression type is known to bescalar
).In general, we are also not super careful of setting the
expressionType
correctly when we useerrorFor
orloggedErrorExpr
; in many cases we know something to be an aggregate, but we generate an error/scalar when there are issues.The text was updated successfully, but these errors were encountered: