<commit_before>/**
 * Copyright 2012 Twitter, Inc.
 *
 * 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 parquet.hadoop;

import java.io.File;
import java.io.IOException;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.Path;
import org.junit.Test;

import parquet.Log;
import parquet.column.mem.PageReadStore;
import parquet.data.Group;
import parquet.data.GroupRecordConsumer;
import parquet.data.simple.SimpleGroupFactory;
import parquet.hadoop.metadata.ParquetMetadata;
import parquet.io.ColumnIOFactory;
import parquet.io.MessageColumnIO;
import parquet.io.RecordReader;
import parquet.schema.MessageType;

public class TestReadIntTestFile {
  private static final Log LOG = Log.getLog(TestReadIntTestFile.class);

  @Test
  public void readTest() throws IOException {
    Path testFile = new Path(new File("/Users/julien/github/Parquet/parquet-format/testdata/tpch/customer").toURI());
    Configuration configuration = new Configuration(true);
    ParquetMetadata readFooter = ParquetFileReader.readFooter(configuration, testFile);
    MessageType schema = readFooter.getFileMetaData().getSchema();
    ParquetFileReader parquetFileReader = new ParquetFileReader(configuration, testFile, readFooter.getBlocks(), schema.getColumns());
    PageReadStore pages = parquetFileReader.readColumns();
    final long rows = pages.getRowCount();
    LOG.info("rows: "+rows);
    final MessageColumnIO columnIO = new ColumnIOFactory().getColumnIO(schema);
    final RecordReader<Group> recordReader = columnIO.getRecordReader(pages, new GroupRecordConsumer(new SimpleGroupFactory(schema)));
    for (int i = 0; i < rows; i++) {
      final Group g = recordReader.read();
      LOG.info(i + ": " + g);
    }
  }
}
<commit_msg>turn off customer test<commit_after>/**
 * Copyright 2012 Twitter, Inc.
 *
 * 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 parquet.hadoop;

import java.io.File;
import java.io.IOException;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.Path;
import org.junit.Test;

import parquet.Log;
import parquet.column.mem.PageReadStore;
import parquet.data.Group;
import parquet.data.GroupRecordConsumer;
import parquet.data.simple.SimpleGroupFactory;
import parquet.hadoop.metadata.ParquetMetadata;
import parquet.io.ColumnIOFactory;
import parquet.io.MessageColumnIO;
import parquet.io.RecordReader;
import parquet.schema.MessageType;

public class TestReadIntTestFile {
  private static final Log LOG = Log.getLog(TestReadIntTestFile.class);

//  @Test
  public void readTest() throws IOException {
    Path testFile = new Path(new File("testdata/tpch/customer").toURI());
    Configuration configuration = new Configuration(true);
    ParquetMetadata readFooter = ParquetFileReader.readFooter(configuration, testFile);
    MessageType schema = readFooter.getFileMetaData().getSchema();
    ParquetFileReader parquetFileReader = new ParquetFileReader(configuration, testFile, readFooter.getBlocks(), schema.getColumns());
    PageReadStore pages = parquetFileReader.readColumns();
    final long rows = pages.getRowCount();
    LOG.info("rows: "+rows);
    final MessageColumnIO columnIO = new ColumnIOFactory().getColumnIO(schema);
    final RecordReader<Group> recordReader = columnIO.getRecordReader(pages, new GroupRecordConsumer(new SimpleGroupFactory(schema)));
    for (int i = 0; i < rows; i++) {
      final Group g = recordReader.read();
      LOG.info(i + ": " + g);
    }
  }
}

{'fraction_non_alphanumeric': 0.09926388579076512, 'fraction_numerical': 0.004015168414008476, 'mean_word_length': 4.800776196636481, 'pattern_counts': {'":': 2, '<': 7, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6743535', 'n_tokens_mistral': 1247, 'n_tokens_neox': 1235, 'n_words': 377}