use of org.apache.phoenix.schema.types.PDataType in project phoenix by apache.
the class PCharPadTest method testCharPaddingDesc3.
@Test
public void testCharPaddingDesc3() throws SQLException {
PDataType dataType = PChar.INSTANCE;
String str = "phoenix";
byte[] result = new byte[] { -113, -105, -112, -102, -111, -106, -121 };
test(str, dataType, 7, SortOrder.DESC, result);
}
use of org.apache.phoenix.schema.types.PDataType in project phoenix by apache.
the class PCharPadTest method testCharPaddingDesc4.
@Test
public void testCharPaddingDesc4() throws SQLException {
PDataType dataType = PChar.INSTANCE;
String str = "hello world";
byte[] result = new byte[] { -105, -102, -109, -109, -112, -33, -120, -112, -115, -109, -101, -33, -33, -33, -33, -33 };
test(str, dataType, 16, SortOrder.DESC, result);
}
use of org.apache.phoenix.schema.types.PDataType in project phoenix by apache.
the class PCharPadTest method testCharPaddingAsc2.
@Test
public void testCharPaddingAsc2() throws SQLException {
PDataType dataType = PChar.INSTANCE;
String str = "phoenix";
byte[] result = new byte[] { 112, 104, 111, 101, 110, 105, 120, 32, 32, 32, 32, 32, 32, 32 };
test(str, dataType, 14, SortOrder.ASC, result);
}
use of org.apache.phoenix.schema.types.PDataType in project phoenix by apache.
the class PCharPadTest method testCharPaddingAsc4.
@Test
public void testCharPaddingAsc4() throws SQLException {
PDataType dataType = PChar.INSTANCE;
String str = "hello world";
byte[] result = new byte[] { 104, 101, 108, 108, 111, 32, 119, 111, 114, 108, 100, 32, 32, 32, 32, 32 };
test(str, dataType, 16, SortOrder.ASC, result);
}
use of org.apache.phoenix.schema.types.PDataType in project phoenix by apache.
the class PCharPadTest method testCharPaddingDesc1.
@Test
public void testCharPaddingDesc1() throws SQLException {
PDataType dataType = PChar.INSTANCE;
String str = "hellow";
byte[] result = new byte[] { -105, -102, -109, -109, -112, -120, -33, -33, -33, -33 };
test(str, dataType, 10, SortOrder.DESC, result);
}
Aggregations