deniskuzZ commented on code in PR #5613:
URL: https://github.com/apache/hive/pull/5613#discussion_r1937601335


##########
ql/src/java/org/apache/hadoop/hive/ql/queryhistory/repository/QueryHistoryRepository.java:
##########
@@ -0,0 +1,42 @@
+/*
+ * 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
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * 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.hadoop.hive.ql.queryhistory.repository;
+
+import java.util.Queue;
+
+import org.apache.hadoop.hive.conf.HiveConf;
+import org.apache.hadoop.hive.ql.queryhistory.schema.QueryHistoryRecord;
+import org.apache.hadoop.hive.ql.queryhistory.schema.QueryHistorySchema;
+
+public interface QueryHistoryRepository {
+  String QUERY_HISTORY_DB_NAME = "sys";
+  String QUERY_HISTORY_TABLE_NAME = "query_history";
+  String QUERY_HISTORY_DB_TABLE_NAME =
+      String.format("%s.%s", QUERY_HISTORY_DB_NAME, QUERY_HISTORY_TABLE_NAME);
+
+  String QUERY_HISTORY_DB_COMMENT = "Hive SYS database";
+
+  // an artificial hive query id for an artificial session for creating the 
iceberg query history table
+  // this is needed because the partition_transform_spec is handed over 
through SessionState resource which
+  // needs a QueryState instance (acquired by a query id)
+  String QUERY_ID_FOR_TABLE_CREATION = 
"query_history_service_query_id_for_table_creation";
+
+  void init(HiveConf conf, QueryHistorySchema schema);
+
+  void persist(Queue<QueryHistoryRecord> records);

Review Comment:
   what about time?



-- 
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.

To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org
For additional commands, e-mail: gitbox-h...@hive.apache.org

Reply via email to