Coalesce understanding

Post Reply
flp
Posts: 51
Joined: Tue Sep 02, 2014 12:54 am

Coalesce understanding

Post by flp » Fri Sep 26, 2014 10:04 pm

When I checked again the odysseus documentation of the coalesce operator, I was surprised that the operator works in a different way as I remembered and expected.

My goal is it to create an aggregation of values which fulfill a specific condition, e.g. temperature >= 10.
I expected the operator to aggregate all values until there's one which doesn't fulfill the condition. Then it watches again for the fulfilling and starts the next aggregation if the data fulfills it again and so on. All the time I expected to get data dropped that does not fulfill the condition.

When I understood the documentation right, it chooses values which does not fulfill the condition, but I can't predict the further procedure because the documentation does not specify anything more.

Can you specify the procedure of the operator in a more detailed way?

What would be the best way to achieve my goal? Negating my condition?

User avatar
Marco Grawunder
Posts: 272
Joined: Tue Jul 29, 2014 10:29 am
Location: Oldenburg, Germany
Contact:

Re: Coalesce understanding

Post by Marco Grawunder » Mon Sep 29, 2014 8:46 am

The operator (is the predicate case) is used to collect data until a specific condition is true, and for each true predicate a new value is created, negation should work.

flp
Posts: 51
Joined: Tue Sep 02, 2014 12:54 am

Re: Coalesce understanding

Post by flp » Sat Oct 04, 2014 7:06 pm

Funily, the negation returns exactly the same result.

But I didn't get it the description.

What does the predicate exactly do? Does it drop values which are in/out of scope or does it start just a new aggregation?

I really need the dropping off.

User avatar
Marco Grawunder
Posts: 272
Joined: Tue Jul 29, 2014 10:29 am
Location: Oldenburg, Germany
Contact:

Re: Coalesce understanding

Post by Marco Grawunder » Mon Oct 06, 2014 8:10 am

The coalesce operator will not drop any values. How about using select to drop values? Otherwise could you tell exactly what you want to do and maybe we could write such an operator ;-)

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest