Uploaded image for project: 'Talend Component Kit'
  1. Talend Component Kit
  2. TCOMP-1197

Tacokit beam tests. NPE when creating the schema with RECORD type.

Apply templateInsert Lucidchart Diagram
    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 1.1.3
    • None
    • None
    • All
    • Small

    Description

      When testing tacokit component using beam there is an NPE in this code:

      package org.talend.sdk.component.runtime.beam.spi.record;
      public class SchemaIdGenerator {
      ...
      private static long fingerprint(final List<Schema.Field> fields) {
      return SchemaNormalization
      .parsingFingerprint64(Schema
      .createRecord(fields
      .stream()
      ...

      'fields' is a Null
      -------------------------------
      I call this using next code:
      Schema res = recordBuilderFactory.newSchemaBuilder(Schema.Type.RECORD)
      .withEntry(recordBuilderFactory.newEntryBuilder().withName("createdBy").withType(Schema.Type.RECORD).build())
      -------------------------------
      and the stack trace:
      fingerprint:38, SchemaIdGenerator (org.talend.sdk.component.runtime.beam.spi.record)
      generateRecordName:32, SchemaIdGenerator (org.talend.sdk.component.runtime.beam.spi.record)
      build:132, AvroSchemaBuilder (org.talend.sdk.component.runtime.beam.spi.record)
      withEntry:92, AvroSchemaBuilder (org.talend.sdk.component.runtime.beam.spi.record)
      guessTableSchemaList:103, OneDriveService (org.talend.components.onedrive.service)
      schemaDiscoveryListTest:32, OneDriveServiceTest (org.talend.components.onedrive)
      ---------------------------------
      <component-api.version>1.1.1</component-api.version>
      <component-runtime.version>1.1.3-SNAPSHOT</component-runtime.version>
      <beam.version>2.6.0</beam.version>

      Attachments

        Issue Links

          Activity

            People

              rmannibucau Romain Manni-Bucau
              sbovsunovskyi Stanislav Bovsunovskyi
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: