New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix negetive number or string exist in dimensions array, the correspo… #10346
Conversation
…nding line won't show (apache#10343)
@100pah Could you review this PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution!
Checking == null
is not quite right. Here what it does with encodeDef.set(coordDim, false);
is to ignore the encoding of an invalid entry. For example, if there is {x: -1}
, x
should be ignored for encoding. But what causes the bug is that '-1' < 0
is also true
.
So a better solution here is to check if typeof dataDims[0]
is 'number'
and then check if it's negative.
@Ovilia Thanks for your enlightenment, I didn't understand why you need check negative number at the time. I have corrected my code, please check it. |
Tweak the "is string" check. Should better be the same as the existing checking.
It is a feature that use negative dimension value to prevent that dimension be filtered or processed in the workflow. |
@susiwen8 Thanks for your contribution. That really helps a lot! |
…nding line won't show (#10343)
Close #10343