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

xiangfu 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 f31ce3835c ForwardIndexHandler should only refer to columns in schema 
(#11374)
f31ce3835c is described below

commit f31ce3835c8a6b1c6cca9e391f6f624257c59ea9
Author: Saurabh Dubey <[email protected]>
AuthorDate: Wed Aug 23 13:51:08 2023 +0530

    ForwardIndexHandler should only refer to columns in schema (#11374)
    
    * ForwardIndexHandler should only refer to columns in schema
    
    * Fix test
    
    ---------
    
    Co-authored-by: Saurabh Dubey <[email protected]>
---
 .../segment/local/segment/index/loader/ForwardIndexHandler.java      | 5 +++++
 1 file changed, 5 insertions(+)

diff --git 
a/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/loader/ForwardIndexHandler.java
 
b/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/loader/ForwardIndexHandler.java
index ffdb7485d8..91b0d46b0a 100644
--- 
a/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/loader/ForwardIndexHandler.java
+++ 
b/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/loader/ForwardIndexHandler.java
@@ -219,6 +219,11 @@ public class ForwardIndexHandler extends BaseIndexHandler {
     }
 
     for (String column : existingAllColumns) {
+      if (_schema != null && !_schema.hasColumn(column)) {
+        // _schema will be null only in tests
+        LOGGER.info("Column {} is not in schema, skipping updating forward 
index", column);
+        continue;
+      }
       FieldIndexConfigs newConf = _fieldIndexConfigs.get(column);
       boolean newIsFwd = 
newConf.getConfig(StandardIndexes.forward()).isEnabled();
       boolean newIsDict = 
newConf.getConfig(StandardIndexes.dictionary()).isEnabled();


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to