Skip to content
Permalink
Browse files
Coordinated change for non-deterministic udf support
Change-Id: If67c9303aa67a5b20f6609df97dc797cc7ad38a5
  • Loading branch information
Dmitry Lychagin committed Mar 3, 2020
1 parent 29a2cc9 commit 802964b15cc9e70d6bd50e7613c40b096e5fa19e
Showing 1 changed file with 5 additions and 3 deletions.
@@ -95,8 +95,10 @@ public Procedure createMetadataEntityFromARecord(ARecord procedureRecord) throws
String languageValue = ((AString) procedureRecord
.getValueByPos(BADMetadataRecordTypes.PROCEDURE_ARECORD_PROCEDURE_LANGUAGE_FIELD_INDEX))
.getStringValue();
Function.FunctionLanguage language = Function.FunctionLanguage.findByName(languageValue);
if (language == null) {
Function.FunctionLanguage language;
try {
language = Function.FunctionLanguage.valueOf(languageValue);
} catch (IllegalArgumentException e) {
throw new AsterixException(ErrorCode.METADATA_ERROR, languageValue);
}

@@ -204,7 +206,7 @@ public ITupleReference getTupleFromMetadataEntity(Procedure procedure)

// write field 6
fieldValue.reset();
aString.setValue(procedure.getLanguage().getName());
aString.setValue(procedure.getLanguage().name());
stringSerde.serialize(aString, fieldValue.getDataOutput());
recordBuilder.addField(BADMetadataRecordTypes.PROCEDURE_ARECORD_PROCEDURE_LANGUAGE_FIELD_INDEX, fieldValue);

0 comments on commit 802964b

Please sign in to comment.