Skip to content

[1.20.0-SNAPSHOT] select * to mongodb results in empty $project INTERNAL_ERROR #2367

@javier-nieto-nexplore

Description

@javier-nieto-nexplore

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions