senx / warp10-platform

The Most Advanced Time Series Platform
https://warp10.io/
Apache License 2.0
385 stars 53 forks source link

SETATTRIBUTES strange behaviour #527

Closed miton18 closed 5 years ago

miton18 commented 5 years ago

In WarpScript, it's possible to RELABEL a GTS with a NULL value, this action drop the label from the GTS.

It seems not possible to do the same thing with SETATTRIBUTES, is it an expected behaviour ?

Quantum example

hbs commented 5 years ago

Attributes are only set as a whole so yes this is the expected behavior

miton18 commented 5 years ago

Sorry, don't understand... In a GTS instance, on an WarpScript context:

Even if the data structure for Attributes and Labels are differents, Why SETATTRIBUTES function cannot handle NULL value as empty string one ?

hbs commented 5 years ago

The NULL value was incorrectly rejected due to a misplaced check.

You should have received an exception saying arguments were not STRING.

Fixed now, thanks for the catch.

miton18 commented 5 years ago

Thx @hbs :-)