Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-22148

BinaryTupleFormatException for UUID

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Done
    • None
    • 3.0.0-beta2
    • sql

    Description

      Simple example to reproduce the issue:

      sql("create table tdd(a uuid default gen_random_uuid, b int, primary key (a) )"); 
      sql("insert into tdd(b) values(22)");

      we got

      Caused by: org.apache.ignite.internal.binarytuple.BinaryTupleFormatException: IGN-CMN-65535 TraceId:5dfdd34c-6722-41ad-85f3-13aa0c483454 Invalid length for a tuple element: 36
          at org.apache.ignite.internal.binarytuple.BinaryTupleParser.uuidValue(BinaryTupleParser.java:377)
          at org.apache.ignite.internal.binarytuple.BinaryTupleReader.uuidValue(BinaryTupleReader.java:305)
          at org.apache.ignite.internal.sql.engine.util.Commons.readValue(Commons.java:487)
          at org.apache.ignite.internal.sql.engine.exec.SqlOutputBinaryRow.newRow(SqlOutputBinaryRow.java:85)
          at org.apache.ignite.internal.sql.engine.exec.TableRowConverterImpl.toBinaryRow(TableRowConverterImpl.java:83)
          at org.apache.ignite.internal.sql.engine.exec.UpdatableTableImpl.insert(UpdatableTableImpl.java:187)
          at org.apache.ignite.internal.sql.engine.prepare.KeyValueModifyPlan.lambda$execute$1(KeyValueModifyPlan.java:133)
          at java.base/java.util.concurrent.CompletableFuture.uniComposeStage(CompletableFuture.java:1187) 

      Let's add validation for `create table` at least for defaults

      Attachments

        Issue Links

          Activity

            People

              mzhuravkov Maksim Zhuravkov
              jooger Iurii Gerzhedovich
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m