Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-851

Add original SQL string as a field in the parser

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.5.0
    • Component/s: None
    • Labels:
      None

      Description

      Add the SQL string to the parser. This will be useful for CREATE VIEW, for instance, which needs to access the original SQL (including comments and formatting) rather than just the AST.

      It could be a field "protected final String originalSql;" in SqlParserImpl.

        Activity

        Hide
        julianhyde Julian Hyde added a comment -

        I have checked a fix, with new methods SqlAbstractParserImpl.getOriginalSql and setOriginalSql, into https://github.com/julianhyde/incubator-calcite/tree/new-master; will merge into apache master after release 1.4.

        Maryann Xue, you can use this for your work on CREATE VIEW in PHOENIX-1706.

        Show
        julianhyde Julian Hyde added a comment - I have checked a fix, with new methods SqlAbstractParserImpl.getOriginalSql and setOriginalSql, into https://github.com/julianhyde/incubator-calcite/tree/new-master ; will merge into apache master after release 1.4. Maryann Xue , you can use this for your work on CREATE VIEW in PHOENIX-1706 .
        Hide
        maryannxue Maryann Xue added a comment -

        Thanks, Julian! And I'll commit the changes you made in Phoenix yesterday.

        Show
        maryannxue Maryann Xue added a comment - Thanks, Julian! And I'll commit the changes you made in Phoenix yesterday.
        Show
        julianhyde Julian Hyde added a comment - Fixed in http://git-wip-us.apache.org/repos/asf/incubator-calcite/commit/39487512 .
        Hide
        jcamachorodriguez Jesus Camacho Rodriguez added a comment -

        Resolved in release 1.5.0 (2015-11-10)

        Show
        jcamachorodriguez Jesus Camacho Rodriguez added a comment - Resolved in release 1.5.0 (2015-11-10)

          People

          • Assignee:
            julianhyde Julian Hyde
            Reporter:
            julianhyde Julian Hyde
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development