Class TableTools
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
base64Fingerprint
(Table source) Compute the SHA256 hash of the input table and return it in base64 string format.static ColumnHolder<Boolean>
booleanCol
(String name, Boolean... data) Returns a ColumnHolder of type Boolean that can be used when creating in-memory tables.static ColumnHolder<Byte>
Returns a ColumnHolder of type byte that can be used when creating in-memory tables.static ColumnHolder<Character>
Returns a ColumnHolder of type char that can be used when creating in-memory tables.static <T> ColumnHolder<T>
Returns a ColumnHolder that can be used when creating in-memory tables.static ColumnSource<Byte>
colSource
(byte... values) Creates an in-memory column of type byte for a collection of values.static ColumnSource<Character>
colSource
(char... values) Creates an in-memory column of type char for a collection of values.static ColumnSource<Double>
colSource
(double... values) Creates an in-memory column of type double for a collection of values.static ColumnSource<Float>
colSource
(float... values) Creates an in-memory column of type float for a collection of values.static ColumnSource<Integer>
colSource
(int... values) Creates an in-memory column of type int for a collection of values.static ColumnSource<Long>
colSource
(long... values) Creates an in-memory column of type long for a collection of values.static ColumnSource<Short>
colSource
(short... values) Creates an in-memory column of type short for a collection of values.static <T> ColumnSource<T>
colSource
(Class<T> clazz, Collection<T> values) Creates an in-memory column of the specified type for a collection of values.static byte[]
computeFingerprint
(Table source) Compute the SHA256 hash of the input table.static String
Computes the difference of two tables for use in verification.static String
diff
(Table actualResult, Table expectedResult, long maxDiffLines, EnumSet<TableDiff.DiffItems> itemsToSkip) Computes the difference of two tables for use in verification.diffPair
(Table actualResult, Table expectedResult, long maxDiffLines, EnumSet<TableDiff.DiffItems> itemsToSkip) Computes the difference of two tables for use in verification.static ColumnHolder<Double>
Returns a ColumnHolder of type double that can be used when creating in-memory tables.static Table
emptyTable
(long size) Returns a new, empty Deephaven Table.static ColumnHolder<Float>
Returns a ColumnHolder of type float that can be used when creating in-memory tables.static String
Returns a printout of a table formatted as HTML.static ColumnHolder<Instant>
instantCol
(String name, Instant... data) Returns a ColumnHolder of type Instant that can be used when creating in-memory tables.static ColumnHolder<Integer>
Returns a ColumnHolder of type int that can be used when creating in-memory tables.static ColumnHolder<Long>
Returns a ColumnHolder of type long that can be used when creating in-memory tables.static Table
Concatenates multiple Deephaven Tables into a single Table.static Table
merge
(Collection<Table> tables) Concatenates multiple Deephaven Tables into a single Table.static Table
Concatenates multiple Deephaven Tables into a single Table.static Table
mergeSorted
(String keyColumn, Table... tables) Concatenates multiple sorted Deephaven Tables into a single Table sorted by the specified key column.static Table
mergeSorted
(String keyColumn, Collection<Table> tables) Concatenates multiple sorted Deephaven Tables into a single Table sorted by the specified key column.static Table
metaTable
(TableDefinition definition) Creates a metadataTable
representing the columns indefinition
.static Table
newTable
(long size, List<String> names, List<ColumnSource<?>> columnSources) Creates a new Table.static Table
newTable
(long size, Map<String, ColumnSource<?>> columns) Creates a new Table.static Table
newTable
(ColumnHolder<?>... columnHolders) Creates a new Table.static Table
newTable
(TableDefinition definition) Creates a new Table.static Table
newTable
(TableDefinition definition, @Nullable Map<String, Object> attributes, ColumnHolder<?>... columnHolders) static Table
newTable
(TableDefinition definition, ColumnHolder<?>... columnHolders) static String
nullToNullString
(Object obj) static String
nullTypeAsString
(Class<?> dataType) static <T> ColumnSource<T>
objColSource
(T... values) Creates an in-memory column of the specified type for a collection of valuesstatic Table
roundDecimalColumns
(Table table) Produce a new table with all the columns of this table, in the same order, but withdouble
andfloat
columns rounded tolong
s.static Table
roundDecimalColumns
(Table table, String... columns) Produce a new table with all the columns of this table, in the same order, but withdouble
andfloat
columns rounded tolong
s.static Table
roundDecimalColumnsExcept
(Table table, String... columnsNotToRound) Produce a new table with all the columns of this table, in the same order, but with alldouble
andfloat
columns rounded tolong
s, except for the specifiedcolumnsNotToRound
.static ColumnHolder<Short>
Returns a ColumnHolder of type short that can be used when creating in-memory tables.static void
Prints the first few rows of a table to standard output.static void
show
(Table source, long maxRowCount, ZoneId timeZone, PrintStream out, String... columns) Prints the first few rows of a table to standard output.static void
Prints the first few rows of a table to standard output.static void
show
(Table source, long maxRowCount, ZoneId timeZone, String delimiter, PrintStream out, boolean showRowSet, String... columns) Prints the first few rows of a table to standard output.static void
Prints the first few rows of a table to standard output.static void
Prints the first few rows of a table to standard output.static void
showCommaDelimited
(Table source, long maxRowCount, String... columns) Prints the first few rows of a table to standard output, with commas between values.static void
showCommaDelimited
(Table source, String... columns) Prints the first few rows of a table to standard output, with commas between values.static void
showWithRowSet
(Table source, long firstRow, long lastRow, PrintStream out, String... columns) Prints the first few rows of a table to standard output, and also prints the details of the row keys and row positions that provided the values.static void
showWithRowSet
(Table source, long firstRow, long lastRow, String... columns) Prints the first few rows of a table to standard output, and also prints the details of the row keys and row positions that provided the values.static void
showWithRowSet
(Table source, long maxRowCount, String... columns) Prints the first few rows of a table to standard output, and also prints the details of the row keys and row positions that provided the values.static void
showWithRowSet
(Table source, long maxRowCount, ZoneId timeZone, PrintStream out, String... columns) Prints the first few rows of a table to standard output, and also prints the details of the row keys and row positions that provided the values.static void
showWithRowSet
(Table source, String... columns) Prints the first few rows of a table to standard output, and also prints the details of the row keys and row positions that provided the values.static String
Returns the first few rows of a table as a pipe-delimited string.static String
Returns the first few rows of a table as a pipe-delimited string.static String
Returns the first few rows of a table as a pipe-delimited string.static String
Returns the first few rows of a table as a pipe-delimited string.static ColumnHolder<String>
Returns a ColumnHolder of type String that can be used when creating in-memory tables.static Table
timeTable
(long periodNanos) Creates a table that adds a new row on a regular interval.static Table
timeTable
(long periodNanos, ReplayerInterface replayer) Creates a table that adds a new row on a regular interval.static Table
Creates a table that adds a new row on a regular interval.static Table
Creates a table that adds a new row on a regular interval.static Table
Creates a table that adds a new row on a regular interval.static Table
timeTable
(String startTime, long periodNanos, ReplayerInterface replayer) Creates a table that adds a new row on a regular interval.static Table
timeTable
(String period, ReplayerInterface replayer) Creates a table that adds a new row on a regular interval.static Table
Creates a table that adds a new row on a regular interval.static Table
timeTable
(String startTime, String period, ReplayerInterface replayer) Creates a table that adds a new row on a regular interval.static Table
Creates a table that adds a new row on a regular interval.static Table
timeTable
(Instant startTime, long periodNanos, ReplayerInterface replayer) Creates a table that adds a new row on a regular interval.static Table
Creates a table that adds a new row on a regular interval.static Table
timeTable
(Instant startTime, String period, ReplayerInterface replayer) Creates a table that adds a new row on a regular interval.static TimeTable.Builder
Creates a new time table builder.static Class<?>
typeFromName
(String dataTypeStr)
-
Field Details
-
NULL_STRING
- See Also:
-
-
Constructor Details
-
TableTools
public TableTools()
-
-
Method Details
-
show
Prints the first few rows of a table to standard output.- Parameters:
source
- a Deephaven table objectcolumns
- varargs of column names to display
-
showWithRowSet
Prints the first few rows of a table to standard output, and also prints the details of the row keys and row positions that provided the values.- Parameters:
source
- a Deephaven table objectcolumns
- varargs of column names to display
-
showCommaDelimited
Prints the first few rows of a table to standard output, with commas between values.- Parameters:
source
- a Deephaven table objectcolumns
- varargs of column names to display
-
show
Prints the first few rows of a table to standard output.- Parameters:
source
- a Deephaven table objecttimeZone
- a time zone constant relative to which date time data should be adjustedcolumns
- varargs of column names to display
-
show
Prints the first few rows of a table to standard output.- Parameters:
source
- a Deephaven table objectmaxRowCount
- the number of rows to returncolumns
- varargs of column names to display
-
showWithRowSet
Prints the first few rows of a table to standard output, and also prints the details of the row keys and row positions that provided the values.- Parameters:
source
- a Deephaven table objectmaxRowCount
- the number of rows to returncolumns
- varargs of column names to display
-
showCommaDelimited
Prints the first few rows of a table to standard output, with commas between values.- Parameters:
source
- a Deephaven table objectmaxRowCount
- the number of rows to returncolumns
- varargs of column names to display
-
show
Prints the first few rows of a table to standard output.- Parameters:
source
- a Deephaven table objectmaxRowCount
- the number of rows to returntimeZone
- a time zone constant relative to which date time data should be adjustedcolumns
- varargs of column names to display
-
show
public static void show(Table source, long maxRowCount, ZoneId timeZone, PrintStream out, String... columns) Prints the first few rows of a table to standard output.- Parameters:
source
- a Deephaven table objectmaxRowCount
- the number of rows to returntimeZone
- a time zone constant relative to which date time data should be adjustedout
- a PrintStream destination to which to print the datacolumns
- varargs of column names to display
-
showWithRowSet
public static void showWithRowSet(Table source, long maxRowCount, ZoneId timeZone, PrintStream out, String... columns) Prints the first few rows of a table to standard output, and also prints the details of the row keys and row positions that provided the values.- Parameters:
source
- a Deephaven table objectmaxRowCount
- the number of rows to returntimeZone
- a time zone constant relative to which date time data should be adjustedout
- a PrintStream destination to which to print the datacolumns
- varargs of column names to display
-
showWithRowSet
public static void showWithRowSet(Table source, long firstRow, long lastRow, PrintStream out, String... columns) Prints the first few rows of a table to standard output, and also prints the details of the row keys and row positions that provided the values.- Parameters:
source
- a Deephaven table objectfirstRow
- the firstRow to displaylastRow
- the lastRow (exclusive) to displayout
- a PrintStream destination to which to print the datacolumns
- varargs of column names to display
-
show
public static void show(Table source, long maxRowCount, ZoneId timeZone, String delimiter, PrintStream out, boolean showRowSet, String... columns) Prints the first few rows of a table to standard output.- Parameters:
source
- a Deephaven table objectmaxRowCount
- the number of rows to returntimeZone
- a time zone constant relative to which date time data should be adjusteddelimiter
- a String value to use between printed valuesout
- a PrintStream destination to which to print the datashowRowSet
- a boolean indicating whether to also print rowSet detailscolumns
- varargs of column names to display
-
showWithRowSet
Prints the first few rows of a table to standard output, and also prints the details of the row keys and row positions that provided the values.- Parameters:
source
- a Deephaven table objectfirstRow
- the firstRow to displaylastRow
- the lastRow (exclusive) to displaycolumns
- varargs of column names to display
-
string
Returns the first few rows of a table as a pipe-delimited string.- Parameters:
t
- a Deephaven table objectcolumns
- varargs of columns to include in the result- Returns:
- a String
-
string
Returns the first few rows of a table as a pipe-delimited string.- Parameters:
t
- a Deephaven table objectsize
- the number of rows to returncolumns
- varargs of columns to include in the result- Returns:
- a String
-
string
Returns the first few rows of a table as a pipe-delimited string.- Parameters:
t
- a Deephaven table objecttimeZone
- a time zone constant relative to which date time data should be adjustedcolumns
- varargs of columns to include in the result- Returns:
- a String
-
string
public static String string(@NotNull @NotNull Table table, int size, ZoneId timeZone, @NotNull @NotNull String... columns) Returns the first few rows of a table as a pipe-delimited string.- Parameters:
table
- a Deephaven table objectsize
- the number of rows to returntimeZone
- a time zone constant relative to which date time data should be adjustedcolumns
- varargs of columns to include in the result- Returns:
- a String
-
html
Returns a printout of a table formatted as HTML. Limit use to small tables to avoid running out of memory.- Parameters:
source
- a Deephaven table object- Returns:
- a String of the table printout formatted as HTML
-
diff
Computes the difference of two tables for use in verification.- Parameters:
actualResult
- first Deephaven table object to compareexpectedResult
- second Deephaven table object to comparemaxDiffLines
- stop comparing after this many differences are found- Returns:
- String report of the detected differences
-
diff
public static String diff(Table actualResult, Table expectedResult, long maxDiffLines, EnumSet<TableDiff.DiffItems> itemsToSkip) Computes the difference of two tables for use in verification.- Parameters:
actualResult
- first Deephaven table object to compareexpectedResult
- second Deephaven table object to comparemaxDiffLines
- stop comparing after this many differences are founditemsToSkip
- EnumSet of checks not to perform, such as checking column order, or exact match of double values- Returns:
- String report of the detected differences
-
diffPair
public static Pair<String,Long> diffPair(Table actualResult, Table expectedResult, long maxDiffLines, EnumSet<TableDiff.DiffItems> itemsToSkip) Computes the difference of two tables for use in verification.- Parameters:
actualResult
- first Deephaven table object to compareexpectedResult
- second Deephaven table object to comparemaxDiffLines
- stop comparing after this many differences are founditemsToSkip
- EnumSet of checks not to perform, such as checking column order, or exact match of double values- Returns:
- a pair of String report of the detected differences, and the first different row (0 if there are no different data values)
-
nullToNullString
-
colSource
Creates an in-memory column of the specified type for a collection of values.- Type Parameters:
T
- the type to use for the new column- Parameters:
clazz
- the class to use for the new columnvalues
- a collection of values to populate the new column- Returns:
- a Deephaven ColumnSource object
-
objColSource
Creates an in-memory column of the specified type for a collection of values- Type Parameters:
T
- the type to use for the new column- Parameters:
values
- a collection of values to populate the new column- Returns:
- a Deephaven ColumnSource object
-
colSource
Creates an in-memory column of type long for a collection of values.- Parameters:
values
- a collection of values to populate the new column- Returns:
- a Deephaven ColumnSource object
-
colSource
Creates an in-memory column of type int for a collection of values.- Parameters:
values
- a collection of values to populate the new column- Returns:
- a Deephaven ColumnSource object
-
colSource
Creates an in-memory column of type short for a collection of values.- Parameters:
values
- a collection of values to populate the new column- Returns:
- a Deephaven ColumnSource object
-
colSource
Creates an in-memory column of type byte for a collection of values.- Parameters:
values
- a collection of values to populate the new column- Returns:
- a Deephaven ColumnSource object
-
colSource
Creates an in-memory column of type char for a collection of values.- Parameters:
values
- a collection of values to populate the new column- Returns:
- a Deephaven ColumnSource object
-
colSource
Creates an in-memory column of type double for a collection of values.- Parameters:
values
- a collection of values to populate the new column- Returns:
- a Deephaven ColumnSource object
-
colSource
Creates an in-memory column of type float for a collection of values.- Parameters:
values
- a collection of values to populate the new column- Returns:
- a Deephaven ColumnSource object
-
col
Returns a ColumnHolder that can be used when creating in-memory tables.- Type Parameters:
T
- the type of the column- Parameters:
name
- name of the columndata
- a list of values for the column- Returns:
- a Deephaven ColumnHolder object
-
stringCol
Returns a ColumnHolder of type String that can be used when creating in-memory tables.- Parameters:
name
- name of the columndata
- a list of values for the column- Returns:
- a Deephaven ColumnHolder object
-
instantCol
Returns a ColumnHolder of type Instant that can be used when creating in-memory tables.- Parameters:
name
- name of the columndata
- a list of values for the column- Returns:
- a Deephaven ColumnHolder object
-
booleanCol
Returns a ColumnHolder of type Boolean that can be used when creating in-memory tables.- Parameters:
name
- name of the columndata
- a list of values for the column- Returns:
- a Deephaven ColumnHolder object
-
longCol
Returns a ColumnHolder of type long that can be used when creating in-memory tables.- Parameters:
name
- name of the columndata
- a list of values for the column- Returns:
- a Deephaven ColumnHolder object
-
intCol
Returns a ColumnHolder of type int that can be used when creating in-memory tables.- Parameters:
name
- name of the columndata
- a list of values for the column- Returns:
- a Deephaven ColumnHolder object
-
shortCol
Returns a ColumnHolder of type short that can be used when creating in-memory tables.- Parameters:
name
- name of the columndata
- a list of values for the column- Returns:
- a Deephaven ColumnHolder object
-
byteCol
Returns a ColumnHolder of type byte that can be used when creating in-memory tables.- Parameters:
name
- name of the columndata
- a list of values for the column- Returns:
- a Deephaven ColumnHolder object
-
charCol
Returns a ColumnHolder of type char that can be used when creating in-memory tables.- Parameters:
name
- name of the columndata
- a list of values for the column- Returns:
- a Deephaven ColumnHolder object
-
doubleCol
Returns a ColumnHolder of type double that can be used when creating in-memory tables.- Parameters:
name
- name of the columndata
- a list of values for the column- Returns:
- a Deephaven ColumnHolder object
-
floatCol
Returns a ColumnHolder of type float that can be used when creating in-memory tables.- Parameters:
name
- name of the columndata
- a list of values for the column- Returns:
- a Deephaven ColumnHolder object
-
emptyTable
Returns a new, empty Deephaven Table.- Parameters:
size
- the number of rows to allocate space for- Returns:
- a Deephaven Table with no columns.
-
newTable
Creates a new Table.- Parameters:
size
- the number of rows to allocatenames
- a List of column namescolumnSources
- a List of the ColumnSource(s)- Returns:
- a Deephaven Table
-
newTable
Creates a new Table.- Parameters:
size
- the number of rows to allocatecolumns
- a Map of column names and ColumnSources- Returns:
- a Deephaven Table
-
newTable
Creates a new Table.- Parameters:
definition
- the TableDefinition (column names and properties) to use for the new table- Returns:
- an empty Deephaven Table
-
newTable
Creates a new Table.- Parameters:
columnHolders
- a list of ColumnHolders from which to create the table- Returns:
- a Deephaven Table
-
newTable
-
newTable
public static Table newTable(TableDefinition definition, @Nullable @Nullable Map<String, Object> attributes, ColumnHolder<?>... columnHolders) -
metaTable
Creates a metadataTable
representing the columns indefinition
. Will include the following columns:- Name
ColumnDefinition.getName()
- DataType
- From
ColumnDefinition.getDataType()
, result ofClass.getCanonicalName()
if non-null
, elseClass.getName()
- ColumnType
ColumnDefinition#getColumnType()
- IsPartitioning
ColumnDefinition.isPartitioning()
- Parameters:
definition
- the definition- Returns:
- the metadata Table
-
timeTable
Creates a table that adds a new row on a regular interval.- Parameters:
period
- time interval between new row additions.- Returns:
- time table
-
timeTable
Creates a table that adds a new row on a regular interval.- Parameters:
period
- time interval between new row additionsreplayer
- data replayer- Returns:
- time table
-
timeTable
Creates a table that adds a new row on a regular interval.- Parameters:
startTime
- start time for adding new rowsperiod
- time interval between new row additions- Returns:
- time table
-
timeTable
Creates a table that adds a new row on a regular interval.- Parameters:
startTime
- start time for adding new rowsperiod
- time interval between new row additionsreplayer
- data replayer- Returns:
- time table
-
timeTable
Creates a table that adds a new row on a regular interval.- Parameters:
startTime
- start time for adding new rowsperiod
- time interval between new row additions- Returns:
- time table
-
timeTable
Creates a table that adds a new row on a regular interval.- Parameters:
startTime
- start time for adding new rowsperiod
- time interval between new row additionsreplayer
- data replayer- Returns:
- time table
-
timeTable
Creates a table that adds a new row on a regular interval.- Parameters:
periodNanos
- time interval between new row additions in nanoseconds.- Returns:
- time table
-
timeTable
Creates a table that adds a new row on a regular interval.- Parameters:
periodNanos
- time interval between new row additions in nanoseconds.replayer
- data replayer- Returns:
- time table
-
timeTable
Creates a table that adds a new row on a regular interval.- Parameters:
startTime
- start time for adding new rowsperiodNanos
- time interval between new row additions in nanoseconds.- Returns:
- time table
-
timeTable
Creates a table that adds a new row on a regular interval.- Parameters:
startTime
- start time for adding new rowsperiodNanos
- time interval between new row additions in nanoseconds.replayer
- data replayer- Returns:
- time table
-
timeTable
Creates a table that adds a new row on a regular interval.- Parameters:
startTime
- start time for adding new rowsperiodNanos
- time interval between new row additions in nanoseconds.- Returns:
- time table
-
timeTable
Creates a table that adds a new row on a regular interval.- Parameters:
startTime
- start time for adding new rowsperiodNanos
- time interval between new row additions in nanoseconds.replayer
- data replayer- Returns:
- time table
-
timeTable
Creates a table that adds a new row on a regular interval.- Parameters:
clock
- the clockstartTime
- start time for adding new rowsperiodNanos
- time interval between new row additions in nanoseconds.- Returns:
- time table
-
timeTableBuilder
Creates a new time table builder.- Returns:
- a time table builder
-
merge
Concatenates multiple Deephaven Tables into a single Table.The resultant table will have rows from the same table together, in the order they are specified as inputs.
When ticking tables grow, they may run out of the 'pre-allocated' space for newly added rows. When more key- space is needed, tables in higher key-space are shifted to yet higher key-space to make room for new rows. Shifts are handled efficiently, but some downstream operations generate a linear O(n) amount of work per shifted row. When possible, one should favor ordering the constituent tables first by static/non-ticking sources followed by tables that are expected to grow at slower rates, and finally by tables that grow without bound.
- Parameters:
theList
- a List of Tables to be concatenated- Returns:
- a Deephaven table object
-
merge
Concatenates multiple Deephaven Tables into a single Table.The resultant table will have rows from the same table together, in the order they are specified as inputs.
When ticking tables grow, they may run out of the 'pre-allocated' space for newly added rows. When more key- space is needed, tables in higher key-space are shifted to yet higher key-space to make room for new rows. Shifts are handled efficiently, but some downstream operations generate a linear O(n) amount of work per shifted row. When possible, one should favor ordering the constituent tables first by static/non-ticking sources followed by tables that are expected to grow at slower rates, and finally by tables that grow without bound.
- Parameters:
tables
- a Collection of Tables to be concatenated- Returns:
- a Deephaven table object
-
merge
Concatenates multiple Deephaven Tables into a single Table.The resultant table will have rows from the same table together, in the order they are specified as inputs.
When ticking tables grow, they may run out of the 'pre-allocated' space for newly added rows. When more key- space is needed, tables in higher key-space are shifted to yet higher key-space to make room for new rows. Shifts are handled efficiently, but some downstream operations generate a linear O(n) amount of work per shifted row. When possible, one should favor ordering the constituent tables first by static/non-ticking sources followed by tables that are expected to grow at slower rates, and finally by tables that grow without bound.
- Parameters:
tables
- a list of Tables to be concatenated- Returns:
- a Deephaven table object
-
mergeSorted
Concatenates multiple sorted Deephaven Tables into a single Table sorted by the specified key column.The input tables must each individually be sorted by keyColumn, otherwise results are undefined.
- Parameters:
tables
- sorted Tables to be concatenatedkeyColumn
- the column to use when sorting the concatenated results- Returns:
- a Deephaven table object
-
mergeSorted
Concatenates multiple sorted Deephaven Tables into a single Table sorted by the specified key column.The input tables must each individually be sorted by keyColumn, otherwise results are undefined.
- Parameters:
tables
- a Collection of sorted Tables to be concatenatedkeyColumn
- the column to use when sorting the concatenated results- Returns:
- a Deephaven table object
-
roundDecimalColumns
Produce a new table with all the columns of this table, in the same order, but withdouble
andfloat
columns rounded tolong
s.- Returns:
- The new
Table
, with alldouble
andfloat
columns rounded tolong
s.
-
roundDecimalColumnsExcept
Produce a new table with all the columns of this table, in the same order, but with alldouble
andfloat
columns rounded tolong
s, except for the specifiedcolumnsNotToRound
.- Parameters:
columnsNotToRound
- The names of thedouble
andfloat
columns not to round tolong
s- Returns:
- The new
Table
, with columns modified as explained above
-
roundDecimalColumns
Produce a new table with all the columns of this table, in the same order, but withdouble
andfloat
columns rounded tolong
s.- Parameters:
columns
- The names of thedouble
andfloat
columns to round.- Returns:
- The new
Table
, with the specified columns rounded tolong
s. - Throws:
IllegalArgumentException
- Ifcolumns
is null, or if one of the specifiedcolumns
is neither adouble
column nor afloat
column.
-
computeFingerprint
Compute the SHA256 hash of the input table.
The hash is computed using every value in each row, using toString for unrecognized objects. The hash also includes the input table definition column names and types.
- Parameters:
source
- The table to fingerprint- Returns:
- The SHA256 hash of the table data and
TableDefinition
- Throws:
IOException
- If an error occurs during the hashing.
-
base64Fingerprint
Compute the SHA256 hash of the input table and return it in base64 string format.
- Parameters:
source
- The table to fingerprint- Returns:
- The SHA256 hash of the table data and
TableDefinition
- Throws:
IOException
- If an error occurs during the hashing.
-
nullTypeAsString
-
typeFromName
-