diff --git a/plugin/trino-spooling-filesystem/src/main/java/io/trino/spooling/filesystem/PartitionedFileSystemLayout.java b/plugin/trino-spooling-filesystem/src/main/java/io/trino/spooling/filesystem/PartitionedFileSystemLayout.java index c2bcef59c015..4a28436bcec3 100644 --- a/plugin/trino-spooling-filesystem/src/main/java/io/trino/spooling/filesystem/PartitionedFileSystemLayout.java +++ b/plugin/trino-spooling-filesystem/src/main/java/io/trino/spooling/filesystem/PartitionedFileSystemLayout.java @@ -17,6 +17,7 @@ import com.google.common.collect.ImmutableList; import com.google.common.hash.HashCode; import com.google.common.hash.Hashing; +import com.google.inject.Inject; import io.trino.filesystem.Location; import java.util.List; @@ -28,6 +29,7 @@ public class PartitionedFileSystemLayout { private final int partitions; + @Inject public PartitionedFileSystemLayout(PartitionedLayoutConfig layoutConfig) { this.partitions = requireNonNull(layoutConfig, "layoutConfig is null").getPartitions(); diff --git a/testing/trino-tests/src/test/java/io/trino/server/protocol/TestJsonSpooledPartitionedLayoutQueries.java b/testing/trino-tests/src/test/java/io/trino/server/protocol/TestJsonSpooledPartitionedLayoutQueries.java new file mode 100644 index 000000000000..bf629fdcee69 --- /dev/null +++ b/testing/trino-tests/src/test/java/io/trino/server/protocol/TestJsonSpooledPartitionedLayoutQueries.java @@ -0,0 +1,40 @@ +/* + * Licensed 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 io.trino.server.protocol; + +import com.google.common.collect.ImmutableMap; + +import java.util.Map; + +public class TestJsonSpooledPartitionedLayoutQueries + extends AbstractSpooledQueryDataDistributedQueries +{ + @Override + protected String encoding() + { + return "json"; + } + + @Override + protected Map spoolingFileSystemConfig() + { + return ImmutableMap.of("fs.layout", "partitioned"); + } + + @Override + protected Map spoolingConfig() + { + return ImmutableMap.of("protocol.spooling.inlining.enabled", "false"); + } +}