Search in sources :

Example 6 with OrcEncoding

use of com.facebook.presto.orc.OrcEncoding in project presto by prestodb.

the class TestSliceDictionaryColumnWriter method testSortedDictionaryKeys.

@Test
public void testSortedDictionaryKeys() throws IOException {
    for (OrcEncoding orcEncoding : OrcEncoding.values()) {
        List<String> sortedKeys = getDictionaryKeys(ImmutableList.of("b", "a", "c"), orcEncoding, true);
        assertEquals(sortedKeys, ImmutableList.of("a", "b", "c"));
        sortedKeys = getDictionaryKeys(ImmutableList.of("b", "b", "a"), orcEncoding, true);
        assertEquals(sortedKeys, ImmutableList.of("a", "b"));
    }
}
Also used : OrcEncoding(com.facebook.presto.orc.OrcEncoding) Test(org.testng.annotations.Test)

Aggregations

OrcEncoding (com.facebook.presto.orc.OrcEncoding)6 Type (com.facebook.presto.common.type.Type)4 TypeManager (com.facebook.presto.common.type.TypeManager)3 DwrfEncryptionProvider (com.facebook.presto.orc.DwrfEncryptionProvider)3 OrcDataSource (com.facebook.presto.orc.OrcDataSource)3 OrcDataSourceId (com.facebook.presto.orc.OrcDataSourceId)3 ORC (com.facebook.presto.orc.OrcEncoding.ORC)3 ConnectorSession (com.facebook.presto.spi.ConnectorSession)3 PrestoException (com.facebook.presto.spi.PrestoException)3 ImmutableMap (com.google.common.collect.ImmutableMap)3 IOException (java.io.IOException)3 List (java.util.List)3 Map (java.util.Map)3 Objects.requireNonNull (java.util.Objects.requireNonNull)3 Optional (java.util.Optional)3 Inject (javax.inject.Inject)3 Path (org.apache.hadoop.fs.Path)3 TupleDomain (com.facebook.presto.common.predicate.TupleDomain)2 EncryptionInformation (com.facebook.presto.hive.EncryptionInformation)2 FileFormatDataSourceStats (com.facebook.presto.hive.FileFormatDataSourceStats)2