Skip to content

Commit e21def1

Browse files
committed
fix ci
1 parent ebcde3e commit e21def1

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ jobs:
146146

147147
- name: Setup docker (missing on MacOS)
148148
run: |
149-
brew install docker
149+
brew install docker colima
150150
colima start
151151
# For testcontainers to find the Colima socket
152152
# https://github.com/abiosoft/colima/blob/main/docs/FAQ.md#cannot-connect-to-the-docker-daemon-at-unixvarrundockersock-is-the-docker-daemon-running

backend/src/core/avro/json_to_avro.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ fn json_to_avro_map(json_value: &JsonValue, schema: &Schema) -> AvroResult<AvroV
9898
.ok_or_else(|| AvroError::InvalidNumber(format!("Unable to convert {n} to Double")))?;
9999
Ok(AvroValue::Double(n))
100100
}
101-
(Schema::Decimal { scale, .. }, JsonValue::Number(n)) => {
102-
Ok(AvroValue::Decimal(parse_decimal(&n.to_string(), *scale as u32)?))
101+
(Schema::Decimal { scale, .. }, JsonValue::String(n)) => {
102+
Ok(AvroValue::Decimal(parse_decimal(&n, *scale as u32)?))
103103
}
104104
// time
105105
(Schema::Date, JsonValue::Number(n)) => {

backend/src/core/avro/test_files/1_good_input.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@
1515
"OptionalStringField": null,
1616
"OptionalStringField2": { "string": "this is a test" },
1717
"UnionField": { "float": 1.5 },
18-
"DecimalField": 1.3,
18+
"DecimalField": "1.30",
1919
"DateField": 1234568,
2020
"TimeMillisField": 3215234,
2121
"TimeMicrosField": 3456678412,
2222
"TimestampMillisField": 123457637,
2323
"TimestampMicrosField": 84596712,
2424
"UuidField": "6ba7b814-9dad-11d1-80b4-00c04fd430c8",
25-
"UnionLongDecimal": { "decimal": 1231.12 },
26-
"OptionalDecimal": { "decimal": 1231.12 }
25+
"UnionLongDecimal": { "decimal": "1231.12" },
26+
"OptionalDecimal": { "decimal": "1231.12" }
2727
}

0 commit comments

Comments
 (0)