Sh-Zh-7 opened a new pull request, #12199:
URL: https://github.com/apache/iotdb/pull/12199
For single row interface, you can call `row.getTime()` to get the timestamp
value of current row.
```java
@Override
public Object transform(Row row) throws Exception {
return row.getTime();
}
```
For batch interface, **the last column is the time column**, use
`.getLongs()` to acquire the timestamp values of all rows.
```java
@Override
public void transform(Column[] columns, ColumnBuilder builder) throws
Exception {
long[] timestamps = columns[columns.size() - 1].getLongs();
int count = columns[0].getPositionCount();
for (int i = 0; i < count; i++) {
builder.writeLong(timestamps[i]);
}
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]