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 2019/12/26 02:57:04 UTC

[GitHub] [flink] JingsongLi commented on a change in pull request #10690: [FLINK-15391][hive] DATE and TIMESTAMP partition columns don't work

JingsongLi commented on a change in pull request #10690: [FLINK-15391][hive] DATE and TIMESTAMP partition columns don't work
URL: https://github.com/apache/flink/pull/10690#discussion_r361356188
 
 

 ##########
 File path: flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/connectors/hive/HivePartitionComputer.java
 ##########
 @@ -0,0 +1,80 @@
+/*
+ * 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.connectors.hive;
+
+import org.apache.flink.table.catalog.hive.client.HiveShim;
+import org.apache.flink.table.filesystem.RowPartitionComputer;
+import org.apache.flink.table.functions.hive.conversion.HiveInspectors;
+import org.apache.flink.table.functions.hive.conversion.HiveObjectConversion;
+import org.apache.flink.table.types.DataType;
+import org.apache.flink.types.Row;
+
+import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector;
+
+import java.util.LinkedHashMap;
+
+/**
+ * A RowPartitionComputer that converts Flink objects to Hive objects before computing the partition value strings.
+ */
+public class HivePartitionComputer extends RowPartitionComputer {
+
+	private static final long serialVersionUID = 1L;
+
+	private final HiveShim hiveShim;
+	private final DataType[] columnTypes;
+	private HiveObjectConversion[] partColConversions;
 
 Review comment:
   Can we make `HiveObjectConversion` serializable?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services