You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "SteNicholas (via GitHub)" <gi...@apache.org> on 2024/02/01 06:35:37 UTC

Re: [PR] [Feature] Introduce Flink SQL gateway baseline implementation of job submission [incubator-paimon-webui]

SteNicholas commented on code in PR #153:
URL: https://github.com/apache/incubator-paimon-webui/pull/153#discussion_r1473856316


##########
paimon-web-engine/paimon-web-engine-flink/paimon-web-engine-flink-sql-gateway/src/main/java/org/apache/paimon/web/engine/flink/sql/gateway/model/SessionEntity.java:
##########
@@ -0,0 +1,119 @@
+/*
+ * 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.paimon.web.engine.flink.sql.gateway.model;
+
+import java.util.Map;
+
+/** The session entity. */
+public class SessionEntity {
+
+    private final String sessionId;
+    private final String sessionName;
+    private final String host;
+    private final int port;
+    private final Map<String, String> properties;
+    private final int status;
+
+    private SessionEntity(
+            String sessionId,
+            String sessionName,
+            String host,
+            int port,
+            Map<String, String> properties,
+            int status) {
+        this.sessionId = sessionId;
+        this.sessionName = sessionName;
+        this.host = host;
+        this.port = port;
+        this.properties = properties;
+        this.status = status;
+    }
+
+    public String getSessionId() {
+        return sessionId;
+    }
+
+    public String getSessionName() {
+        return sessionName;
+    }
+
+    public String getHost() {
+        return host;
+    }
+
+    public Integer getPort() {
+        return port;
+    }
+
+    public Map<String, String> getProperties() {
+        return properties;
+    }
+
+    public Integer getStatus() {
+        return status;
+    }
+
+    public static Builder builder() {
+        return new Builder();
+    }
+
+    /** The builder for {@link SessionEntity}. */
+    public static class Builder {

Review Comment:
   Use `@Builder`?



##########
paimon-web-engine/paimon-web-engine-flink/paimon-web-engine-flink-sql-gateway/src/main/java/org/apache/paimon/web/engine/flink/sql/gateway/utils/CollectResultUtil.java:
##########
@@ -0,0 +1,66 @@
+/*
+ * 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.paimon.web.engine.flink.sql.gateway.utils;
+
+import org.apache.paimon.web.engine.flink.common.result.ExecutionResult;
+
+import org.apache.flink.table.data.GenericRowData;
+import org.apache.flink.table.data.RowData;
+import org.apache.flink.table.gateway.rest.serde.ResultInfo;
+
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+/** Collect result util. */
+public class CollectResultUtil {
+
+    private static final String NULL_COLUMN = "";

Review Comment:
   Why null column is empty string?



-- 
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: issues-unsubscribe@paimon.apache.org

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