twalthr commented on code in PR #1:
URL:
https://github.com/apache/flink-connector-mongodb/pull/1#discussion_r1051933589
##########
flink-connector-mongodb/src/test/java/org/apache/flink/connector/mongodb/table/converter/MongoConvertersTest.java:
##########
@@ -146,28 +146,31 @@ public void testConvertBsonToRowData() {
GenericRowData.of(
StringData.fromString(oid.toHexString()),
StringData.fromString("string"),
- StringData.fromString(uuid.toString()),
+ StringData.fromString(
+ "{\"_value\": {\"$binary\": {\"base64\":
\"gR+qXamERr+L0IyxvO9daQ==\", \"subType\": \"04\"}}}"),
2,
3L,
4.1d,
DecimalData.fromBigDecimal(new BigDecimal("5.1"), 10,
2),
false,
TimestampData.fromEpochMillis(now.getEpochSecond() *
1000),
+ TimestampData.fromEpochMillis(now.toEpochMilli()),
StringData.fromString(
- OffsetDateTime.ofInstant(
-
Instant.ofEpochMilli(now.toEpochMilli()),
- ZoneOffset.UTC)
- .format(ISO_OFFSET_DATE_TIME)),
- StringData.fromString("/^9$/i"),
- StringData.fromString("function() { return 10; }"),
- StringData.fromString("function() { return 11; }"),
- StringData.fromString("12"),
- StringData.fromString(oid.toHexString()),
+ "{\"_value\": {\"$regularExpression\":
{\"pattern\": \"^9$\", \"options\": \"i\"}}}"),
Review Comment:
shouldn't the string be just `{\"$regularExpression\": {\"pattern\":
\"^9$\", \"options\": \"i\"}}` without the outer `_value`? or is this important
for the round trip?
--
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]