سؤال

I have a very basic Esper question,what is the basic difference between OUTPUT WHEN and WHERE key word in Esper. Here is an example where i am using these Key Words.

select
  high
from 
  Bar
where
  getDirection() != Direction.FLAT;

and

select
  high
from 
  Bar
output when
  getDirection() != Direction.FLAT;
هل كانت مفيدة؟

المحلول

"output when" batches up output until the condition turns true.

Always prefer filters over where-clauses: select high from Bar (direction != Direction.FLAT)

نصائح أخرى

select high from Bar where getDirection() != Direction.FLAT; --> This statement will returns all you value in which getDirection()!= Direction.FLAT. It is something like you are comparing the values of that table with external values.

select high from Bar when getDirection() != Direction.FLAT; --> This statement returns all the values from Bar when your getDirection() != Direction.FLAT It is like you are fetching the values when certain condition is true.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top