javier-nieto-nexplore opened a new issue #2367:
URL: https://github.com/apache/drill/issues/2367
**Describe the bug**
"select *" like queries to mongodb collections result in an INTERNAL_ERROR
due to empty $project sent to mongodb server
```
2021-11-11 12:07:58,589 [1e72f861-8eaa-c18f-2d86-15ac4f0a90f5:frag:0:0] INFO
o.a.d.exec.physical.impl.ScanBatch - User Error Occurred: Command failed with
error 51272 (Location51272): 'Invalid $project :: caused by :: projection
specification must have at least one field' on server
host.docker.internal:27019. The full response is {"ok": 0.0, "errmsg": "Invalid
$project :: caused by :: projection specification must have at least one
field", "code": 51272, "codeName": "Location51272"} (Command failed with error
51272 (Location51272): 'Invalid $project :: caused by :: projection
specification must have at least one field' on server
host.docker.internal:27019. The full response is {"ok": 0.0, "errmsg": "Invalid
$project :: caused by :: projection specification must have at least one
field", "code": 51272, "codeName": "Location51272"})
org.apache.drill.common.exceptions.UserException: INTERNAL_ERROR ERROR:
Command failed with error 51272 (Location51272): 'Invalid $project :: caused by
:: projection specification must have at least one field' on server
host.docker.internal:27019. The full response is {"ok": 0.0, "errmsg": "Invalid
$project :: caused by :: projection specification must have at least one
field", "code": 51272, "codeName": "Location51272"}
```
**To Reproduce**
Steps to reproduce the behavior:
1. Create a mongodb storage
2. try a query with no projection (select *)
3. Error will appear on GUI
**Expected behavior**
in version 1.18 and 1.19 this was returning the full fields from collection
**Additional context**
Here are full logs:
[error_log_select_mongodb.txt](https://github.com/apache/drill/files/7520331/error_log_select_mongodb.txt)
--
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]