You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Maksim Zhuravkov (Jira)" <ji...@apache.org> on 2023/05/31 11:49:00 UTC

[jira] [Commented] (IGNITE-17374) Sql. Unable to insert default value to VARBINARY column

    [ https://issues.apache.org/jira/browse/IGNITE-17374?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17727919#comment-17727919 ] 

Maksim Zhuravkov commented on IGNITE-17374:
-------------------------------------------

The issue is no longer reproducible since https://issues.apache.org/jira/browse/IGNITE-18373 fixed that. 

{code:java}
    @Test
    public void test() {
        sql("CREATE TABLE t (id INT PRIMARY KEY, val VARBINARY DEFAULT x'010203')");
        sql("INSERT INTO t (id) VALUES (0)");
        assertQuery("SELECT id, val FROM t").returns(0, new byte[] {1, 2, 3}).check();
    }
{code}


> Sql. Unable to insert default value to VARBINARY column
> -------------------------------------------------------
>
>                 Key: IGNITE-17374
>                 URL: https://issues.apache.org/jira/browse/IGNITE-17374
>             Project: Ignite
>          Issue Type: Bug
>          Components: sql
>            Reporter: Konstantin Orlov
>            Priority: Major
>              Labels: ignite-3
>
> Exception is thrown when inserting a tuple with omitted VARBINARY column with specified default.
> Consider the following case:
> {code:java}
> CREATE TABLE t (id INT PRIMARY KEY, val VARBINARY DEAFULT x'010203');
> INSERT INTO t (id) VALUES (0);{code}
> Exception is: 
> {noformat}
> org.apache.ignite.lang.IgniteException: IGN-CMN-1 Trace ID:a1504c58-d305-464a-aa87-2a137c3b88aa Compiling "SC" in Line 1, Column 1: Line 1, Column 13: Compiling "execute(org.apache.ignite.internal.sql.engine.exec.ExecutionContext ctx, Object in1, Object out)": Line 3, Column 52
> 	at org.apache.ignite.internal.sql.engine.AsyncSqlCursorImpl.lambda$requestNextAsync$0(AsyncSqlCursorImpl.java:74)
> 	at java.base/java.util.concurrent.CompletableFuture.uniHandle(CompletableFuture.java:930)
> 	at java.base/java.util.concurrent.CompletableFuture$UniHandle.tryFire(CompletableFuture.java:907)
> 	at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506)
> 	at java.base/java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:2088)
> 	at org.apache.ignite.internal.sql.engine.exec.ExecutionServiceImpl$DistributedQueryManager.acknowledgeFragment(ExecutionServiceImpl.java:404)
> 	at org.apache.ignite.internal.sql.engine.exec.ExecutionServiceImpl.onMessage(ExecutionServiceImpl.java:278)
> 	at org.apache.ignite.internal.sql.engine.exec.ExecutionServiceImpl.lambda$start$3(ExecutionServiceImpl.java:172)
> 	at org.apache.ignite.internal.sql.engine.message.MessageServiceImpl.onMessageInternal(MessageServiceImpl.java:174)
> 	at org.apache.ignite.internal.sql.engine.message.MessageServiceImpl.lambda$onMessage$4(MessageServiceImpl.java:137)
> 	at org.apache.ignite.internal.sql.engine.exec.QueryTaskExecutorImpl.lambda$execute$0(QueryTaskExecutorImpl.java:80)
> 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
> 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
> 	at java.base/java.lang.Thread.run(Thread.java:834)
> Caused by: org.apache.ignite.lang.IgniteException: IGN-CMN-1 Trace ID:a1504c58-d305-464a-aa87-2a137c3b88aa Compiling "SC" in Line 1, Column 1: Line 1, Column 13: Compiling "execute(org.apache.ignite.internal.sql.engine.exec.ExecutionContext ctx, Object in1, Object out)": Line 3, Column 52
> 	at org.apache.ignite.internal.sql.engine.util.Commons.compile(Commons.java:487)
> 	at org.apache.ignite.internal.sql.engine.exec.exp.ExpressionFactoryImpl.compile(ExpressionFactoryImpl.java:364)
> 	at org.apache.ignite.internal.sql.engine.exec.exp.ExpressionFactoryImpl.lambda$scalar$4(ExpressionFactoryImpl.java:285)
> 	at com.github.benmanes.caffeine.cache.BoundedLocalCache.lambda$doComputeIfAbsent$13(BoundedLocalCache.java:2457)
> 	at java.base/java.util.concurrent.ConcurrentHashMap.compute(ConcurrentHashMap.java:1908)
> 	at com.github.benmanes.caffeine.cache.BoundedLocalCache.doComputeIfAbsent(BoundedLocalCache.java:2455)
> 	at com.github.benmanes.caffeine.cache.BoundedLocalCache.computeIfAbsent(BoundedLocalCache.java:2438)
> 	at com.github.benmanes.caffeine.cache.LocalCache.computeIfAbsent(LocalCache.java:107)
> 	at org.apache.ignite.internal.sql.engine.exec.exp.ExpressionFactoryImpl.scalar(ExpressionFactoryImpl.java:284)
> 	at org.apache.ignite.internal.sql.engine.exec.exp.ExpressionFactoryImpl.project(ExpressionFactoryImpl.java:219)
> 	at org.apache.ignite.internal.sql.engine.exec.LogicalRelImplementor.visit(LogicalRelImplementor.java:201)
> 	at org.apache.ignite.internal.sql.engine.exec.LogicalRelImplementor.visit(LogicalRelImplementor.java:109)
> 	at org.apache.ignite.internal.sql.engine.rel.IgniteProject.accept(IgniteProject.java:92)
> 	at org.apache.ignite.internal.sql.engine.exec.LogicalRelImplementor.visit(LogicalRelImplementor.java:701)
> 	at org.apache.ignite.internal.sql.engine.exec.LogicalRelImplementor.visit(LogicalRelImplementor.java:711)
> 	at org.apache.ignite.internal.sql.engine.exec.LogicalRelImplementor.visit(LogicalRelImplementor.java:515)
> 	at org.apache.ignite.internal.sql.engine.exec.LogicalRelImplementor.visit(LogicalRelImplementor.java:109)
> 	at org.apache.ignite.internal.sql.engine.rel.IgniteTableModify.accept(IgniteTableModify.java:106)
> 	at org.apache.ignite.internal.sql.engine.exec.LogicalRelImplementor.visit(LogicalRelImplementor.java:701)
> 	at org.apache.ignite.internal.sql.engine.exec.LogicalRelImplementor.go(LogicalRelImplementor.java:716)
> 	at org.apache.ignite.internal.sql.engine.exec.ExecutionServiceImpl$DistributedQueryManager.executeFragment(ExecutionServiceImpl.java:433)
> 	at org.apache.ignite.internal.sql.engine.exec.ExecutionServiceImpl$DistributedQueryManager.submitFragment(ExecutionServiceImpl.java:494)
> 	at org.apache.ignite.internal.sql.engine.exec.ExecutionServiceImpl.onMessage(ExecutionServiceImpl.java:269)
> 	at org.apache.ignite.internal.sql.engine.exec.ExecutionServiceImpl.lambda$start$2(ExecutionServiceImpl.java:171)
> 	at org.apache.ignite.internal.sql.engine.message.MessageServiceImpl.onMessageInternal(MessageServiceImpl.java:174)
> 	at org.apache.ignite.internal.sql.engine.message.MessageServiceImpl.lambda$onMessage$3(MessageServiceImpl.java:135)
> 	... 4 more
> Caused by: org.codehaus.commons.compiler.InternalCompilerException: Compiling "SC" in Line 1, Column 1: Line 1, Column 13: Compiling "execute(org.apache.ignite.internal.sql.engine.exec.ExecutionContext ctx, Object in1, Object out)": Line 3, Column 52
> 	at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:369)
> 	at org.codehaus.janino.UnitCompiler.access$000(UnitCompiler.java:231)
> 	at org.codehaus.janino.UnitCompiler$1.visitCompilationUnit(UnitCompiler.java:333)
> 	at org.codehaus.janino.UnitCompiler$1.visitCompilationUnit(UnitCompiler.java:330)
> 	at org.codehaus.janino.Java$CompilationUnit.accept(Java.java:367)
> 	at org.codehaus.janino.UnitCompiler.compileUnit(UnitCompiler.java:330)
> 	at org.codehaus.janino.SimpleCompiler.cook(SimpleCompiler.java:245)
> 	at org.codehaus.janino.ClassBodyEvaluator.cook(ClassBodyEvaluator.java:294)
> 	at org.codehaus.janino.ClassBodyEvaluator.cook(ClassBodyEvaluator.java:288)
> 	at org.codehaus.janino.ClassBodyEvaluator.cook(ClassBodyEvaluator.java:267)
> 	at org.codehaus.commons.compiler.Cookable.cook(Cookable.java:52)
> 	at org.codehaus.janino.ClassBodyEvaluator.createInstance(ClassBodyEvaluator.java:428)
> 	at org.apache.ignite.internal.sql.engine.util.Commons.compile(Commons.java:485)
> 	... 29 more
> Caused by: org.codehaus.commons.compiler.InternalCompilerException: Line 1, Column 13: Compiling "execute(org.apache.ignite.internal.sql.engine.exec.ExecutionContext ctx, Object in1, Object out)": Line 3, Column 52
> 	at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:3222)
> 	at org.codehaus.janino.UnitCompiler.compileDeclaredMethods(UnitCompiler.java:1379)
> 	at org.codehaus.janino.UnitCompiler.compileDeclaredMethods(UnitCompiler.java:1352)
> 	at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:800)
> 	at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:412)
> 	at org.codehaus.janino.UnitCompiler.access$400(UnitCompiler.java:231)
> 	at org.codehaus.janino.UnitCompiler$2.visitPackageMemberClassDeclaration(UnitCompiler.java:391)
> 	at org.codehaus.janino.UnitCompiler$2.visitPackageMemberClassDeclaration(UnitCompiler.java:386)
> 	at org.codehaus.janino.Java$PackageMemberClassDeclaration.accept(Java.java:1692)
> 	at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:386)
> 	at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:359)
> 	... 41 more
> Caused by: java.lang.RuntimeException: Line 3, Column 52
> 	at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:2639)
> 	at org.codehaus.janino.UnitCompiler.access$2700(UnitCompiler.java:231)
> 	at org.codehaus.janino.UnitCompiler$6.visitLocalVariableDeclarationStatement(UnitCompiler.java:1539)
> 	at org.codehaus.janino.UnitCompiler$6.visitLocalVariableDeclarationStatement(UnitCompiler.java:1523)
> 	at org.codehaus.janino.Java$LocalVariableDeclarationStatement.accept(Java.java:3840)
> 	at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:1523)
> 	at org.codehaus.janino.UnitCompiler.compileStatements(UnitCompiler.java:1607)
> 	at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:3531)
> 	at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:3218)
> 	... 51 more
> Caused by: org.codehaus.commons.compiler.InternalCompilerException: Line 3, Column 68: Compiling "new org.apache.calcite.avatica.util.ByteString(new byte[] { ... })": Line 4, Column 5: Compiling "new byte[] { ... }": Code grows beyond 64 KB
> 	at org.codehaus.janino.UnitCompiler.compileGetValue(UnitCompiler.java:5731)
> 	at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:2622)
> 	... 59 more
> Caused by: org.codehaus.commons.compiler.InternalCompilerException: Line 4, Column 5: Compiling "new byte[] { ... }": Code grows beyond 64 KB
> 	at org.codehaus.janino.UnitCompiler.compileGetValue(UnitCompiler.java:5731)
> 	at org.codehaus.janino.UnitCompiler.invokeConstructor(UnitCompiler.java:8297)
> 	at org.codehaus.janino.UnitCompiler.compileGet2(UnitCompiler.java:5468)
> 	at org.codehaus.janino.UnitCompiler.access$9700(UnitCompiler.java:231)
> 	at org.codehaus.janino.UnitCompiler$15.visitNewClassInstance(UnitCompiler.java:4643)
> 	at org.codehaus.janino.UnitCompiler$15.visitNewClassInstance(UnitCompiler.java:4604)
> 	at org.codehaus.janino.Java$NewClassInstance.accept(Java.java:5560)
> 	at org.codehaus.janino.UnitCompiler.compileGet(UnitCompiler.java:4604)
> 	at org.codehaus.janino.UnitCompiler.compileGetValue(UnitCompiler.java:5729)
> 	... 60 more
> Caused by: org.codehaus.commons.compiler.InternalCompilerException: Code grows beyond 64 KB
> 	at org.codehaus.janino.CodeContext.makeSpace(CodeContext.java:649)
> 	at org.codehaus.janino.CodeContext.write(CodeContext.java:551)
> 	at org.codehaus.janino.UnitCompiler.writeShort(UnitCompiler.java:12758)
> 	at org.codehaus.janino.UnitCompiler.consT(UnitCompiler.java:10883)
> 	at org.codehaus.janino.UnitCompiler.compileGetValue(UnitCompiler.java:5682)
> 	at org.codehaus.janino.UnitCompiler.compileGet2(UnitCompiler.java:5656)
> 	at org.codehaus.janino.UnitCompiler.access$9600(UnitCompiler.java:231)
> 	at org.codehaus.janino.UnitCompiler$15.visitNewInitializedArray(UnitCompiler.java:4642)
> 	at org.codehaus.janino.UnitCompiler$15.visitNewInitializedArray(UnitCompiler.java:4604)
> 	at org.codehaus.janino.Java$NewInitializedArray.accept(Java.java:5743)
> 	at org.codehaus.janino.UnitCompiler.compileGet(UnitCompiler.java:4604)
> 	at org.codehaus.janino.UnitCompiler.compileGetValue(UnitCompiler.java:5729)
> 	... 68 more
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)