You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/06/04 20:54:32 UTC

[GitHub] [beam] damccorm opened a new issue, #21005: Add documentation and improved errors for QueryFn in MongoDbIO

damccorm opened a new issue, #21005:
URL: https://github.com/apache/beam/issues/21005

   Currently the MongoDbIO.Read implementation assumes that the submitted QueryFn is one of the predefined QueryFns in Beam, so either an AggregationQuery or FindQuery. The problem is this assumption is not documented anywhere.
   
   Fixing this consists of two small changes:
   
   1. Add documentation to the [withQueryFn](https://github.com/apache/beam/blob/release-2.31.0/sdks/java/io/mongodb/src/main/java/org/apache/beam/sdk/io/mongodb/MongoDbIO.java#L279) method specifying that the QueryFn must be one of the predefined classes in the MongoDbIO package.
   
   2. In the [split method](https://github.com/apache/beam/blob/release-2.31.0/sdks/java/io/mongodb/src/main/java/org/apache/beam/sdk/io/mongodb/MongoDbIO.java#L435), the code checks if the QueryFn is a FindQuery, and if not assumes it's an AggregationQuery, meaning that users that input their own class will find it failing to cast to an AggregationQuery. Instead, there should be an error if the QueryFn is an unknown type, preferably instructing users to only use one of the predefined QueryFn types.
   
   Imported from Jira [BEAM-12466](https://issues.apache.org/jira/browse/BEAM-12466). Original Jira may contain additional context.
   Reported by: danoliveira.


-- 
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: github-unsubscribe@beam.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Add documentation and improved errors for QueryFn in MongoDbIO [beam]

Posted by "Asmita0915 (via GitHub)" <gi...@apache.org>.
Asmita0915 commented on issue #21005:
URL: https://github.com/apache/beam/issues/21005#issuecomment-1836225520

   @damccorm taking a look might need your help if stuck. Thanks!


-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Add documentation and improved errors for QueryFn in MongoDbIO [beam]

Posted by "Asmita0915 (via GitHub)" <gi...@apache.org>.
Asmita0915 commented on issue #21005:
URL: https://github.com/apache/beam/issues/21005#issuecomment-1855566182

   @damccorm  i have dropped email to dev mailing list. Let me know if that looks fine.


-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Add documentation and improved errors for QueryFn in MongoDbIO [beam]

Posted by "damccorm (via GitHub)" <gi...@apache.org>.
damccorm commented on issue #21005:
URL: https://github.com/apache/beam/issues/21005#issuecomment-1858067852

   @johnjcasey could you help here?


-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] blazingbhavneek commented on issue #21005: Add documentation and improved errors for QueryFn in MongoDbIO

Posted by "blazingbhavneek (via GitHub)" <gi...@apache.org>.
blazingbhavneek commented on issue #21005:
URL: https://github.com/apache/beam/issues/21005#issuecomment-1546158919

   Hey there! 👋 I'm new to this repository and eager to contribute! 🌟 Could you kindly suggest some entry point or files to look into?
   


-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] damccorm commented on issue #21005: Add documentation and improved errors for QueryFn in MongoDbIO

Posted by "damccorm (via GitHub)" <gi...@apache.org>.
damccorm commented on issue #21005:
URL: https://github.com/apache/beam/issues/21005#issuecomment-1547891796

   Hey, saw you added this comment several places. I'd recommend focusing on a single issue at first (I answered the underlying question here - https://github.com/apache/beam/issues/20298#issuecomment-1547888993)


-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Add documentation and improved errors for QueryFn in MongoDbIO [beam]

Posted by "Asmita0915 (via GitHub)" <gi...@apache.org>.
Asmita0915 commented on issue #21005:
URL: https://github.com/apache/beam/issues/21005#issuecomment-1834363943

   Hey, I am willing to contribute for this issue. Don't see any assignee, Is this issue taken 


-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Add documentation and improved errors for QueryFn in MongoDbIO [beam]

Posted by "damccorm (via GitHub)" <gi...@apache.org>.
damccorm commented on issue #21005:
URL: https://github.com/apache/beam/issues/21005#issuecomment-1836113745

   @Asmita0915 I don't think so, if you would like to take it you can comment `.take-issue` and a bot will auto-assign it your way


-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Add documentation and improved errors for QueryFn in MongoDbIO [beam]

Posted by "Asmita0915 (via GitHub)" <gi...@apache.org>.
Asmita0915 commented on issue #21005:
URL: https://github.com/apache/beam/issues/21005#issuecomment-1836143268

   .take-issue  


-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Add documentation and improved errors for QueryFn in MongoDbIO [beam]

Posted by "johnjcasey (via GitHub)" <gi...@apache.org>.
johnjcasey commented on issue #21005:
URL: https://github.com/apache/beam/issues/21005#issuecomment-1858471085

   Yep, will do


-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org