jyemin commented on code in PR #34100:
URL: https://github.com/apache/beam/pull/34100#discussion_r1974132770


##########
sdks/java/io/mongodb/src/main/java/org/apache/beam/sdk/io/mongodb/MongoDbGridFSIO.java:
##########
@@ -380,7 +380,7 @@ protected static class BoundedGridFSSource extends 
BoundedSource<ObjectId> {
 
       private DBCursor createCursor(GridFS gridfs) {
         if (spec.filter() != null) {
-          DBObject query = (DBObject) JSON.parse(spec.filter());
+          DBObject query = BasicDBObject.parse(spec.filter());

Review Comment:
   The Extended JSON syntax accepted by `BasicDBObject#parse` is mostly 
consistent with the syntax accepted by `JSON#parse`.  To understand whether 
this might cause compatibility issues, can anyone point me to how 
`spec.filter()` is initialized? Does the filter come from the application or is 
it generated by the framework, and if the later, where in the code does that 
happen?



-- 
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]

Reply via email to