[
https://issues.apache.org/jira/browse/IGNITE-16253?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17495814#comment-17495814
]
Igor Sapego edited comment on IGNITE-16253 at 2/22/22, 1:28 AM:
----------------------------------------------------------------
[~jooger], please, take a look.
Here is a reproducer in Java:
{code:java}
@Test
public void testBlob() throws Exception {
try (Ignite node = Ignition.start(Config.getServerConfiguration())) {
IgniteCache<Integer, Integer> proxy = node.getOrCreateCache("test");
proxy.query(new SqlFieldsQuery(
"CREATE TABLE IF NOT EXISTS Person1 (id INT PRIMARY KEY, byteInfo BLOB) "
+
"WITH \"backups=1,cache_name=Person1,
key_type=Integer,value_type=Person1\""
).setSchema("PUBLIC")
).getAll();
BinaryObjectBuilder builder = node.binary().builder("Person1");
builder.setField("id", 1);
builder.setField("byteInfo", new byte[42]);
node.cache("Person1").withKeepBinary().put(1, builder.build());
proxy.query( new SqlFieldsQuery("SELECT byteInfo from
Person1").setSchema("PUBLIC")).getAll();
}
}
{code}
was (Author: isapego):
[~jooger], please, take a look.
Here is a reproducer in Java:
{code:java}
@Test
public void testBlob() throws Exception {
try (Ignite node = Ignition.start(Config.getServerConfiguration())) {
IgniteCache<Integer, Integer> proxy =
node.getOrCreateCache("test");
proxy.query(
new SqlFieldsQuery(
"CREATE TABLE IF NOT EXISTS Person1 (id
INT PRIMARY KEY, byteInfo BLOB) " +
"WITH
\"backups=1,cache_name=Person1, key_type=Integer,value_type=Person1\""
).setSchema("PUBLIC")
).getAll();
BinaryObjectBuilder builder = node.binary().builder("Person1");
builder.setField("id", 1);
builder.setField("byteInfo", new byte[42]);
node.cache("Person1").withKeepBinary().put(1, builder.build());
proxy.query( new SqlFieldsQuery("SELECT byteInfo from
Person1").setSchema("PUBLIC")).getAll();
}
}
{code}
> CPP Thin:IgniteSQLException:Failed to wrap object into H2 value.[B cannot be
> cast to java.lang.Byte
> ---------------------------------------------------------------------------------------------------
>
> Key: IGNITE-16253
> URL: https://issues.apache.org/jira/browse/IGNITE-16253
> Project: Ignite
> Issue Type: Bug
> Components: thin client
> Affects Versions: 2.11.1
> Reporter: YuJue Li
> Assignee: Igor Sapego
> Priority: Critical
> Fix For: 2.13
>
> Attachments: igniteThinTest.zip
>
>
> the reproducer see attachment.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)