WZhuo opened a new pull request, #1173: URL: https://github.com/apache/iceberg-cpp/pull/1173
Phase 2 of #909: run the `partition-transforms` surface of [apache/iceberg-verification](https://github.com/apache/iceberg-verification) in `verification_test`, covering all eight subdirectories: `identity`, `bucket`, `truncate`, `year`, `month`, `day`, `hour` and `void`. For each case the test: 1. Parses `input.source_type` with `TypeFromJson` and `input.transform` with `TransformFromString`, then binds the transform with `Transform::Bind`. 2. Checks that the bound result type is one of `decoded.result_types`. The expected type strings are parsed and compared as types, so the check does not depend on how `ToJson` spells a type. 3. Decodes each of `input.values` under the source type, applies the bound transform, and compares the result with the value at the same index of `decoded.values`. Expected values are decoded under the result type and compared as literals, so offset-equivalent `timestamptz` strings and scale-preserving decimals compare by value. Values are decoded with `LiteralFromJson`. The one exception is `long`, which this surface writes as a decimal string so JSON number handling cannot lose 64-bit precision. Failures are labeled `<subdir>/<case-id> result_type` or `<subdir>/<case-id> values[<index>]`, as the surface README requires. All 75 cases are run. 73 pass and 2 fail: | Case | Failure | |---|---| | `identity/identity-float` | `values[2]: cannot decode input 0: Cannot parse 0 as a float value` | | `identity/identity-double` | `values[2]: cannot decode input 0: Cannot parse 0 as a double value` | `LiteralFromJson` mirrors Java's `SingleValueParser.fromJson` and requires a JSON number with a fractional part or exponent for `float` and `double`. Appendix D of the spec only says "JSON number", and the fixture writes `0`. Java on main rejects the same value. I'll raise this on dev@ to decide whether readers should accept any JSON number, so the test reports these cases instead of working around them. The 4 failures from phase 1 are unchanged and tracked by #1145, #1146 and #1147. Validation: built and ran `verification_test` locally on macOS with the results above. pre-commit and clang-tidy pass on the new file. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
