Skip to content

Commit

Permalink
New approach for CSV reading
Browse files Browse the repository at this point in the history
  • Loading branch information
kosak committed Dec 10, 2021
1 parent ae32bfd commit 5ea570b
Show file tree
Hide file tree
Showing 72 changed files with 5,765 additions and 1,534 deletions.
4 changes: 2 additions & 2 deletions Integrations/python/deephaven/csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def read(path: str,
Args:
path (str): a file path or a URL string
header (Dict[str, DataType]): a dict to define the table columns with key being the name, value being the data type
inference (csv.Inference): an Enum value specifying the rules for data type inference, default is INFERENCE_STANDARD_TIMES
inference (csv.Inference): an Enum value specifying the rules for data type inference, default is INFERENCE_STANDARD
headless (bool): indicates if the CSV data is headless, default is False
delimiter (str): the delimiter used by the CSV, default is the comma
quote (str): the quote character for the CSV, default is double quote
Expand All @@ -133,7 +133,7 @@ def read(path: str,
"""

if inference is None:
inference = INFERENCE_STANDARD_TIMES
inference = INFERENCE_STANDARD

csv_specs_builder = _JCsvSpecs.builder()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ public static InMemoryTable from(NewTable table) {
columns);
}

// TODO(kosak): this may not be what we want.
public static InMemoryTable from(TableDefinition definition, TrackingRowSet rowSet,
Map<String, ? extends ColumnSource<?>> columns) {
return new InMemoryTable(definition, rowSet, columns);
}

public InMemoryTable(String[] columnNames, Object[] arrayValues) {
super(RowSetFactory.flat(Array.getLength(arrayValues[0])).toTracking(),
createColumnsMap(columnNames, arrayValues));
Expand Down
Loading

0 comments on commit 5ea570b

Please sign in to comment.