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
Invalid Case expression. Schema for the default clause should be the same as schema for THEN clauses. Result scheme: Schema{INT32}. Schema for default expression is Schema{FLOAT64}
#2405
Open
eksantrik opened this issue
Feb 3, 2019
· 2 comments
When I create a stream with the following single column it works:
CREATE STREAM CISCOCDRCMR_MERGE WITH (PARTITIONS=1) AS SELECT (CASE WHEN "CMR_PKID" IS NOT NULL AND "CMR_NUMBERPACKETSRECEIVED">0 THEN (100*"CMR_NUMBERPACKETSLOST") ELSE -1 END) AS CMR_PACKETLOSS_PERCENT FROM CISCOCDRCMR_ORIGLEG_MERGE;
But when I add a second column it gives me an error:
CREATE STREAM CISCOCDRCMR_MERGE WITH (PARTITIONS=1) AS SELECT (CASE WHEN "CMR_SCS" IS NULL THEN -1 ELSE "CMR_SCS" END) AS CMR_SCS,(CASE WHEN "CMR_PKID" IS NOT NULL AND "CMR_NUMBERPACKETSRECEIVED">0 THEN (100*"CMR_NUMBERPACKETSLOST") ELSE -1 END) AS CMR_PACKETLOSS_PERCENT FROM CISCOCDRCMR_ORIGLEG_MERGE;
Invalid Case expression. Schema for the default clause should be the same as schema for THEN clauses. Result scheme: Schema{INT32}. Schema for default expression is Schema{FLOAT64}
Is this the expected behavior? Do I need to CAST some variables to fix this?
The text was updated successfully, but these errors were encountered:
I noticed that when I try to create the stream with a bunch of INTEGER fields and my WHEN clause for "CMR_PACKETLOSS_PERCENT", the stream is created. However, if I try to include a DOUBLE field such as CMR_SCS as above, the system throws an error.
When I create a stream with the following single column it works:
But when I add a second column it gives me an error:
Is this the expected behavior? Do I need to CAST some variables to fix this?
The text was updated successfully, but these errors were encountered: