GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — LEFT JOIN bug · Issue #34 · JavaScriptor/js-sql-parser

LEFT JOIN bug #34

New issue
Copy link
New issue
Copy link
Closed
Closed
LEFT JOIN bug#34
Copy link
Labels
bug

Description

@enoch300
enoch300
opened on Apr 1, 2020
Issue body actions

你好!
在使用js-sql-parser时发现一个问题:
ast = sqlParser.parse("SELECT stime, A.names, B.names FROM (SELECT stime, names FROM iaas_data.iaas_d3c0d0681cc1900) AS A LEFT JOIN (SELECT stime, names FROM iaas_data.iaas_1071f89feaa0e100) AS B ON A.stime = B.stime")

sqlParser.stringify(ast) 结果:
SELECT stime, A.names, B.names FROM (SELECT stime, names FROM iaas_data.iaas_d3c0d0681cc1900) LEFT JOIN (SELECT stime, names FROM iaas_data.iaas_1071f89feaa0e100) ON A.stime = B.stime

问题:
sqlParser.stringify(ast)后的SQL 没有 AS A 和 AS B 导致SQL错误.

Activity

  1. enoch300
    changed the title [-]Bug[/-] [+]LEFT JOIN bug[/+] on Apr 1, 2020
  2. albin3
    added
    bug
    on Apr 2, 2020
  3. albin3
    added a commit that references this issue on Apr 2, 2020

    fix: #34

    This issue will close once commit 394e5cc is merged into the 'master' branch.
    394e5cc
  4. albin3
    closed this as completedin 394e5ccon Apr 2, 2020
  5. albin3
    added a commit that references this issue on Apr 2, 2020

    Merge pull request #35 from JavaScriptor/hotfix-tablefactor-alias

    This issue will close once commit d5de069 is merged into the 'master' branch.
    d5de069
  6. albin3 commented on Apr 2, 2020

    @albin3
    albin3
    on Apr 2, 2020
    Member
    More actions
    • [email protected] have been released to fix this.
  7. albin3 commented on Apr 2, 2020

    @albin3
    albin3
    on Apr 2, 2020
    Member
    More actions

    @enoch300 版本1.3.0修复了,多谢

  8. enoch300 commented on Apr 2, 2020

    @enoch300
    enoch300
    on Apr 2, 2020
    Author
    More actions

    @enoch300 版本1.3.0修复了,多谢

    不客气,很好用。后续有什么问题再给您反馈哈 ,感谢付出

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.