commit | 9b4027cc5cce44b218852720127c02aedfa780e8 | [log] [tgz] |
---|---|---|
author | Xikui Wang <xkkwww@gmail.com> | Wed Dec 19 06:58:58 2018 +0800 |
committer | Xikui Wang <xkkwww@gmail.com> | Tue Dec 18 21:01:56 2018 -0800 |
tree | 21577c258ede0ccc0939616782928aa0cb50a021 | |
parent | c7c8fffdf11be2d91b3e070cd302c87b12e6aa87 [diff] |
[NO ISSUE][EXT] Fix JRecord setField for open fields - user model changes: no - storage format changes: no - interface changes: no Details: setField method should be able to handle open fields. Change-Id: I4ec185d62e78e8100215334bc656586268314797 Reviewed-on: https://asterix-gerrit.ics.uci.edu/3068 Sonar-Qube: Jenkins <jenkins@fulliautomatix.ics.uci.edu> Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu> Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu> Contrib: Jenkins <jenkins@fulliautomatix.ics.uci.edu> Reviewed-by: Ali Alsuliman <ali.al.solaiman@gmail.com>
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/external-library/keyword_detector/keyword_detector.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/external-library/keyword_detector/keyword_detector.1.ddl.sqlpp index 4402130..464ecb2 100644 --- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/external-library/keyword_detector/keyword_detector.1.ddl.sqlpp +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/external-library/keyword_detector/keyword_detector.1.ddl.sqlpp
@@ -35,8 +35,7 @@ }; create type DetectResultType as open{ -id:int64, -sensitive: boolean +id:int64 }; create dataset EmpDataset(InputRecordType) primary key id;
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/library/java/base/JRecord.java b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/library/java/base/JRecord.java index 7fa9d0b..10c228d 100644 --- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/library/java/base/JRecord.java +++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/library/java/base/JRecord.java
@@ -99,11 +99,7 @@ if (pos >= 0) { fields[pos] = fieldValue; } else { - if (openFields.get(fieldName) != null) { - openFields.put(fieldName, fieldValue); - } else { - throw new RuntimeDataException(ErrorCode.LIBRARY_JAVA_JOBJECTS_UNKNOWN_FIELD, fieldName); - } + openFields.put(fieldName, fieldValue); } }