You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (JIRA)" <ji...@apache.org> on 2016/01/26 21:39:39 UTC

[jira] [Resolved] (CALCITE-1067) Test failures due to clashing temporary table names

     [ https://issues.apache.org/jira/browse/CALCITE-1067?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Julian Hyde resolved CALCITE-1067.
----------------------------------
       Resolution: Fixed
    Fix Version/s: 1.7.0

Fixed in http://git-wip-us.apache.org/repos/asf/calcite/commit/4ec47270.

> Test failures due to clashing temporary table names
> ---------------------------------------------------
>
>                 Key: CALCITE-1067
>                 URL: https://issues.apache.org/jira/browse/CALCITE-1067
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Julian Hyde
>            Assignee: Julian Hyde
>             Fix For: 1.7.0
>
>
> Some tests have been failing because they use the same name for their temporary tables in hsqldb. For example,
> {noformat}
> Error Message
> Error -1 (00000) : Error while executing SQL "insert into TEST_TABLE2 values ('1735556312', '95d82c2e-49d0-4478-acb9-a7763a6234c4')": Remote driver error: RuntimeException: java.sql.SQLDataException: data exception: string data, right truncation;  table: TEST_TABLE2 column: MSG -> SQLDataException: data exception: string data, right truncation;  table: TEST_TABLE2 column: MSG -> HsqlException: data exception: string data, right truncation;  table: TEST_TABLE2 column: MSG -> HsqlException: data exception: string data, right truncation
> Stacktrace
> org.apache.calcite.avatica.AvaticaSqlException: Error -1 (00000) : Error while executing SQL "insert into TEST_TABLE2 values ('1735556312', '95d82c2e-49d0-4478-acb9-a7763a6234c4')": Remote driver error: RuntimeException: java.sql.SQLDataException: data exception: string data, right truncation;  table: TEST_TABLE2 column: MSG -> SQLDataException: data exception: string data, right truncation;  table: TEST_TABLE2 column: MSG -> HsqlException: data exception: string data, right truncation;  table: TEST_TABLE2 column: MSG -> HsqlException: data exception: string data, right truncation
> 	at org.apache.calcite.avatica.Helper.createException(Helper.java:53)
> 	at org.apache.calcite.avatica.Helper.createException(Helper.java:41)
> 	at org.apache.calcite.avatica.AvaticaStatement.executeInternal(AvaticaStatement.java:143)
> 	at org.apache.calcite.avatica.AvaticaStatement.executeLargeUpdate(AvaticaStatement.java:204)
> 	at org.apache.calcite.avatica.AvaticaStatement.executeUpdate(AvaticaStatement.java:199)
> 	at org.apache.calcite.avatica.remote.RemoteMetaTest.testRemoteStatementInsert(RemoteMetaTest.java:274)
> Standard Output
> jdbc:avatica:remote:url=http://localhost:55369;serialization=JSON
> {noformat}
> This occurs because RemoteMetaTest.testRemoteStatementInsert and RemoteMetaTest.testRemoteStatementInsert both use a table called TEST_TABLE2.
> The solution is to generate unique temporary table names; add a method {{String AvaticaUtils.unique(String s)}} and have tests call it to make their table names unique. They could use it for any other resources they want to be unique, such as file names.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)