Uploaded image for project: 'Teiid'
  1. Teiid
  2. TEIID-3534

Infinispan-dsl-cache translator: can't insert null into column of type boolean

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • None
    • 8.7.1.6_2
    • Misc. Connectors
    • None

      Inserting null into boolean column causes exception.

      Sample queries:

      insert into smalla(intKey, stringKey,booleanValue) values(128,'ss',null);
      insert into smalla(intKey, stringKey) values(128,'ss');
      

      This query works:

      insert into smalla(intKey, stringKey,booleanValue) values(128,'ss',false);
      

      Exception:

       Connector worker process failed for atomic-request=NuZ8Nt3h1bKx.52.0.44: org.infinispan.client.hotrod.exceptions.HotRodClientException:Request for message id[239] returned server error (status=0x85): org.hibernate.search.bridge.BridgeException: Exception while calling bridge#set
      	class: org.infinispan.query.remote.indexing.ProtobufValueWrapper
      	path: 
      	at org.infinispan.client.hotrod.impl.protocol.Codec20.checkForErrorsInResponseStatus(Codec20.java:298)
      	at org.infinispan.client.hotrod.impl.protocol.Codec20.readPartialHeader(Codec20.java:88)
      	at org.infinispan.client.hotrod.impl.protocol.Codec20.readHeader(Codec20.java:74)
      	at org.infinispan.client.hotrod.impl.operations.HotRodOperation.readHeaderAndValidate(HotRodOperation.java:56)
      

      This bug breaks data integrity. If this exception is thrown, data will be inserted but it won't be indexed.

      The whole exception is in the attachment.

        1. server.log
          12 kB
        2. testVDB.vdb
          13 kB

            [TEIID-3534] Infinispan-dsl-cache translator: can't insert null into column of type boolean

            David Le Sage <dlesage@redhat.com> changed the Status of bug 1232236 from MODIFIED to CLOSED

            RH Bugzilla Integration added a comment - David Le Sage <dlesage@redhat.com> changed the Status of bug 1232236 from MODIFIED to CLOSED

            David Le Sage <dlesage@redhat.com> changed the Status of bug 1232236 from ASSIGNED to MODIFIED

            RH Bugzilla Integration added a comment - David Le Sage <dlesage@redhat.com> changed the Status of bug 1232236 from ASSIGNED to MODIFIED

            David Le Sage <dlesage@redhat.com> changed the Status of bug 1232236 from NEW to ASSIGNED

            RH Bugzilla Integration added a comment - David Le Sage <dlesage@redhat.com> changed the Status of bug 1232236 from NEW to ASSIGNED

            It has been determined that this is a JDG issue.

            The possible work arounds are:

            • assign defaults in the proto def file
            • or always pass a value for the boolean column

            Van Halbert (Inactive) added a comment - It has been determined that this is a JDG issue. The possible work arounds are: assign defaults in the proto def file or always pass a value for the boolean column

            The first two inserts are likely the same if the column is marked as nullable. It seems surprising that a null boolean value is not allowed though, can you check if that is expected? Does this happen if other values are null?

            If null is not allowed, then the column should be marked as not null. The if no default is specified, an exception will be thrown saying a value is required. Or if there is a default, it will be used.

            Steven Hawkins added a comment - The first two inserts are likely the same if the column is marked as nullable. It seems surprising that a null boolean value is not allowed though, can you check if that is expected? Does this happen if other values are null? If null is not allowed, then the column should be marked as not null. The if no default is specified, an exception will be thrown saying a value is required. Or if there is a default, it will be used.

            I'm not sure this is a Teiid issue (entirely). This is infinispan that throwing the error. But thinking the options thru:

            In case 1, passing null, should the booleans be modeled as required with a default. So that a valid boolean (true|false) is passed to infinispan.

            In case 2, if it was modeled as required, and nothing is passed, then the default would be used, correct?

            Van Halbert (Inactive) added a comment - I'm not sure this is a Teiid issue (entirely). This is infinispan that throwing the error. But thinking the options thru: In case 1, passing null, should the booleans be modeled as required with a default. So that a valid boolean (true|false) is passed to infinispan. In case 2, if it was modeled as required, and nothing is passed, then the default would be used, correct?

            Server log

            Filip Elias (Inactive) added a comment - Server log

            VDB

              van.halbert Van Halbert (Inactive)
              felias_jira Filip Elias (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: