bowenli86 commented on a change in pull request #8522: [FLINK-12572][hive]Implement TableSource and InputFormat to read Hive tables URL: https://github.com/apache/flink/pull/8522#discussion_r287213289
########## File path: flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/batch/connectors/hive/HiveTablePartition.java ########## @@ -0,0 +1,60 @@ +/* + * 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.batch.connectors.hive; + +import org.apache.hadoop.hive.metastore.api.StorageDescriptor; + +import java.io.Serializable; +import java.util.Map; + +/** + * A class that describes a partition of a Hive table. + * Please note that the class is serializable because all its member variables are serializable. + */ +public class HiveTablePartition implements Serializable { + private static final long serialVersionUID = 4145470177119940673L; + + /** Partition storage descriptor. */ + private StorageDescriptor storageDescriptor; + + /** The map of partition key names and their values. */ + private Map<String, Object> partitionValues; + + public HiveTablePartition(StorageDescriptor storageDescriptor, Map<String, Object> partitionValues) { + this.storageDescriptor = storageDescriptor; + this.partitionValues = partitionValues; + } + + public StorageDescriptor getStorageDescriptor() { + return storageDescriptor; + } + + public Map<String, Object> getPartitionValues() { + return partitionValues; + } + + public Object getFieldValue(String fieldName) { Review comment: remove this. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
