TDengine icon indicating copy to clipboard operation
TDengine copied to clipboard

JDBC queryForList column use "as" create alias invalid

Open tuine opened this issue 3 years ago • 0 comments

Bug Description JAVA JdbcTemplate,function:queryForList or queryForMap using as is invalid When querying the timestamp field, but there is no problem with other fields

To Reproduce

String sql = "select LAST(ts) AS ts1,LAST(ts) AS ts2,max(key) as key1, max(key) as key2 from ts_kv interval(1s) limit 2;";
List<Map<String, Object>> maps = jdbcTemplate.queryForList(sql2);

list map result:

{
  "key1" : 36,
  "key2" : 36,
  "ts" : 1669714246316
}

Environment (please complete the following information):

  • OS: centos7
  • Memory, CPU, current Disk Space
  • TDengine Version:3.0.1.6

tuine avatar Nov 30 '22 08:11 tuine