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 20:59:00 GMT

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

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_r136187598
  
    --- Diff: exec/vector/src/main/java/org/apache/drill/exec/vector/UntypedNullHolder.java
---
    @@ -0,0 +1,50 @@
    +/*
    + * 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 org.apache.drill.common.types.TypeProtos;
    +import org.apache.drill.common.types.Types;
    +import org.apache.drill.exec.expr.holders.ValueHolder;
    +
    +public class UntypedNullHolder implements ValueHolder {
    +  public static final TypeProtos.MajorType TYPE = Types.optional(TypeProtos.MinorType.NULL);
    +
    +  public TypeProtos.MajorType getType() {return TYPE;}
    +
    +  public static final int WIDTH = 0;
    +
    +  public int isSet = 1;
    +
    +  @Deprecated
    +  public int hashCode(){
    +    throw new UnsupportedOperationException();
    +  }
    +
    +  /*
    +   * Reason for deprecation is that ValueHolders are potential scalar replacements
    +   * and hence we don't want any methods to be invoked on them.
    +   */
    +  @Deprecated
    +  public String toString(){
    +    throw new UnsupportedOperationException();
    --- End diff --
    
    This applies to all the value holder class. See [1].
    
    My understanding is it's for the benefit of potential scalar replacements in byte-code
fixup during execution. We may argue we do not have to leverage scalar replacement with JDK8.
But before we know for sure, it's better to keep it inline with the other value holder classes.

    
    
    1. https://github.com/apache/drill/blob/master/exec/vector/src/main/codegen/templates/ValueHolders.java#L97-L109


> 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