it's not a Kylin bug, but from Calcite date processing. Has sent help request to Calcite community. Will update when get answer.
2016-07-20 15:14 GMT+08:00 Yiming Liu <liuyiming....@gmail.com>: > Hi Kylin devs, > > Running against the sample learn_kylin project on the latest master > branch: select part_dt, sum(price) as total_selled, count(distinct > seller_id) as sellers from kylin_sales where part_dt = DATE'2012-01-01' > group by part_dt order by part_dt; > > I got the result from Web GUI: > 2012-01-01 > 466.9037 > 12 > > > > But if I run the same query through JDBC Driver, > > try { > Driver driver = (Driver) > Class.forName("org.apache.kylin.jdbc.Driver").newInstance(); > Properties info = new Properties(); > info.put("user", "ADMIN"); > info.put("password", "KYLIN"); > Connection conn = > driver.connect("jdbc:kylin://192.168.1.108:7070/learn_kylin", info); > final String sql = "select part_dt, sum(price) as total_selled, > count(distinct seller_id) as sellers from kylin_sales where part_dt = > DATE'2012-01-01' group by part_dt order by part_dt"; > > PreparedStatement stmt = conn.prepareStatement(sql); > try { > try (ResultSet rs = stmt.executeQuery()) { > while (rs.next()) { > > System.out.println(rs.getString(1)+"\t"+rs.getString(2)+"\t"+rs.getString(3)); > } > } > } finally { > stmt.close(); > } > > I got the result: > 2011-12-31 466.9037 12 > > It seems something wrong when JDBC parse the result. > > -- > With Warm regards > > Yiming Liu (刘一鸣) > -- With Warm regards Yiming Liu (刘一鸣)