This is an automated email from the ASF dual-hosted git repository. twalthr pushed a commit to branch release-1.9 in repository https://gitbox.apache.org/repos/asf/flink.git
commit 85636497642ccd054f4a09eb2aa1b2eed6b3ed88 Author: godfreyhe <[email protected]> AuthorDate: Wed Jul 17 20:13:56 2019 +0800 [FLINK-13266] [table] remove definedTimeAttributes file in blink planner those classes are already in table-common module --- .../table/sources/definedTimeAttributes.scala | 95 ---------------------- 1 file changed, 95 deletions(-) diff --git a/flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/sources/definedTimeAttributes.scala b/flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/sources/definedTimeAttributes.scala deleted file mode 100644 index b144312..0000000 --- a/flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/sources/definedTimeAttributes.scala +++ /dev/null @@ -1,95 +0,0 @@ -/* - * 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.table.sources - -import java.util -import java.util.Objects -import javax.annotation.Nullable - -import org.apache.flink.table.api.TableSchema -import org.apache.flink.table.api.Types -import org.apache.flink.table.sources.tsextractors.TimestampExtractor -import org.apache.flink.table.sources.wmstrategies.WatermarkStrategy - -/** - * Extends a [[TableSource]] to specify a processing time attribute. - */ -trait DefinedProctimeAttribute { - - /** - * Returns the name of a processing time attribute or null if no processing time attribute is - * present. - * - * The referenced attribute must be present in the [[TableSchema]] of the [[TableSource]] and of - * type [[Types.SQL_TIMESTAMP]]. - */ - @Nullable - def getProctimeAttribute: String -} - -/** - * Extends a [[TableSource]] to specify rowtime attributes via a - * [[RowtimeAttributeDescriptor]]. - */ -trait DefinedRowtimeAttributes { - - /** - * Returns a list of [[RowtimeAttributeDescriptor]] for all rowtime attributes of the table. - * - * All referenced attributes must be present in the [[TableSchema]] of the [[TableSource]] and of - * type [[Types.SQL_TIMESTAMP]]. - * - * @return A list of [[RowtimeAttributeDescriptor]]. - */ - def getRowtimeAttributeDescriptors: util.List[RowtimeAttributeDescriptor] -} - -/** - * Describes a rowtime attribute of a [[TableSource]]. - * - * @param attributeName The name of the rowtime attribute. - * @param timestampExtractor The timestamp extractor to derive the values of the attribute. - * @param watermarkStrategy The watermark strategy associated with the attribute. - */ -class RowtimeAttributeDescriptor( - val attributeName: String, - val timestampExtractor: TimestampExtractor, - val watermarkStrategy: WatermarkStrategy) { - - /** Returns the name of the rowtime attribute. */ - def getAttributeName: String = attributeName - - /** Returns the [[TimestampExtractor]] for the attribute. */ - def getTimestampExtractor: TimestampExtractor = timestampExtractor - - /** Returns the [[WatermarkStrategy]] for the attribute. */ - def getWatermarkStrategy: WatermarkStrategy = watermarkStrategy - - override def equals(other: Any): Boolean = other match { - case that: RowtimeAttributeDescriptor => - Objects.equals(attributeName, that.attributeName) && - Objects.equals(timestampExtractor, that.timestampExtractor) && - Objects.equals(watermarkStrategy, that.watermarkStrategy) - case _ => false - } - - override def hashCode(): Int = { - Objects.hash(attributeName, timestampExtractor, watermarkStrategy) - } -}
