public class HoodiePrintHelper extends Object
| Constructor and Description |
|---|
HoodiePrintHelper() |
| Modifier and Type | Method and Description |
|---|---|
static String |
print(String[] header,
String[][] rows)
Print header and raw rows.
|
static String |
print(TableHeader rowHeader,
Map<String,Function<Object,String>> fieldNameToConverterMap,
boolean withRowNo,
String sortByField,
boolean isDescending,
Integer limit,
boolean headerOnly,
List<Comparable[]> rows)
Serialize Table to printable string.
|
static String |
print(TableHeader rowHeader,
Map<String,Function<Object,String>> fieldNameToConverterMap,
boolean withRowNo,
String sortByField,
boolean isDescending,
Integer limit,
boolean headerOnly,
List<Comparable[]> rows,
String tempTableName)
Serialize Table to printable string and also export a temporary view to easily write sql queries.
|
static String |
print(TableHeader rowHeader,
Map<String,Function<Object,String>> fieldNameToConverterMap,
String sortByField,
boolean isDescending,
Integer limit,
boolean headerOnly,
List<Comparable[]> rows)
Serialize Table to printable string.
|
static String |
print(TableHeader rowHeader,
Map<String,Function<Object,String>> fieldNameToConverterMap,
String sortByField,
boolean isDescending,
Integer limit,
boolean headerOnly,
List<Comparable[]> rows,
String tempTableName)
Serialize Table to printable string and also export a temporary view to easily write sql queries.
|
public static String print(String[] header, String[][] rows)
header - Headerrows - Raw Rowspublic static String print(TableHeader rowHeader, Map<String,Function<Object,String>> fieldNameToConverterMap, String sortByField, boolean isDescending, Integer limit, boolean headerOnly, List<Comparable[]> rows)
rowHeader - Row HeaderfieldNameToConverterMap - Field Specific ConverterssortByField - Sorting fieldisDescending - Orderlimit - LimitheaderOnly - Headers onlyrows - List of rowspublic static String print(TableHeader rowHeader, Map<String,Function<Object,String>> fieldNameToConverterMap, boolean withRowNo, String sortByField, boolean isDescending, Integer limit, boolean headerOnly, List<Comparable[]> rows)
rowHeader - Row HeaderfieldNameToConverterMap - Field Specific ConverterswithRowNo - Whether to add row numbersortByField - Sorting fieldisDescending - Orderlimit - LimitheaderOnly - Headers onlyrows - List of rowspublic static String print(TableHeader rowHeader, Map<String,Function<Object,String>> fieldNameToConverterMap, String sortByField, boolean isDescending, Integer limit, boolean headerOnly, List<Comparable[]> rows, String tempTableName)
Ideally, exporting view needs to be outside PrintHelper, but all commands use this. So this is easy way to add support for all commands
rowHeader - Row HeaderfieldNameToConverterMap - Field Specific ConverterssortByField - Sorting fieldisDescending - Orderlimit - LimitheaderOnly - Headers onlyrows - List of rowstempTableName - table name to exportpublic static String print(TableHeader rowHeader, Map<String,Function<Object,String>> fieldNameToConverterMap, boolean withRowNo, String sortByField, boolean isDescending, Integer limit, boolean headerOnly, List<Comparable[]> rows, String tempTableName)
Ideally, exporting view needs to be outside PrintHelper, but all commands use this. So this is easy way to add support for all commands
rowHeader - Row HeaderfieldNameToConverterMap - Field Specific ConverterswithRowNo - Whether to add row numbersortByField - Sorting fieldisDescending - Orderlimit - LimitheaderOnly - Headers onlyrows - List of rowstempTableName - table name to exportCopyright © 2025 The Apache Software Foundation. All rights reserved.