Details
-
Bug
-
Resolution: Unresolved
-
Critical
-
None
-
All
-
Small
Description
- We create an entry in a schema, with a name containing spaces: ...withName("Un Nom Avec Espace")
- The name is sanitized and spaces are replaced with '_', to be compatible with avro: https://github.com/Talend/component-runtime/blob/82bd3ee9d27385ff55a11d378501ba76ae108da5/component-runtime-impl/src/main/java/org/talend/sdk/component/runtime/record/SchemaImpl.java#L180
- We create a record builder giving it the schema: builderFactory.newRecordBuilder(schema);
- When we want to set the value in the record, there is an error since the entry is not retrieved: ...withString("Un Nom Avec Espace", ...)
- Indeed the findExistingEntry method doesn't sanitizethe given name, or it is the sanitized name that is the key in entryIndex : https://github.com/Talend/component-runtime/blob/82bd3ee9d27385ff55a11d378501ba76ae108da5/component-runtime-impl/src/main/java/org/talend/sdk/component/runtime/record/RecordImpl.java#L118The