flink-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] (FLINK-5187) Create analog of Row in core
Date Mon, 12 Dec 2016 14:06:59 GMT

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

ASF GitHub Bot commented on FLINK-5187:
---------------------------------------

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

    https://github.com/apache/flink/pull/2968#discussion_r91758367
  
    --- Diff: flink-core/src/main/java/org/apache/flink/api/java/typeutils/RowTypeInfo.java
---
    @@ -0,0 +1,202 @@
    +/*
    + * 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.flink.api.java.typeutils;
    +
    +import org.apache.flink.annotation.PublicEvolving;
    +import org.apache.flink.api.common.ExecutionConfig;
    +import org.apache.flink.api.common.typeinfo.TypeInformation;
    +import org.apache.flink.api.common.typeutils.TypeComparator;
    +import org.apache.flink.api.common.typeutils.TypeSerializer;
    +import org.apache.flink.api.java.typeutils.runtime.RowComparator;
    +import org.apache.flink.api.java.typeutils.runtime.RowSerializer;
    +import org.apache.flink.types.Row;
    +
    +import java.util.ArrayList;
    +import java.util.Arrays;
    +import java.util.Collections;
    +
    +import static org.apache.flink.util.Preconditions.checkState;
    +
    +/**
    + * TypeInformation for {@link Row}
    + */
    +@PublicEvolving
    +public class RowTypeInfo extends TupleTypeInfoBase<Row> {
    +
    +	private static final long serialVersionUID = 9158518989896601963L;
    +
    +	protected final String[] fieldNames;
    +	/** Temporary variable for directly passing orders to comparators. */
    +	private boolean[] comparatorOrders = null;
    +
    +	public RowTypeInfo(TypeInformation<?>... types) {
    +		super(Row.class, types);
    +
    +		this.fieldNames = new String[types.length];
    +
    +		for (int i = 0; i < types.length; i++) {
    +			fieldNames[i] = "f" + i;
    +		}
    +	}
    +
    +	@Override
    +	public TypeComparator<Row> createComparator(
    +		int[] logicalKeyFields,
    +		boolean[] orders,
    +		int logicalFieldOffset,
    +		ExecutionConfig config) {
    +		comparatorOrders = orders;
    --- End diff --
    
    can you add a new line here to separate parameters from the method body?


> Create analog of Row in core
> ----------------------------
>
>                 Key: FLINK-5187
>                 URL: https://issues.apache.org/jira/browse/FLINK-5187
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Core, Table API & SQL
>            Reporter: Anton Solovev
>            Assignee: Jark Wu
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message