apache / apache/iotdb

关于udf中transform里面日志不打印

Open
#11,937 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
6.4k
Forks
1.2k
Avg merge
1d 23h
Merged PRs (30d)
115

Description

```
public class UDTFSequenceFilter implements UDTF {
@Override
public void validate(UDFParameterValidator validator) {
int childExpressionsSize = validator.getParameters().getChildExpressionsSize();
LOG.info("childExpressionsSize "+childExpressionsSize);
List childExpressions = validator.getParameters().getChildExpressions();
LOG.info("childExpressions "+childExpressions);
for (int i = 0; i < validator.getParameters().getChildExpressionsSize(); ++i) {
if(i==0){
validator.validateInputSeriesDataType(i, Type.BOOLEAN);}
else {
validator
.validateInputSeriesDataType(0, Type.FLOAT, Type.DOUBLE, Type.INT32, Type.INT64, Type.BOOLEAN);
}
}
LOG.info("validate完成");
}

@Override
public void beforeStart(UDFParameters udfParameters, UDTFConfigurations udtfConfigurations) {
udtfConfigurations
.setAccessStrategy(new RowByRowAccessStrategy())
.setOutputDataType(Type.TEXT);
LOG.info("beforeStart完成");
}

@Override
public void transform(Row row, PointCollector collector) throws Exception {
LOG.info("进入transform....");

}

@Override
public void terminate(PointCollector collector) {
LOG.info("进入terminate....");

}
}

```

请问下后台发现 validate 和beforeStart 日志正常打印,但是transform和 terminate 不打印日志,IotDB版本1.2.2,是否正常呢?

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the UDTFSequenceFilter example on IoTDB 1.2.2 and inspect when validate, beforeStart, transform, and terminate are invoked. Determine whether the missing transform and terminate logs are expected or indicate a lifecycle problem; document the observed behavior or identify the relevant fix.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
database
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.