Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FORMATTING] Unable to parse Hive syntax: STRUCT<x: INT64, y:STRING> #735

Open
wupengjiang2024 opened this issue Apr 23, 2024 · 3 comments
Labels

Comments

@wupengjiang2024
Copy link

Input data

Which SQL and options did you provide as input?

STRUCT<x: INT64, y:STRING>

Expected Output

STRUCT<x: INT64, y:STRING>

Actual Output

ERROR: Parse error: Unexpected: STRING

Usage

  • How are you calling / using the library?
  • What SQL language(s) does this apply to?
  • Which SQL Formatter version are you using?
@wupengjiang2024 wupengjiang2024 changed the title [FORMATTING] Unable to parse Hive syntax: STRUCT<x: INT64, y:STRING>> [FORMATTING] Unable to parse Hive syntax: STRUCT<x: INT64, y:STRING> Apr 23, 2024
@nene
Copy link
Collaborator

nene commented Apr 23, 2024

You probably meant something like:

CREATE TABLE foo (
  col1 STRUCT<x: INT64, y:STRING>
)

At least that's how it's documented in Hive documentation.

@wupengjiang2024
Copy link
Author

yes,when I format the SQL like:
CREATE TABLE foo ( col1 STRUCT<x: INT64, y:STRING> )
It's will throw the error 'ERROR: Parse error: Unexpected: STRING'

@zhongzhifa
Copy link

I'm having this problem too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants