use of org.apache.drill.exec.store.parquet.metadata.MetadataVersion in project drill by apache.
the class TestParquetMetadataVersion method testMinorVersion.
@Test
public void testMinorVersion() throws Exception {
MetadataVersion withMinorVersion = new MetadataVersion("3.1");
MetadataVersion expectedVersionWithMinorVersion = new MetadataVersion(3, 1);
assertEquals("Parquet metadata version is parsed incorrectly", expectedVersionWithMinorVersion, withMinorVersion);
}
use of org.apache.drill.exec.store.parquet.metadata.MetadataVersion in project drill by apache.
the class TestParquetMetadataVersion method testTwoDigitsMinorVersion.
@Test
public void testTwoDigitsMinorVersion() throws Exception {
MetadataVersion twoDigitsMinorVersion = new MetadataVersion("3.13");
MetadataVersion expectedVersionWithTwoDigitsMinorVersion = new MetadataVersion(3, 13);
assertEquals("Parquet metadata version is parsed incorrectly", expectedVersionWithTwoDigitsMinorVersion, twoDigitsMinorVersion);
}
use of org.apache.drill.exec.store.parquet.metadata.MetadataVersion in project drill by apache.
the class TestParquetMetadataVersion method testAfter.
@Test
public void testAfter() {
MetadataVersion version = new MetadataVersion(4, 1);
assertFalse(version.isHigherThan(4, 1));
assertFalse(version.isHigherThan(4, 3));
assertFalse(version.isHigherThan(5, 0));
assertTrue(version.isHigherThan(4, 0));
assertTrue(version.isHigherThan(3, 0));
assertTrue(version.isHigherThan(2, 1));
assertTrue(version.isHigherThan(1, 3));
assertTrue(version.isHigherThan(1, 0));
}
use of org.apache.drill.exec.store.parquet.metadata.MetadataVersion in project drill by apache.
the class TestParquetMetadataVersion method testTwoDigitsMajorVersion.
@Test
public void testTwoDigitsMajorVersion() throws Exception {
MetadataVersion twoDigitsMetadataVersion = new MetadataVersion("10.2");
MetadataVersion expectedVersion = new MetadataVersion(10, 2);
assertEquals("Parquet metadata version is parsed incorrectly", expectedVersion, twoDigitsMetadataVersion);
}
use of org.apache.drill.exec.store.parquet.metadata.MetadataVersion in project drill by apache.
the class TestParquetMetadataVersion method testAtLeast.
@Test
public void testAtLeast() {
MetadataVersion version = new MetadataVersion("v4.2");
assertTrue(version.isAtLeast(4, 0));
assertTrue(version.isAtLeast(4, 1));
assertTrue(version.isAtLeast(4, 2));
assertFalse(version.isAtLeast(4, 3));
assertFalse(version.isAtLeast(5, 1));
assertTrue(version.isAtLeast(3, 0));
assertTrue(version.isAtLeast(1, 0));
}
Aggregations