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

JSQLParser Version : 4.4 hql alter table can not be parsed #1524

Closed
Zhumin-lv-wn opened this issue May 1, 2022 · 3 comments
Closed

JSQLParser Version : 4.4 hql alter table can not be parsed #1524

Zhumin-lv-wn opened this issue May 1, 2022 · 3 comments

Comments

@Zhumin-lv-wn
Copy link
Contributor

SQL Example

  • Simplyfied Query Exmple, focusing on the failing feature
 ALTER TABLE tablename add column (field  string)

Software Information

  • JSqlParser version
  • Database (hive )
@manticore-projects
Copy link
Contributor

Greetings.

Thank you for your report. Unfortunately HIVE seems to prefer its own SQL dialect far away from the SQL Standard:

ALTER TABLE name ADD COLUMNS (col_spec[, col_spec ...])

Pay attention to the COLUMNS keyword.

Its not supported by JSQLParser and you would need to either send a PR or sponsor an implementation to make Hive support happening.

@manticore-projects
Copy link
Contributor

From https://www.ibm.com/analytics/hadoop/hive: "Hive enables SQL developers to write Hive Query Language (HQL) statements that are similar to standard SQL statements for data query and analysis."

Emphasis is on similar. I

Zhumin-lv-wn pushed a commit to Zhumin-lv-wn/JSqlParser that referenced this issue Jul 30, 2022
wumpz pushed a commit that referenced this issue Aug 3, 2022
…[, col_spec ...]) (#1605)

Co-authored-by: zhum@aotain.com <zm7705264>
manticore-projects added a commit to manticore-projects/JSqlParser that referenced this issue Aug 4, 2022
@Zhumin-lv-wn
Copy link
Contributor Author

Has been resolved

wumpz pushed a commit that referenced this issue Aug 14, 2022
* Adjust Gradle to JUnit 5

Parallel Test execution
Gradle Caching
Explicitly request for latest JavaCC 7.0.10

* Do not mark SpeedTest for concurrent execution

* Remove unused imports

* Adjust Gradle to JUnit 5

Parallel Test execution
Gradle Caching
Explicitly request for latest JavaCC 7.0.10

* Do not mark SpeedTest for concurrent execution

* Remove unused imports

* Fixes broken PR #1524 and Commit fb6e950
Zhumin-lv-wn pushed a commit to Zhumin-lv-wn/JSqlParser that referenced this issue Aug 18, 2022
…, name varchar, grass_date varchar) with (format=Parquet,PARTITIONED_BY=array[grass_date])
wumpz pushed a commit that referenced this issue Oct 25, 2022
* Enhanced Keywords

Add Keywords and document, which keywords are allowed for what purpose

* Fix incorrect tests

* Define Reserved Keywords explicitly
Derive All Keywords from Grammar directly
Generate production for Object Names (semi-) automatically
Add parametrized Keyword Tests

* Fix test resources

* Adjust Gradle to JUnit 5

Parallel Test execution
Gradle Caching
Explicitly request for latest JavaCC 7.0.10

* Do not mark SpeedTest for concurrent execution

* Remove unused imports

* Adjust Gradle to JUnit 5

Parallel Test execution
Gradle Caching
Explicitly request for latest JavaCC 7.0.10

* Do not mark SpeedTest for concurrent execution

* Remove unused imports

* Keyword test adopt JUnit5
Update keywords

* CheckStyle sanitation of method names

* Merge Master

* Add Jupiter Parameters dependency again

* Automate the `updateKeywords` Step

* Update PMD and rules

* Rewrite test expected to fail

* Appease Codacy

* Remove broken rule warning about perfectly fine switch-case statements

* Force Changes

* Fix Merge Issues

* Read Tokens directly from the Grammar File without invoking JTREE

- read Tokens per REGEX Matcher
- move Reserved Keywords from Grammar into ParserKeywordsUtils
- adjust the Tests

* Appease PMD/Codacy

* Extract the Keywords from the Grammar by using JTRee (instead of Regex)
Add some tests to ensure, that all Keywords or found

* Appease Codacy/PMD

* Separate UpdateKeywords Task again

Including it into compileJavacc won't work since it depends on compiling the ParserKeywordUtils.java

