Skip to content

Commit 9482e70

Browse files
authored
Implements isEmpty method in embedding data type (#1024)
Issue: 206584
1 parent 3206b81 commit 9482e70

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

java/src/main/java/com/genexus/db/GXEmbedding.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,4 +112,9 @@ public String toString()
112112
.map(String::valueOf)
113113
.collect(Collectors.joining(","));
114114
}
115+
116+
public boolean isEmpty() {
117+
return embedding == null || embedding.isEmpty() ||
118+
embedding.stream().allMatch(v -> v == null || v == 0.0f);
119+
}
115120
}

0 commit comments

Comments
 (0)