drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DRILL-5546) Schema change problems caused by empty batch
Date Wed, 30 Aug 2017 21:01:00 GMT

    [ https://issues.apache.org/jira/browse/DRILL-5546?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16148054#comment-16148054
] 

ASF GitHub Bot commented on DRILL-5546:
---------------------------------------

Github user jinfengni commented on a diff in the pull request:

    https://github.com/apache/drill/pull/906#discussion_r136188197
  
    --- Diff: exec/vector/src/main/java/org/apache/drill/exec/vector/UntypedNullVector.java
---
    @@ -0,0 +1,267 @@
    +/*
    + * 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.drill.exec.vector;
    +
    +
    +import com.google.common.base.Preconditions;
    +import io.netty.buffer.DrillBuf;
    +import org.apache.drill.exec.memory.BufferAllocator;
    +import org.apache.drill.exec.proto.UserBitShared.SerializedField;
    +import org.apache.drill.exec.record.MaterializedField;
    +import org.apache.drill.exec.record.TransferPair;
    +import org.apache.drill.exec.vector.complex.reader.FieldReader;
    +
    +/** UntypedNullVector is to represent a value vector with {@link org.apache.drill.common.types.MinorType.NULL}
    + *  All values in the vector represent two semantic implications: 1) the value is unknown,
2) the type is unknown.
    + *  Because of this, we only have to keep track of the number of values in value vector,
    + *  and there is no allocated buffer to back up this value vector. Therefore, the majority
of
    + *  methods in this class is either no-op, or throws {@link UnsupportedOperationException}.
    + *
    + */
    +public final class UntypedNullVector extends BaseDataValueVector implements FixedWidthVector
{
    +  private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(UntypedNullVector.class);
    +
    +  /**
    +   * Width of each fixed-width value.
    +   */
    +  public static final int VALUE_WIDTH = 0;
    +
    +  private final Accessor accessor = new Accessor();
    +  private final Mutator mutator = new Mutator();
    +  private int valueCount ;
    +
    +  public UntypedNullVector(MaterializedField field, BufferAllocator allocator) {
    +    super(field, allocator);
    +    valueCount = 0;
    +  }
    +
    +  @Override
    +  public FieldReader getReader() { throw new UnsupportedOperationException(); }
    +
    +  @Override
    +  public int getBufferSizeFor(final int valueCount) {
    +    return 0;
    +  }
    +
    +  @Override
    +  public int getValueCapacity(){
    +    return Character.MAX_VALUE;
    --- End diff --
    
    Done.


> Schema change problems caused by empty batch
> --------------------------------------------
>
>                 Key: DRILL-5546
>                 URL: https://issues.apache.org/jira/browse/DRILL-5546
>             Project: Apache Drill
>          Issue Type: Bug
>            Reporter: Jinfeng Ni
>            Assignee: Jinfeng Ni
>
> There have been a few JIRAs opened related to schema change failure caused by empty batch.
This JIRA is opened as an umbrella for all those related JIRAS ( such as DRILL-4686, DRILL-4734,
DRILL4476, DRILL-4255, etc).
>  



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message