You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2018/10/24 09:43:59 UTC

[GitHub] bowenli86 commented on a change in pull request #6906: [Flink-6036][table]Let catalog support partition.

bowenli86 commented on a change in pull request #6906: [Flink-6036][table]Let catalog support partition.
URL: https://github.com/apache/flink/pull/6906#discussion_r227716943
 
 

 ##########
 File path: flink-libraries/flink-table/src/main/scala/org/apache/flink/table/catalog/ExternalCatalogPartition.scala
 ##########
 @@ -0,0 +1,144 @@
+/*
+ * 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.catalog
+
+import org.apache.flink.table.descriptors.DescriptorProperties._
+import org.apache.flink.table.descriptors.StatisticsValidator._
+import org.apache.flink.table.descriptors._
+import org.apache.flink.table.plan.stats.PartitionStats
+
+import scala.collection.JavaConverters._
+
+/**
+  * Partition definition of an external Catalog table
+  *
+  * @param partitionSpec partition specification
+  * @param properties    partition properties
+  */
+class ExternalCatalogPartition(
+    val partitionSpec: java.util.LinkedHashMap[String, String],
+    private val properties: java.util.Map[String, String])
+  extends Descriptor {
+
+  // ----------------------------------------------------------------------------------------------
+  // Legacy code
+  // ---------------------------------------------------------------------------------------------
+
+  /**
+    * Reads table statistics from the descriptors properties.
+    *
+    * @deprecated This method exists for backwards-compatibility only.
 
 Review comment:
   @twalthr @beyond1920 I was looking at flink-table code and curious about a few points:
   
   1. which method should be used to replace this deprecated `getStats()`?
   2. why do we need two deprecation annotation here for both java and scala? (`@Deprecated` and `@deprecated`)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services