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

select * on mongo join returns invalid results

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.6.0
    • 0.8.0
    • Storage - MongoDB
    • None
    • 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

              parthc Parth Chandra
              akumarb2010 AnilKumar B
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: