From 96ec68df523a089440863a7898ef3c4140b472d3 Mon Sep 17 00:00:00 2001 From: Anush008 Date: Tue, 17 Sep 2024 16:17:20 +0530 Subject: [PATCH] refactor:Allow vectors to be null --- build.gradle | 2 +- src/main/java/io/qdrant/kafka/ValueExtractor.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 6ff4349..5d432b4 100644 --- a/build.gradle +++ b/build.gradle @@ -11,7 +11,7 @@ plugins { } group = 'io.qdrant' -version = '1.1.1' +version = '1.1.2' description = 'Kafka Sink Connector for Qdrant.' java.sourceCompatibility = JavaVersion.VERSION_1_8 java.targetCompatibility = JavaVersion.VERSION_1_8 diff --git a/src/main/java/io/qdrant/kafka/ValueExtractor.java b/src/main/java/io/qdrant/kafka/ValueExtractor.java index d5d32ed..fcca8b7 100644 --- a/src/main/java/io/qdrant/kafka/ValueExtractor.java +++ b/src/main/java/io/qdrant/kafka/ValueExtractor.java @@ -77,7 +77,7 @@ public Map getPayload() { public Vectors getVector() { Value vectorValue = this.valueMap.get(VECTOR_KEY); - if (vectorValue == null) { + if (vectorValue == null || vectorValue.hasNullValue()) { return Vectors.newBuilder().setVectors(NamedVectors.getDefaultInstance()).build(); }