구상모Sangmo Koo
08/29/2022, 6:49 AMTable Config :
"ingestionConfig": {
"filterConfig": {
"filterFunction": "Groovy({ ts == null || ts < 1000000000 || exp == null}, exp, ts)"
}
}
Table Schema :
{
"name": "exp_utc",
"dataType": "LONG",
"transformFunction": "exp*1000",
"format": "1:MILLISECONDS:EPOCH",
"granularity": "1:MILLISECONDS"
},
{
"name": "exp_asia_seoul_datetime",
"dataType": "STRING",
"transformFunction": "toDateTime((exp*1000)+(timezoneHour('Asia/Seoul')*3600000), 'yyyy-MM-dd HH:mm:ss')",
"format": "1:SECONDS:EPOCH",
"granularity": "1:SECONDS"
}
Normal collection data :
{"id":"E8DB","tp":1,"fw":"1.5.0","vc":22,"ts":1661175231,"ri":-59,"ad":3,"exp":1678450474,"ar":{},"mg":{"1":0.2,"2":0.2,"3":0.2}}
filter data :
{"id":"240A","tp":1,"fw":{"1":{"1":-25,"2":-10,"3":-4}},"ar":{"0":1},"mg":{"1":0.2,"2":0.2,"3":0.2}}
The following error occurs because the 'exp' filter does not work.
Caused by: java.lang.RuntimeException: Caught exception while executing function: plus(times(exp,'1000'),times(timezoneHour('Asia/Seoul'),'3600000'))
at org.apache.pinot.segment.local.function.InbuiltFunctionEvaluator$FunctionExecutionNode.execute(InbuiltFunctionEvaluator.java:124) ~[pinot-all-0.9.3-jar-with-dependencies.jar:0.9.3-e23f213cf0d16b1e9e086174d734a4db868542cb]
at org.apache.pinot.segment.local.function.InbuiltFunctionEvaluator$FunctionExecutionNode.execute(InbuiltFunctionEvaluator.java:119) ~[pinot-all-0.9.3-jar-with-dependencies.jar:0.9.3-e23f213cf0d16b1e9e086174d734a4db868542cb]
... 15 more
Caused by: java.lang.RuntimeException: Caught exception while executing function: times(exp,'1000')
at org.apache.pinot.segment.local.function.InbuiltFunctionEvaluator$FunctionExecutionNode.execute(InbuiltFunctionEvaluator.java:124) ~[pinot-all-0.9.3-jar-with-dependencies.jar:0.9.3-e23f213cf0d16b1e9e086174d734a4db868542cb]
at org.apache.pinot.segment.local.function.InbuiltFunctionEvaluator$FunctionExecutionNode.execute(InbuiltFunctionEvaluator.java:119) ~[pinot-all-0.9.3-jar-with-dependencies.jar:0.9.3-e23f213cf0d16b1e9e086174d734a4db868542cb]
at org.apache.pinot.segment.local.function.InbuiltFunctionEvaluator$FunctionExecutionNode.execute(InbuiltFunctionEvaluator.java:119) ~[pinot-all-0.9.3-jar-with-dependencies.jar:0.9.3-e23f213cf0d16b1e9e086174d734a4db868542cb]
... 15 more
Caused by: java.lang.IllegalStateException: Caught exception while invoking method: public static double org.apache.pinot.common.function.scalar.ArithmeticFunctions.times(double,double) with arguments: [null, 1000.0]
Any problem with this filterFunction?
"filterFunction": "Groovy({ ts == null || ts < 1000000000 || exp == null}, exp, ts)"