drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From paul-rogers <...@git.apache.org>
Subject [GitHub] drill pull request #877: DRILL-5660: Drill 1.10 queries fail due to Parquet ...
Date Fri, 28 Jul 2017 20:34:52 GMT
Github user paul-rogers commented on a diff in the pull request:

    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/MetadataVersion.java
    @@ -0,0 +1,147 @@
    + * 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
    + * <p/>
    + * http://www.apache.org/licenses/LICENSE-2.0
    + * <p/>
    + * 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.store.parquet;
    +import com.google.common.base.Preconditions;
    +import com.google.common.collect.ComparisonChain;
    +import com.google.common.collect.ImmutableList;
    +import org.apache.drill.common.exceptions.DrillRuntimeException;
    +import java.util.List;
    +import java.util.regex.Matcher;
    +import java.util.regex.Pattern;
    +public class MetadataVersion implements Comparable<MetadataVersion> {
    +  private static final String FORMAT = "v((?!0)\\d+)\\.?((?!0)\\d+)?";
    --- End diff --
    To avoid having to parse the "v", might as well just say that the version is a number.
Define that we increment the major number (before the decimal point) if the JSON structure
changes, we increment the minor number (after the decimal point) of the format is unchanged,
but the semantics change (as in the absolute/relative path change.) In general, convert the
version to a float and just do normal numeric comparison to determine if the file version
is earlier, same as, or later than the code version.

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.

View raw message