Single file compilation did not work

* Clean-up the imports

* Add JavaCC dependency to Maven for building ParserKeywordsUtils

* Add JavaCC dependency to Maven for building ParserKeywordsUtils

* Merge Upstream

* Merge Master

* Fixes broken PR #1524 and Commit fb6e950

* Add AST Visualization

Show the Statement's Java Objects in a tree hierarchy

* build: temporarily reduce the Code Coverage requirements

Temporarily reduce the Coverage checks regarding Minimum Coverage and Maximum Missed Lines in order to get the Keywords PR accepted. We should do a major Code cleanup afterwards.

* build:  JSQLParser is a build  dependency

* chore:  Update keywords

* feat: add line count to output
wumpz pushed a commit that referenced this issue Nov 2, 2022
* Enhanced Keywords

Add Keywords and document, which keywords are allowed for what purpose

* Fix incorrect tests

* Define Reserved Keywords explicitly
Derive All Keywords from Grammar directly
Generate production for Object Names (semi-) automatically
Add parametrized Keyword Tests

* Fix test resources

* Adjust Gradle to JUnit 5

Parallel Test execution
Gradle Caching
Explicitly request for latest JavaCC 7.0.10

* Do not mark SpeedTest for concurrent execution

* Remove unused imports

* Adjust Gradle to JUnit 5

Parallel Test execution
Gradle Caching
Explicitly request for latest JavaCC 7.0.10

* Do not mark SpeedTest for concurrent execution

* Remove unused imports

* Keyword test adopt JUnit5
Update keywords

* CheckStyle sanitation of method names

* Merge Master

* Add Jupiter Parameters dependency again

* Automate the `updateKeywords` Step

* Update PMD and rules

* Rewrite test expected to fail

* Appease Codacy

* Remove broken rule warning about perfectly fine switch-case statements

* Force Changes

* Fix Merge Issues

* Read Tokens directly from the Grammar File without invoking JTREE

- read Tokens per REGEX Matcher
- move Reserved Keywords from Grammar into ParserKeywordsUtils
- adjust the Tests

* Appease PMD/Codacy

* Extract the Keywords from the Grammar by using JTRee (instead of Regex)
Add some tests to ensure, that all Keywords or found

* Appease Codacy/PMD

* Separate UpdateKeywords Task again

Including it into compileJavacc won't work since it depends on compiling the ParserKeywordUtils.java

Single file compilation did not work

* Clean-up the imports

* Add JavaCC dependency to Maven for building ParserKeywordsUtils

* Add JavaCC dependency to Maven for building ParserKeywordsUtils

* Merge Upstream

* Merge Master

* Fixes broken PR #1524 and Commit fb6e950

* Add AST Visualization

Show the Statement's Java Objects in a tree hierarchy

* build: temporarily reduce the Code Coverage requirements

Temporarily reduce the Coverage checks regarding Minimum Coverage and Maximum Missed Lines in order to get the Keywords PR accepted. We should do a major Code cleanup afterwards.

* build:  JSQLParser is a build  dependency

* chore:  Update keywords

* feat: add line count to output

* Fix: updateKeywords to reflect new tokens

* test: Keywords enabled 2 more Special Oracle Tests

* build: add updateKeywords to the Maven Build

update/cleanup dependencies in Maven and Gradle
add EXEC plugin to Maven for updating white listed keywords in the Grammaer
wumpz added a commit that referenced this issue Jan 20, 2023
* Enhanced Keywords

Add Keywords and document, which keywords are allowed for what purpose

* Fix incorrect tests

* Define Reserved Keywords explicitly
Derive All Keywords from Grammar directly
Generate production for Object Names (semi-) automatically
Add parametrized Keyword Tests

* Fix test resources

* Adjust Gradle to JUnit 5

Parallel Test execution
Gradle Caching
Explicitly request for latest JavaCC 7.0.10

* Do not mark SpeedTest for concurrent execution

* Remove unused imports

* Adjust Gradle to JUnit 5

Parallel Test execution
Gradle Caching
Explicitly request for latest JavaCC 7.0.10

* Do not mark SpeedTest for concurrent execution

* Remove unused imports

* Keyword test adopt JUnit5
Update keywords

