bowenli86 commented on a change in pull request #9988: [FLINK-14418][hive] 
Create HiveModule to provide Hive built-in functions
URL: https://github.com/apache/flink/pull/9988#discussion_r340847504
 
 

 ##########
 File path: 
flink-connectors/flink-connector-hive/src/test/java/org/apache/flink/table/module/hive/HiveModuleITCase.java
 ##########
 @@ -0,0 +1,150 @@
+/*
+ * 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.module.hive;
+
+import org.apache.flink.table.api.DataTypes;
+import org.apache.flink.table.api.EnvironmentSettings;
+import org.apache.flink.table.api.TableEnvironment;
+import org.apache.flink.table.api.TableSchema;
+import org.apache.flink.table.api.Types;
+import org.apache.flink.table.catalog.Catalog;
+import org.apache.flink.table.catalog.CatalogTable;
+import org.apache.flink.table.catalog.CatalogTableBuilder;
+import org.apache.flink.table.catalog.ObjectPath;
+import org.apache.flink.table.descriptors.FileSystem;
+import org.apache.flink.table.descriptors.FormatDescriptor;
+import org.apache.flink.table.descriptors.OldCsv;
+import org.apache.flink.table.planner.runtime.utils.BatchTestBase;
+import org.apache.flink.test.util.AbstractTestBase;
+import org.apache.flink.util.FileUtils;
+
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.TemporaryFolder;
+
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.Arrays;
+import java.util.List;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+import static java.lang.String.format;
+
+/**
+ * IT case for {@link HiveModule}.
+ */
+public class HiveModuleITCase extends AbstractTestBase {
+
+       @Rule
+       public TemporaryFolder tempFolder = new TemporaryFolder();
+
+       private String sourceTableName = "csv_source";
+       private String sinkTableName = "csv_sink";
+       private final String testFunctionName = "reverse";
+
+       @Test
+       public void testHiveBuiltinFunction() throws Exception {
 
 Review comment:
   > While it's a little unwieldy, I think it's an important test to verify 
that Hive module can be actually loaded and Hive built-in function can be 
called.
   
   I switched it to a lightweight test
   
   > One thing though, we probably don't want a hardcoded Hive version. Rather, 
we should use the version in the build.
   
   Agree. Changed to use HiveShimLoader.getHiveVersion()
   
   

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


With regards,
Apache Git Services

Reply via email to