wangbo commented on a change in pull request #3063: (#3061) [Spark Load] Doris 
Support Using Hive Table to Build Global Dict

 File path: fe/src/main/java/org/apache/doris/load/loadv2/
 @@ -0,0 +1,272 @@
+// 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
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+package org.apache.doris.load.loadv2;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.spark.sql.AnalysisException;
+import org.apache.spark.sql.Row;
+import org.apache.spark.sql.SparkSession;
+import org.apache.spark.sql.catalog.Column;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+ *  used for build hive global dict and encode source hive table
+ *
+ *  input: a source hive table
+ *  output: a intermediate hive table whose distinct column is encode with int 
+ *
+ *  usage example
+ *  step1,create a intermediate hive table
+ *      BuildGlobalDict.createHiveIntermediateTable()
+ *  step2, get distinct column's value
+ *      BuildGlobalDict.extractDistinctColumn()
+ *  step3, build global dict
+ *      BuildGlobalDict.buildGlobalDict()
+ *  step4, encode intermediate hive table with global dict
+ *      BuildGlobalDict.encodeDorisIntermediateHiveTable()
+ */
+public class BuildGlobalDict {
 Review comment:
   sounds great

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:

With regards,
Apache Git Services

To unsubscribe, e-mail:
For additional commands, e-mail:

Reply via email to