Class TableauStyle
java.lang.Object
org.apache.flink.table.utils.print.TableauStyle
- All Implemented Interfaces:
PrintStyle
Print the result and content as tableau form.
For example: (printRowKind is true)
+----+-------------+---------+-------------+ | op | boolean_col | int_col | varchar_col | +----+-------------+---------+-------------+ | +I | true | 1 | abc | | -U | false | 2 | def | | +U | false | 3 | def | | -D | <NULL> | <NULL> | <NULL> | +----+-------------+---------+-------------+ 4 rows in set
-
Field Summary
Fields inherited from interface org.apache.flink.table.utils.print.PrintStyle
DEFAULT_MAX_COLUMN_WIDTH, NULL_VALUE -
Method Summary
Modifier and TypeMethodDescriptionint[]Returns null if the column widths are not precomputed using the row type.voidinferColumnWidth(List<String[]> rowData) voidprint(Iterator<RowData> it, PrintWriter printWriter) Displays the result.voidprintBorderLine(PrintWriter printWriter) voidprintColumnNamesTableauRow(PrintWriter printWriter) voidprintEmptyResult(Iterator<RowData> it, PrintWriter printWriter) voidprintFooter(PrintWriter printWriter, long numRows) longprintTable(Iterator<RowData> it, PrintWriter printWriter) Print table with column names and borders.voidprintTableauRow(String[] cols, PrintWriter printWriter) String[]rowFieldsToString(RowData row)
-
Method Details
-
getColumnWidths
@Nullable public int[] getColumnWidths()Returns null if the column widths are not precomputed using the row type. -
print
Description copied from interface:PrintStyleDisplays the result.- Specified by:
printin interfacePrintStyle- Parameters:
it- The iterator for the data to printprintWriter- The writer to write to
-
printEmptyResult
-
printTable
Print table with column names and borders.- Returns:
- the row number printed in the table
-
inferColumnWidth
-
rowFieldsToString
-
printColumnNamesTableauRow
-
printTableauRow
-
printBorderLine
-