public class RowSetUtilities extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
assertEqualValues(String msg,
ValueType type,
Object expectedObj,
Object actualObj) |
static void |
assertEqualValues(ValueType type,
Object expectedObj,
Object actualObj) |
static void |
assertSchemasEqual(TupleMetadata expected,
BatchSchema actual) |
static byte[][] |
binArray(byte[]... elements) |
static boolean[] |
boolArray(Boolean... elements) |
static byte[] |
byteArray(Integer... elements) |
static BigDecimal |
dec(String value) |
static BigDecimal[] |
decArray(BigDecimal... elements) |
static double[] |
doubleArray(Double... elements) |
static int[] |
intArray(Integer... elements) |
static Object[] |
listValue(Object... elements) |
static Long[] |
longArray(Long... elements) |
static Map<Object,Object> |
map(Object... entry)
Bootstrap a map object given key-value sequence.
|
static Object[][] |
mapArray(Object[]... elements) |
static Object[] |
mapValue(Object... members) |
static Object[] |
objArray(Object... elements) |
static org.joda.time.Period |
periodFromInt(TypeProtos.MinorType minorType,
int value)
Ad-hoc, test-only method to set a Period from an integer.
|
static void |
reverse(SelectionVector2 sv2)
Reverse a row set by reversing the entries in an SV2.
|
static void |
setFromInt(RowSetWriter rowWriter,
int index,
int value)
Set a test data value from an int.
|
static Object[] |
singleList(Object element) |
static Object[] |
singleMap(Object member) |
static Object[] |
singleObjArray(Object element) |
static String[] |
strArray(String... elements) |
static Object |
testDataFromInt(ValueType valueType,
TypeProtos.MajorType dataType,
int value)
Create a test value that can be passed to setObject().
|
static Object[] |
variantArray(Object... elements) |
static void |
verify(RowSet expected,
RowSet actual)
Verify the actual results, then free memory
for both the expected and actual result sets.
|
static void |
verify(RowSet expected,
RowSet actual,
int rowCount) |
public static void reverse(SelectionVector2 sv2)
sv2 - the SV2 which is reversed in placepublic static void setFromInt(RowSetWriter rowWriter, int index, int value)
rowWriter - writer where value will be written toindex - target indexvalue - value to writepublic static Object testDataFromInt(ValueType valueType, TypeProtos.MajorType dataType, int value)
public static org.joda.time.Period periodFromInt(TypeProtos.MinorType minorType, int value)
minorType - the Drill data typevalue - the integer value to applypublic static void assertEqualValues(ValueType type, Object expectedObj, Object actualObj)
public static void assertEqualValues(String msg, ValueType type, Object expectedObj, Object actualObj)
public static byte[] byteArray(Integer... elements)
public static double[] doubleArray(Double... elements)
public static boolean[] boolArray(Boolean... elements)
public static BigDecimal[] decArray(BigDecimal... elements)
public static byte[][] binArray(byte[]... elements)
public static int[] intArray(Integer... elements)
public static void verify(RowSet expected, RowSet actual)
expected - The expected results.actual - the actual results to verify.public static BigDecimal dec(String value)
public static Map<Object,Object> map(Object... entry)
entry - key-value sequencepublic static void assertSchemasEqual(TupleMetadata expected, BatchSchema actual)
Copyright © 2021 The Apache Software Foundation. All rights reserved.