You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kylin.apache.org by "Sébastien Jelsch (JIRA)" <ji...@apache.org> on 2015/08/12 18:22:46 UTC
[jira] [Commented] (KYLIN-626) JDBC error for float and double
values
[ https://issues.apache.org/jira/browse/KYLIN-626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14693749#comment-14693749 ]
Sébastien Jelsch commented on KYLIN-626:
----------------------------------------
Resolved.
> JDBC error for float and double values
> --------------------------------------
>
> Key: KYLIN-626
> URL: https://issues.apache.org/jira/browse/KYLIN-626
> Project: Kylin
> Issue Type: Bug
> Components: Driver - JDBC
> Reporter: Sébastien Jelsch
> Assignee: liyang
>
> 1. Create cube which contains float or double value
> 2. Create connection and statement with JDBC driver:
> {code}
> Driver driver = (Driver) Class.forName("com.kylinolap.jdbc.Driver").newInstance();
> Properties info = new Properties();
> info.put("user", "admin");
> info.put("password", "KYLIN");
> info.put("ssl", false);
> Connection con = driver.connect("jdbc:kylin://localhost/shop_project", info);
> Statement state = con.createStatement();
> state.executeQuery("SELECT * FROM DEFAULT.SALES");
> {code}
> Error:
> {noformat}
> [ERROR][com.kylinolap.jdbc.KylinMetaImpl.prepare(KylinMetaImpl.java:339)] - For input string: "0.0"
> java.lang.NumberFormatException: For input string: "0.0"
> at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
> at java.lang.Long.parseLong(Long.java:441)
> at java.lang.Long.parseLong(Long.java:483)
> at com.kylinolap.jdbc.util.SQLTypeMap.wrapObject(SQLTypeMap.java:164)
> at com.kylinolap.jdbc.stub.KylinClient.genResultData(KylinClient.java:202)
> at com.kylinolap.jdbc.stub.KylinClient.query(KylinClient.java:185)
> at com.kylinolap.jdbc.KylinMetaImpl.prepare(KylinMetaImpl.java:337)
> at net.hydromatic.avatica.AvaticaStatement.executeQuery(AvaticaStatement.java:76)
> at org.dude.kylin_con.TestConnection.main(TestConnection.java:26)
> Exception in thread "main" java.sql.SQLException: error while executing SQL "SELECT * FROM "DEFAULT"."SALES"": Failed to query kylin server with exception For input string: "0.0"
> at net.hydromatic.avatica.Helper.createException(Helper.java:39)
> at net.hydromatic.avatica.AvaticaStatement.executeQuery(AvaticaStatement.java:79)
> at org.dude.kylin_con.TestConnection.main(TestConnection.java:26)
> Caused by: java.lang.RuntimeException: Failed to query kylin server with exception For input string: "0.0"
> at com.kylinolap.jdbc.KylinMetaImpl.prepare(KylinMetaImpl.java:340)
> at net.hydromatic.avatica.AvaticaStatement.executeQuery(AvaticaStatement.java:76)
> ... 1 more
> {noformat}
> Reason: SQLTypeMap.java
> The problem is that the driver does not distinguish between float and integer values.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)