Skip to content

Commit

Permalink
fix ut
Browse files Browse the repository at this point in the history
  • Loading branch information
xxhZs committed Mar 8, 2024
1 parent e2f9b6f commit edd87cf
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public Integer getMaxBatchRows() {
public CassandraConfig withMaxBatchRows(Integer maxBatchRows) {
if (maxBatchRows > 65536 || maxBatchRows < 1) {
throw new IllegalArgumentException(
"cassandra.max_batch_rows must be <= 65535 and >= 1");
"Cassandra sink option: maxBatchRows must be <= 65535 and >= 1");
}
this.maxBatchRows = maxBatchRows;
return this;
Expand All @@ -119,7 +119,8 @@ public Integer getRequestTimeoutMs() {

public CassandraConfig withRequestTimeoutMs(Integer requestTimeoutMs) {
if (requestTimeoutMs < 1) {
throw new IllegalArgumentException("cassandra.request_timeout_ms must be >= 1");
throw new IllegalArgumentException(
"Cassandra sink option: requestTimeoutMs must be >= 1");
}
this.requestTimeoutMs = requestTimeoutMs;
return this;
Expand Down
1 change: 1 addition & 0 deletions src/connector/src/sink/encoder/json.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ fn datum_to_json_object(
if let CustomJsonType::BigQuery = custom_json_type
&& matches!(field.data_type(), DataType::List(_))
{
// Bigquery need to convert null of array to empty array https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types
return Ok(Value::Array(vec![]));
} else {
return Ok(Value::Null);
Expand Down
4 changes: 4 additions & 0 deletions src/connector/with_options_sink.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ BigQueryConfig:
- name: bigquery.table
field_type: String
required: true
- name: bigquery.max_batch_rows
field_type: usize
required: false
default: '1024'
- name: region
field_type: String
required: false
Expand Down

0 comments on commit edd87cf

Please sign in to comment.