Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-1692

select * on mongo join returns invalid results

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.6.0
    • Fix Version/s: 0.8.0
    • Component/s: Storage - MongoDB
    • Labels:
      None
    • Environment:

      select * queries on mongo joins

      Description

      select * on mongo joins gives improper results. Need to modify the schema handling logic in the case of 'select *' logic in MongoRecordReader.

      For example when we fire a below query on mongo.employee.`join1` table, the results are as below.

      SELECT * FROM mongo.employee.`join1` t1 JOIN mongo.employee.`join1` t2 ON t1.`employee_id` = t2.`employee_id`

      sample documents in mongo.employee.`join1` table:

      { "employee_id" : 1 , "first_name" : "Anil"} { "employee_id" : 2 , "first_name" : "Kamesh"}

      Results:

      { "employee_id" : 1 , "first_name" : "Anil"}	{ "employee_id" : 1 , "first_name" : "Anil"}
      { "employee_id" : 1 , "first_name" : "Anil"}	{ "employee_id" : 2 , "first_name" : "Kamesh"}
      { "employee_id" : 2 , "first_name" : "Kamesh"}	{ "employee_id" : 1 , "first_name" : "Anil"}
      { "employee_id" : 2 , "first_name" : "Kamesh"}	{ "employee_id" : 2 , "first_name" : "Kamesh"}
      

        Attachments

        1. 0001-Fixing-Mongo-join-issue-when-is-selected.patch
          9 kB
          Bhallamudi Venkata Siva Kamesh

          Issue Links

            Activity

              People

              • Assignee:
                parthc Parth Chandra
                Reporter:
                akumarb2010 B Anil Kumar
              • Votes:
                1 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: