[
https://issues.apache.org/jira/browse/CALCITE-1955?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16131741#comment-16131741
]
Francis Chuang edited comment on CALCITE-1955 at 8/18/17 5:32 AM:
------------------------------------------------------------------
According to: http://www.hsqldb.org/doc/2.0/guide/running-chapt.html
{code}
A res: catalog consists of the files for a small, read-only database that can
be stored inside a Java resource such as a ZIP or JAR archive and distributed
as part of a Java application program.
{code}
The docker image uses the scott dataset and is started with this command: `-u
jdbc:hsqldb:res:scott`
I started avatica/hsqldb to use memory: `-u jdbc:hsqldb:mem`.
After changing it to use memory, blobs are now written to the db.
So I guess in this case, we just need to update the documentation for
Avatica-HSQLDB to state that it is launched with the scott dataset by default
which is not writeable for LOBs.
was (Author: francischuang):
According to: http://www.hsqldb.org/doc/2.0/guide/running-chapt.html
{code}
A res: catalog consists of the files for a small, read-only database that can
be stored inside a Java resource such as a ZIP or JAR archive and distributed
as part of a Java application program.
{code}
The docker image uses the scott dataset and is started with this command: `-u
jdbc:hsqldb:res:scott`
I started avatica/hsqldb to use memory: `-u jdbc:hsqldb:mem`.
After changing it to use memory, blobs are now written to the db.
> Cannot insert blob into Avatica-HSQLDB table because table is read only
> -----------------------------------------------------------------------
>
> Key: CALCITE-1955
> URL: https://issues.apache.org/jira/browse/CALCITE-1955
> Project: Calcite
> Issue Type: Bug
> Components: avatica
> Reporter: Francis Chuang
>
> This might be more of a question as I am not able to find official
> information in the HSQLDB docs.
> I am porting a test to test the insertion of binary data into a table from
> Phoenix to HSQLDB. The test passes when using Phoenix with avatica.
> 1. I created this table:
> {code}
> CREATE TABLE some_table (
> int INTEGER PRIMARY KEY,
> bin BLOB
> )
> {code}
> 2. I attempt to insert the data using `INSERT INTO some_table (int, bin)
> VALUES (?, ?)`
> The binary is being sent as a `Rep_BYTE_STRING` and the data is placed in
> byte_values.
> This is the error I receive from HSQLDB:
> {code}
> RuntimeException: java.sql.SQLException: org.hsqldb.HsqlException: The table
> data is read only -> SQLException: org.hsqldb.HsqlException: The table data
> is read only -> HsqlException: org.hsqldb.HsqlException: The table data is
> read only -> HsqlException: The table data is read only
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)