* CheckStyle sanitation of method names

* Merge Master

* Add Jupiter Parameters dependency again

* Automate the `updateKeywords` Step

* Update PMD and rules

* Rewrite test expected to fail

* Appease Codacy

* Remove broken rule warning about perfectly fine switch-case statements

* Force Changes

* Fix Merge Issues

* Read Tokens directly from the Grammar File without invoking JTREE

- read Tokens per REGEX Matcher
- move Reserved Keywords from Grammar into ParserKeywordsUtils
- adjust the Tests

* Appease PMD/Codacy

* Extract the Keywords from the Grammar by using JTRee (instead of Regex)
Add some tests to ensure, that all Keywords or found

* Appease Codacy/PMD

* Separate UpdateKeywords Task again

Including it into compileJavacc won't work since it depends on compiling the ParserKeywordUtils.java

Single file compilation did not work

* Clean-up the imports

* Add JavaCC dependency to Maven for building ParserKeywordsUtils

* Add JavaCC dependency to Maven for building ParserKeywordsUtils

* Merge Upstream

* Merge Master

* Fixes broken PR #1524 and Commit fb6e950

* Add AST Visualization

Show the Statement's Java Objects in a tree hierarchy

* Sphinx Documentation

Update the MANTICORE Sphinx Theme, but ignore it in GIT
Add the content to the Sphinx sites
Add a Gradle function to derive Stable and Snapshot version from GIT Tags
Add a Gradle GIT change task
Add a Gradle sphinx task
Add a special Test case for illustrating the use of JSQLParser

* test: Document an additional Special Oracle test success

* doc: ignore the autogenerated changelog.rst in GIT

* build: temporarily reduce the Code Coverage requirements

Temporarily reduce the Coverage checks regarding Minimum Coverage and Maximum Missed Lines in order to get the Keywords PR accepted. We should do a major Code cleanup afterwards.

* build: Clean-up the Gradle Build

Prefix the Sphinx Prolog Variables with JSQLPARSER in order to allow for build the Main Website for various projects
Remove some redundant version requests for PMD, CheckStyle and friends
Remove JUnit-4 dependency and add HarmCrest
Complete the PUBLISHING task

* doc: Explain the ``updateKeywords`` Gradle Task

* build: Un-escape the Unicode on the changelog file

* build: Un-escape the Unicode on the changelog file

* doc: Cleanup

Unescape unicode characters from Git Changelog
Remove obsolete code from Sphinx' conf.py

* doc: Properly un-escape the Git Commit message

* doc: request for `Conventional Commit` messages

* doc: correctly refer to `RelObjectNameWithoutValue()`

* build: upload the built files via Excec/SFTP

* doc: Add an example on Token White-listing

* doc: write the correct Git Repository

* doc: pronounce the OVERLAPS example more

* feat: make important Classes Serializable

Implement Serializable for persisting via ObjectOutputStream

* doc: Add the "How to Use" java code

* chore: Make Serializable

* fix: Non-serializable field in serializable class

* build: various fixes to the Maven build file

add the Keywords Documentation file to the task
exclude the Sphinx files from the license header plugin
fix the JavaDoc plugin options

* build: add the Keywords Documentation file to the task

* doc: add a page about actually Reserved Keywords

* build: avoid PMD/Codacy for Sphinx Documentation

* update Changelog

* build: Add Sphinx GitHub Action

Add a GitHub Action, which will
- Install Sphinx and Extensions
- Install Gradle Wrapper
- Run Gradle Wrapper Task `sphinx`
- Deploy the generated static HTML site to GH Pages

* fix: fix a merge error, brackets

* fix: remove JavaCC dependency

Parse Tokens via Regex
Move JavaCC Token Parser into the KeywordsTest
Make JavaCC a Test Dependency only

* doc: Fix Maven Artifact Version

* style: Avoid throwing raw exception types.

* style: Avoid throwing raw exception types.

* doc: Better integration of the RR diagrams

- apply neutral Sphinx theme
- insert the RR diagrams into the sphinx sources
- better documentation on Gradle dependencies
- link GitHub repository

* build: gradle, execute all Checks after Test

Co-authored-by: Tobias <t.warneke@gmx.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants