You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by go...@apache.org on 2024/08/28 10:26:22 UTC

(pinot) branch master updated: Log nullable columns on creation (#13868)

This is an automated email from the ASF dual-hosted git repository.

gortiz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pinot.git


The following commit(s) were added to refs/heads/master by this push:
     new 1702ea2d06 Log nullable columns on creation (#13868)
1702ea2d06 is described below

commit 1702ea2d061b3467ba3e3954d3ef6817fd61f906
Author: Gonzalo Ortiz Jaureguizar <go...@users.noreply.github.com>
AuthorDate: Wed Aug 28 12:26:16 2024 +0200

    Log nullable columns on creation (#13868)
---
 .../segment/local/indexsegment/mutable/MutableSegmentImpl.java   | 9 ++++++++-
 .../local/segment/creator/impl/SegmentColumnarIndexCreator.java  | 5 ++++-
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/indexsegment/mutable/MutableSegmentImpl.java b/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/indexsegment/mutable/MutableSegmentImpl.java
index 908f220471..070e7d1bd0 100644
--- a/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/indexsegment/mutable/MutableSegmentImpl.java
+++ b/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/indexsegment/mutable/MutableSegmentImpl.java
@@ -338,7 +338,14 @@ public class MutableSegmentImpl implements MutableSegment {
       }
 
       // Null value vector
-      MutableNullValueVector nullValueVector = isNullable(fieldSpec) ? new MutableNullValueVector() : null;
+      MutableNullValueVector nullValueVector;
+      if (isNullable(fieldSpec)) {
+        _logger.info("Column: {} is nullable", column);
+        nullValueVector = new MutableNullValueVector();
+      } else {
+        _logger.info("Column: {} is not nullable", column);
+        nullValueVector = null;
+      }
 
       Map<IndexType, MutableIndex> mutableIndexes = new HashMap<>();
       for (IndexType<?, ?, ?> indexType : IndexService.getInstance().getAllIndexes()) {
diff --git a/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/creator/impl/SegmentColumnarIndexCreator.java b/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/creator/impl/SegmentColumnarIndexCreator.java
index 0fb078ce52..dc7e9df342 100644
--- a/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/creator/impl/SegmentColumnarIndexCreator.java
+++ b/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/creator/impl/SegmentColumnarIndexCreator.java
@@ -218,10 +218,13 @@ public class SegmentColumnarIndexCreator implements SegmentCreator {
 
     // Although NullValueVector is implemented as an index, it needs to be treated in a different way than other indexes
     for (FieldSpec fieldSpec : schema.getAllFieldSpecs()) {
+      String columnName = fieldSpec.getName();
       if (isNullable(fieldSpec)) {
         // Initialize Null value vector map
-        String columnName = fieldSpec.getName();
+        LOGGER.info("Column: {} is nullable", columnName);
         _nullValueVectorCreatorMap.put(columnName, new NullValueVectorCreator(_indexDir, columnName));
+      } else {
+        LOGGER.info("Column: {} is not nullable", columnName);
       }
     }
   }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org