samarthjain commented on a change in pull request #9422: URL: https://github.com/apache/druid/pull/9422#discussion_r448544157
########## File path: processing/src/main/java/org/apache/druid/segment/column/UnknownTypeComplexColumn.java ########## @@ -0,0 +1,99 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.druid.segment.column; + +import org.apache.druid.segment.ColumnValueSelector; +import org.apache.druid.segment.NilColumnValueSelector; +import org.apache.druid.segment.data.ReadableOffset; +import org.apache.druid.segment.vector.NilVectorSelector; +import org.apache.druid.segment.vector.ReadableVectorOffset; +import org.apache.druid.segment.vector.VectorObjectSelector; +import org.apache.druid.segment.vector.VectorSizeInspector; + +import javax.annotation.Nullable; + +public class UnknownTypeComplexColumn implements ComplexColumn +{ + private static final UnknownTypeComplexColumn INSTANCE = new UnknownTypeComplexColumn(); + + public static UnknownTypeComplexColumn instance() + { + return INSTANCE; + } + + private static final NilVectorSelector NIL_VECTOR_SELECTOR_INSTANCE = + NilVectorSelector.create(new VectorSizeInspector() + { + @Override + public int getMaxVectorSize() + { + return 0; + } + + @Override + public int getCurrentVectorSize() + { + return 0; + } + }); + + @Override + public Class<?> getClazz() + { + return ComplexColumn.class; + } + + @Override + public String getTypeName() + { + return "UNKNOWN_COMPLEX_COLUMN_TYPE"; + } + + @Nullable + @Override + public Object getRowValue(int rowNum) + { + return null; + } + + @Override + public int getLength() + { + return 0; + } + + @Override + public void close() + { + + } + + @Override + public ColumnValueSelector<?> makeColumnValueSelector(ReadableOffset offset) + { + return NilColumnValueSelector.instance(); Review comment: While it wouldn't be too noisy, it made me think will it give us enough information to understand which column is actually invalid now? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org For additional commands, e-mail: commits-h...@druid.apache.org