Skip to content

CONVERT() - data type is wrongfully parsed as a column #644

Description

@wheredevel
SELECT CONVERT(int, a) FROM A

Actual Behavior

int - Column

Expected Behavior

int - ColDataType

Steps to Reproduce the Problem

Specifications

Note

This is fixed and PR pending.

Activity

  1. wumpz commented on Jul 15, 2018

    @wumpz
    Member

    I would say it's by design. Jsqlparser is only a parser and cannot differ between column, identifier, typename, ... Why not leave it like it is and do the semantics later. Maybe we should rename Column to DBidentifier.

  2. wumpz commented on Jul 15, 2018

    @wumpz
    Member

    It is the special definition of the convert function that could be very different on other dB systems.

  3. wheredevel commented on Jul 16, 2018

    @wheredevel
    Author

    Well, if we had a way to indicate the dialect the parser ahead - that would solve it.
    For now, we just need it to parse this MSSQL dialect properly. (MySQL's is similar.)
    So, we implemented this.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions