我有一个像这样的 LinkedHashMap:
{_index=1, _type=zz, _source={custom_field=custom, field_0=Group, field_10=was, field_3}}
使用EPL语句,如何访问EPL语句中的custom_field。这是我尝试过的一些事情
String expression = "select `_source.custom_field` from MyMapEvent";
String expression = "select \\_source.custom\\_field` from MyMapEvent";
转义字 rune 档可以在这里找到:http://esper.codehaus.org/esper-4.6.0/doc/reference/en-US/html_single/index.html#eventrep-properties-escaping
最佳答案
我已经尝试过这个并且它有效:create schema MyInnerEvent(_c int);创建模式 MyEvent(_a int, _b MyInnerEvent);从 MyEvent 选择 _b._c;
关于java - 在 Esper 中使用转义字符访问嵌套映射,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28202190/