gpt4 book ai didi

java - 在 Esper 中使用转义字符访问嵌套映射

转载 作者:太空宇宙 更新时间:2023-11-04 06:15:00 24 4
gpt4 key购买 nike

我有一个像这样的 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/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com