Reputation: 105
with the same query, in taos shell I got result like:
taos> select last(ts, c1) from db.stb where t0 = 'shanghai'\G;
*************************** 1.row ***************************
ts: 2020-10-01 00:00:09.999
c1: NFLxdQTArXRz88eZizveRdtcPgomSEl7XottIKO0LTKJEoKgRf2FVKp2AmYFpvtLqk311k
Query OK, 1 row(s) in set (0.006903s)
in JDBC, I got result like:
[ OK ] Connection established. [ OK ] time cost: 110 ms, execute statement ====> select last(ts, c1) from db.stb where t0 = 'shanghai' last(ts): 2020-10-01 00:00:09.999 last(c1): NFLxdQTArXRz88eZizveRdtcPgomSEl7XottIKO0LTKJEoKgRf2FVKp2AmYFpvtLqk311k connection closed.
why the header is different for same query?
Upvotes: 0
Views: 25
Reputation: 301
the header name can be configured with keepColumnName in /etc/taos/taos.cfg
# the last_row/first/last aggregator will not change the original column name in the result fields
keepColumnName 1
Upvotes: 1