[
https://issues.apache.org/jira/browse/DRILL-8542?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18054874#comment-18054874
]
ASF GitHub Bot commented on DRILL-8542:
---------------------------------------
letian-jiang commented on code in PR #3035:
URL: https://github.com/apache/drill/pull/3035#discussion_r2737109640
##########
contrib/format-paimon/src/main/java/org/apache/drill/exec/store/paimon/format/PaimonFormatPlugin.java:
##########
@@ -0,0 +1,221 @@
+/*
+ * 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 org.apache.calcite.plan.Convention;
+import org.apache.calcite.plan.RelOptRule;
+import org.apache.drill.common.expression.SchemaPath;
+import org.apache.drill.exec.metastore.MetadataProviderManager;
+import org.apache.drill.exec.physical.base.AbstractGroupScan;
+import org.apache.drill.exec.physical.base.AbstractWriter;
+import org.apache.drill.exec.physical.base.PhysicalOperator;
+import org.apache.drill.exec.planner.PlannerPhase;
+import org.apache.drill.exec.planner.common.DrillStatsTable;
+import org.apache.drill.exec.record.metadata.TupleMetadata;
+import org.apache.drill.exec.record.metadata.schema.SchemaProvider;
+import org.apache.drill.exec.server.DrillbitContext;
+import org.apache.drill.exec.store.PluginRulesProviderImpl;
+import org.apache.drill.exec.store.StoragePluginRulesSupplier;
+import org.apache.drill.exec.store.dfs.FileSelection;
+import org.apache.drill.exec.store.dfs.FileSystemConfig;
+import org.apache.drill.exec.store.dfs.FormatMatcher;
+import org.apache.drill.exec.store.dfs.FormatPlugin;
+import org.apache.drill.exec.store.paimon.PaimonGroupScan;
+import org.apache.drill.exec.store.paimon.plan.PaimonPluginImplementor;
+import org.apache.drill.exec.store.plan.rel.PluginRel;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.FileSystem;
+import org.apache.hadoop.fs.Path;
+
+import java.io.IOException;
+import java.util.Collections;
+import java.util.List;
+import java.util.Set;
+import java.util.concurrent.atomic.AtomicInteger;
+
+public class PaimonFormatPlugin implements FormatPlugin {
Review Comment:
It appears that `EasyFormatPlugin` is intended for file reader scenarios.
Paimon, as a table format, is made up of various data, metadata and index files
— similar to Iceberg and Delta Lake, which both directly implement the
`FormatPlugin` interface.
> 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)