use of com.facebook.presto.orc.metadata.DwrfMetadataReader in project presto by prestodb.
the class OrcTester method assertRoundTrip.
public void assertRoundTrip(ObjectInspector objectInspector, Iterable<?> readValues, Type type) throws Exception {
for (Format formatVersion : formats) {
MetadataReader metadataReader;
if (DWRF == formatVersion) {
if (hasType(objectInspector, PrimitiveCategory.DATE)) {
// DWRF doesn't support dates
return;
}
if (hasType(objectInspector, PrimitiveCategory.DECIMAL)) {
// DWRF doesn't support decimals
return;
}
if (hasType(objectInspector, PrimitiveCategory.CHAR)) {
// DWRF doesn't support chars
return;
}
metadataReader = new DwrfMetadataReader();
} else {
metadataReader = new OrcMetadataReader();
}
for (Compression compression : compressions) {
try (TempFile tempFile = new TempFile()) {
writeOrcColumn(tempFile.getFile(), formatVersion, compression, objectInspector, readValues.iterator());
assertFileContents(objectInspector, tempFile, readValues, false, false, metadataReader, type);
if (skipBatchTestsEnabled) {
assertFileContents(objectInspector, tempFile, readValues, true, false, metadataReader, type);
}
if (skipStripeTestsEnabled) {
assertFileContents(objectInspector, tempFile, readValues, false, true, metadataReader, type);
}
}
}
}
}
use of com.facebook.presto.orc.metadata.DwrfMetadataReader in project presto by prestodb.
the class TestStorageOrcFileTailSource method setUp.
@BeforeMethod
public void setUp() throws Exception {
this.file = new TempFile();
this.metadataReader = new DwrfMetadataReader(new RuntimeStats());
}
Aggregations