You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kylin.apache.org by GitBox <gi...@apache.org> on 2022/02/08 10:46:37 UTC

[GitHub] [kylin] zhangayqian commented on a change in pull request #1809: [KYLIN-4382] Unable to use DATE type in prepared statements

zhangayqian commented on a change in pull request #1809:
URL: https://github.com/apache/kylin/pull/1809#discussion_r801496762



##########
File path: jdbc/src/test/java/org/apache/kylin/jdbc/DriverTest.java
##########
@@ -286,7 +286,7 @@ public void testKYLIN4382() throws SQLException, ParseException {
         info.put("password", "KYLIN");
         Connection conn = driver.connect("jdbc:kylin://localhost:7070/default", info);
         PreparedStatement state = conn.prepareStatement("select count(*) from test_kylin_fact where cal_dt=?");
-        state.setDate(1, new Date(new SimpleDateFormat("yyyy-MM-dd").parse("2012-01-01").getTime()));
+        state.setDate(1, new Date(FastDateFormat.getInstance("yyyy-MM-dd").parse("2012-01-01").getTime()));

Review comment:
       I can't understand why use `FastDateFormat` to replace `SimpleDateFormat`.




-- 
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: issues-unsubscribe@kylin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org