This is an automated email from the ASF dual-hosted git repository. xiangfu0 pushed a commit to branch codex/test-audit-empty-blocks-test in repository https://gitbox.apache.org/repos/asf/pinot.git
commit 9cdf1e03e1ad629c6b18d317bda69ab141e3352c Author: Xiang Fu <[email protected]> AuthorDate: Sun Oct 18 23:16:05 2026 -0700 Remove empty BlocksTest scaffolding --- .../segment/local/segment/creator/BlocksTest.java | 75 ---------------------- 1 file changed, 75 deletions(-) diff --git a/pinot-segment-local/src/test/java/org/apache/pinot/segment/local/segment/creator/BlocksTest.java b/pinot-segment-local/src/test/java/org/apache/pinot/segment/local/segment/creator/BlocksTest.java deleted file mode 100644 index 0697c656e0d..00000000000 --- a/pinot-segment-local/src/test/java/org/apache/pinot/segment/local/segment/creator/BlocksTest.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * 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.pinot.segment.local.segment.creator; - -import java.io.File; -import java.util.concurrent.TimeUnit; -import org.apache.avro.Schema.Field; -import org.apache.avro.file.DataFileStream; -import org.apache.avro.generic.GenericRecord; -import org.apache.commons.io.FileUtils; -import org.apache.pinot.plugin.inputformat.avro.AvroUtils; -import org.apache.pinot.segment.local.segment.creator.impl.SegmentIndexCreationDriverImpl; -import org.apache.pinot.segment.spi.creator.SegmentGeneratorConfig; -import org.apache.pinot.segment.spi.creator.SegmentIndexCreationDriver; -import org.apache.pinot.util.TestUtils; -import org.testng.annotations.AfterClass; -import org.testng.annotations.BeforeClass; - - -public class BlocksTest { - private BlocksTest() { - } - - private static final String AVRO_DATA = "data/test_data-mv.avro"; - private static final File INDEX_DIR = - new File(FileUtils.getTempDirectory() + File.separator + IntArraysTest.class.getName()); - - @AfterClass - public static void cleanup() { - FileUtils.deleteQuietly(INDEX_DIR); - } - - @BeforeClass - public static void before() - throws Exception { - final String filePath = TestUtils.getFileFromResourceUrl(BlocksTest.class.getClassLoader().getResource(AVRO_DATA)); - if (INDEX_DIR.exists()) { - FileUtils.deleteQuietly(INDEX_DIR); - } - - final SegmentIndexCreationDriver driver = new SegmentIndexCreationDriverImpl(); - - final SegmentGeneratorConfig config = SegmentTestUtils - .getSegmentGenSpecWithSchemAndProjectedColumns(new File(filePath), INDEX_DIR, "daysSinceEpoch", TimeUnit.DAYS, - "test"); - config.setTimeColumnName("daysSinceEpoch"); - driver.init(config); - driver.build(); - - final DataFileStream<GenericRecord> avroReader = AvroUtils.getAvroReader(new File(filePath)); - final org.apache.avro.Schema avroSchema = avroReader.getSchema(); - final String[] columns = new String[avroSchema.getFields().size()]; - int i = 0; - for (final Field f : avroSchema.getFields()) { - columns[i] = f.name(); - i++; - } - } -} --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
