[mongodb] Allow document field defined as string type in flink sql (#1385)

pull/1390/head
vanliu 3 years ago committed by GitHub
parent e7238f2407
commit 42631af6f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -561,6 +561,10 @@ public class MongoDBConnectorDeserializationSchema
if (docObj.isString()) {
return StringData.fromString(docObj.asString().getValue());
}
if (docObj.isDocument()) {
// convert document to json string
return StringData.fromString(docObj.asDocument().toJson());
}
if (docObj.isBinary()) {
BsonBinary bsonBinary = docObj.asBinary();
if (BsonBinarySubType.isUuid(bsonBinary.getType())) {

Loading…
Cancel
Save