Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-2394

Fix queries contaning fields names prefixed by a table name/alias

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: Qserv
    • Labels:

      Description

      Query:

      SELECT DISTINCT o1.objectId FROM Object o1 LIMIT 1
      

      fails with the following error:

      130 qserv@clrinfoport09:~/src/qserv (u/fjammes/DM-854)⟫ tail ~/qserv-run/git/var/log/qserv-czar.log 
      0325 10:30:04.014 [0x7f59b37fe700] INFO  root (build/rproc/InfileMerger.cc:307) - Merging w/CREATE TABLE qservResult.result_8184531634 SELECT DISTINCT o1.objectId FROM qservResult.result_8184531634_m LIMIT 1
      0325 10:30:04.030 [0x7f59b37fe700] ERROR root (build/rproc/InfileMerger.cc:359) - InfileMerger sql error: Error applying sql. Error 1054: Unknown column 'o1.objectId' in 'field list' Unable to execute query: CREATE TABLE qservResult.result_8184531634 SELECT DISTINCT o1.objectId FROM qservResult.result_8184531634_m LIMIT 1
       
      0325 10:30:04.030 [0x7f59b37fe700] INFO  root (build/rproc/InfileMerger.cc:313) - Cleaning up qservResult.result_8184531634_m
      0325 10:30:04.031 [0x7f59b37fe700] INFO  root (build/rproc/InfileMerger.cc:325) - Merged qservResult.result_8184531634_m into qservResult.result_8184531634
      0325 10:30:04.031 [0x7f59b37fe700] INFO  root (build/ccontrol/UserQuery.cc:202) - Joined everything (success)
      0325 10:30:04.032 [0x7f59b37fe700] INFO  root (app.py:408) - Query exec (2) took 0.141981 seconds
      0325 10:30:04.033 [0x7f59b37fe700] INFO  root (app.py:413) - Final state of all queries success
      Runner running job
      0325 10:30:04.039 [0x7f59b2ffd700] INFO  root (build/ccontrol/UserQuery.cc:235) - Discarded UserQuery(2)
      

        Attachments

          Issue Links

            Activity

            Hide
            fritzm Fritz Mueller added a comment -

            Checked with and still an issue in ANTLR4 parser

            Show
            fritzm Fritz Mueller added a comment - Checked with and still an issue in ANTLR4 parser
            Hide
            tjenness Tim Jenness added a comment -

            Four years later, is this still a problem?

            Show
            tjenness Tim Jenness added a comment - Four years later, is this still a problem?
            Hide
            fritzm Fritz Mueller added a comment -

            The was fixed some time ago with column alias rework

            Show
            fritzm Fritz Mueller added a comment - The was fixed some time ago with column alias rework

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              jammes Fabrice Jammes
              Watchers:
              Andy Salnikov, Fabrice Jammes, Fritz Mueller, Jacek Becla, John Gates, Nate Pease [X] (Inactive), Tim Jenness
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Jenkins

                  No builds found.