Skip to content

Commit

Permalink
feat: improve json stream writer json to proto conversion speed by
Browse files Browse the repository at this point in the history
caching the schema. This will introduce approximately 2x improvement to
append speed
  • Loading branch information
GaoleMeng committed Jul 11, 2023
1 parent b5ebe90 commit dd72998
Show file tree
Hide file tree
Showing 6 changed files with 299 additions and 142 deletions.
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,22 @@ public AppendSerializationError(
}
}

/**
* This exception is thrown from to proto converter to wrap the row index to error mapping.
*/
static class RowIndexToErrorException extends IllegalArgumentException {
Map<Integer, String> rowIndexToErrorMessage;

public RowIndexToErrorException(
Map<Integer, String> rowIndexToErrorMessage) {
this.rowIndexToErrorMessage = rowIndexToErrorMessage;
}

public String getMessage() {
return "The map of row index to error message is " + rowIndexToErrorMessage.toString();
}
}

/** This exception is used internally to handle field level parsing errors. */
public static class FieldParseError extends IllegalArgumentException {
private final String fieldName;
Expand Down

0 comments on commit dd72998

Please sign in to comment.