[ 
https://issues.apache.org/jira/browse/DRILL-8542?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18055190#comment-18055190
 ] 

ASF GitHub Bot commented on DRILL-8542:
---------------------------------------

cgivre commented on code in PR #3035:
URL: https://github.com/apache/drill/pull/3035#discussion_r2741952756


##########
contrib/format-paimon/src/main/java/org/apache/drill/exec/store/paimon/format/PaimonMetadataType.java:
##########
@@ -0,0 +1,50 @@
+/*
+ * 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.drill.exec.store.paimon.format;
+
+import java.util.Locale;
+
+public enum PaimonMetadataType {
+  SNAPSHOTS("snapshots"),
+  SCHEMAS("schemas"),
+  FILES("files"),
+  MANIFESTS("manifests");
+
+  private final String name;
+
+  PaimonMetadataType(String name) {
+    this.name = name;
+  }
+
+  public String getName() {
+    return name;
+  }
+
+  public static PaimonMetadataType from(String value) {
+    if (value == null) {
+      return null;
+    }
+    String normalized = value.toLowerCase(Locale.ROOT);
+    for (PaimonMetadataType type : values()) {
+      if (type.name.equals(normalized)) {
+        return type;
+      }
+    }
+    return null;
+  }
+}

Review Comment:
   I was referring to the end of each file.  After the last closing brace, 
there should be a newline.





> Format plugin for Apache Paimon
> -------------------------------
>
>                 Key: DRILL-8542
>                 URL: https://issues.apache.org/jira/browse/DRILL-8542
>             Project: Apache Drill
>          Issue Type: Improvement
>          Components: Storage - Other
>            Reporter: Letian Jiang
>            Priority: Major
>
> Introduce a Paimon format plugin, enabling Drill users to query Paimon tables 
> directly via filesystem paths.
>  * support reading data from Paimon tables in Parquet and ORC formats
>  * support projection/filter/limit pushdown 
>  * support snapshot read via table() with snapshotId or snapshotAsOfTime
>  * support metadata tables:  #snapshots, #schemas, #files, #manifests
> Usage examples:
>  * SELECT * FROM dfs.`/path/to/paimon_table`
>  * SELECT * FROM table(dfs.`/path/to/paimon_table`, snapshotId => 123)
>  * SELECT * FROM table(dfs.`/path/to/paimon_table`, snapshotAsOfTime => 
> 1700000000000)
>  * SELECT * FROM dfs.`/path/to/paimon_table#snapshots`
> Reference:
> * https://paimon.apache.org/docs
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to