Painless script throws "illegal tree structure." when using literal with hexadecimal value

Elasticsearch 8.3
Using painless Lab (Kibana 8.3)

byte i = 0xc;
return i;

Works fine - output 12

byte i = 0xd;
return i;

output -
Unhandled Exception illegal_state_exception
Illegal tree structure.

should be 13.

Hi @Nimrod_Karni, you're right that's a bug. For now, avoid using those literals.

You can track the issue here:

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.