This is an automated email from the ASF dual-hosted git repository. volodymyr pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/drill.git
The following commit(s) were added to refs/heads/master by this push: new f558815feb DRILL-8442: Fix DeltaRowGroupScan deserialization f558815feb is described below commit f558815feb6560ebbc3d1fcf502acee8fea1e555 Author: Volodymyr Vysotskyi <vvo...@gmail.com> AuthorDate: Wed Jun 21 20:24:31 2023 +0300 DRILL-8442: Fix DeltaRowGroupScan deserialization --- .../java/org/apache/drill/exec/store/delta/DeltaRowGroupScan.java | 7 ++++++- .../java/org/apache/drill/exec/store/delta/DeltaQueriesTest.java | 4 +++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/contrib/format-deltalake/src/main/java/org/apache/drill/exec/store/delta/DeltaRowGroupScan.java b/contrib/format-deltalake/src/main/java/org/apache/drill/exec/store/delta/DeltaRowGroupScan.java index 5645c3f559..df675dfa32 100644 --- a/contrib/format-deltalake/src/main/java/org/apache/drill/exec/store/delta/DeltaRowGroupScan.java +++ b/contrib/format-deltalake/src/main/java/org/apache/drill/exec/store/delta/DeltaRowGroupScan.java @@ -53,7 +53,7 @@ public class DeltaRowGroupScan extends AbstractParquetRowGroupScan { @JsonCreator public DeltaRowGroupScan(@JacksonInject StoragePluginRegistry registry, @JsonProperty("userName") String userName, - @JsonProperty("storage") StoragePluginConfig storageConfig, + @JsonProperty("storageConfig") StoragePluginConfig storageConfig, @JsonProperty("formatPluginConfig") FormatPluginConfig formatPluginConfig, @JsonProperty("rowGroupReadEntries") List<RowGroupReadEntry> rowGroupReadEntries, @JsonProperty("columns") List<SchemaPath> columns, @@ -85,6 +85,11 @@ public class DeltaRowGroupScan extends AbstractParquetRowGroupScan { this.partitions = partitions; } + @JsonProperty + public StoragePluginConfig getStorageConfig() { + return formatPlugin.getStorageConfig(); + } + @JsonProperty public DeltaFormatPluginConfig getFormatPluginConfig() { return formatPluginConfig; diff --git a/contrib/format-deltalake/src/test/java/org/apache/drill/exec/store/delta/DeltaQueriesTest.java b/contrib/format-deltalake/src/test/java/org/apache/drill/exec/store/delta/DeltaQueriesTest.java index fb98fec5e2..326d918dae 100644 --- a/contrib/format-deltalake/src/test/java/org/apache/drill/exec/store/delta/DeltaQueriesTest.java +++ b/contrib/format-deltalake/src/test/java/org/apache/drill/exec/store/delta/DeltaQueriesTest.java @@ -19,6 +19,7 @@ package org.apache.drill.exec.store.delta; import org.apache.drill.common.logical.FormatPluginConfig; import org.apache.drill.common.logical.security.PlainCredentialsProvider; +import org.apache.drill.exec.ExecConstants; import org.apache.drill.exec.store.StoragePluginRegistry; import org.apache.drill.exec.store.delta.format.DeltaFormatPluginConfig; import org.apache.drill.exec.store.dfs.FileSystemConfig; @@ -61,7 +62,8 @@ public class DeltaQueriesTest extends ClusterTest { @Test public void testSerDe() throws Exception { - String plan = queryBuilder().sql("select * from dfs.`data-reader-partition-values`").explainJson(); + client.alterSession(ExecConstants.SLICE_TARGET, 1); + String plan = queryBuilder().sql("select * from table(dfs.`data-reader-partition-values` (type => 'delta'))").explainJson(); long count = queryBuilder().physical(plan).run().recordCount(); assertEquals(3, count); }