Skip to content

Commit

Permalink
[fix][dingo-executor] Fix nullpointer for ducument search with null f…
Browse files Browse the repository at this point in the history
…ield values
  • Loading branch information
zhaoyuan2024 committed Nov 26, 2024
1 parent 9da3a96 commit dab686a
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,14 @@ DocumentSearchParameter documentSearchParamTo(
DocumentWithScore documentWithScoreTo(io.dingodb.sdk.service.entity.common.DocumentWithScore documentWithScore);

default DocumentValue documentValueTo(io.dingodb.sdk.service.entity.common.DocumentValue documentValue) {
return DocumentValue.builder()
.fieldType(scalarFieldTypeTo(documentValue.getFieldType()))
.fieldValue(scalarFieldTo(documentValue.getFieldValue()))
.build();
DocumentValue res = new DocumentValue();
if(documentValue.getFieldValue() != null) {
return DocumentValue.builder()
.fieldType(scalarFieldTypeTo(documentValue.getFieldType()))
.fieldValue(scalarFieldTo(documentValue.getFieldValue()))
.build();
}
return res;
}

default io.dingodb.sdk.service.entity.common.DocumentValue documentValueTo(DocumentValue documentValue) {
Expand Down

0 comments on commit dab686a

Please sign in to comment.