GitHub user weiqingy opened a pull request:
https://github.com/apache/samza/pull/654
SAMZA-1901: Implementation of Samza SQL Shell
## What changes were proposed in this pull request?
This PR includes two parts:
- Current DSL converter does not support Sql query, which means Samza Sql
Console or Samza Sql shell can not run SELECT query. The reason is
"log.outputStream" does not have schema while Calcite ask for its schema when
Calcite do validation for the Sql statement (we only passed selectQuery to
Calcite before, but now we pass the whole sql to Calcite). Also, it seems
"log.outputStream" does not work with ModifyTranslator. So this PR made the
changes shown in [this
commit](https://github.com/weiqingy/samza/commit/2268334f43d5b2f08ebc5804d051733e6598e8cf).
We may need to make a better fix for this issue later.
- Implementation of Samza SQL shell.
## How was this patch tested?
1. Add unit tests
2. Run the shell with use cases mentioned in the attached document under
https://issues.apache.org/jira/browse/SAMZA-1901
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/weiqingy/samza samza-shell
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/samza/pull/654.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #654
----
commit fb3026d2f11231796cef7a89489b673497545a23
Author: Weiqing Yang <yangweiqing001@...>
Date: 2018-09-21T07:11:43Z
Add samza-sql-shell
commit c54a4dbd4155e546005603686784eb703b9a671f
Author: Weiqing Yang <yangweiqing001@...>
Date: 2018-09-21T17:07:51Z
Small change
commit 24f9964c1045e1baa0abb4605bc2b3378fec6f8e
Author: Weiqing Yang <yangweiqing001@...>
Date: 2018-09-21T18:31:57Z
Small change
commit a388d7f865770aede4c9afdfe31071b35fd81761
Author: Weiqing Yang <yangweiqing001@...>
Date: 2018-09-21T21:17:42Z
change log4j log folder
commit 5fd2aff3ba51e388fd086f6fb87ae135015d18e7
Author: Weiqing Yang <yangweiqing001@...>
Date: 2018-09-21T21:56:09Z
clean code
commit 2268334f43d5b2f08ebc5804d051733e6598e8cf
Author: Weiqing Yang <yangweiqing001@...>
Date: 2018-09-22T22:01:51Z
make DSL converter work when sql is a query
commit 1d513ae428284d4af04a3468322dcb341508e541
Author: Weiqing Yang <yangweiqing001@...>
Date: 2018-09-23T05:48:10Z
support config file
commit 4710235ef479efce52d7814e592245762f2e8cbc
Author: Weiqing Yang <yangweiqing001@...>
Date: 2018-09-23T06:08:36Z
remove unused function
commit cf02afec8eb8ffc90600b88b9276b10ab71c6125
Author: Weiqing Yang <yangweiqing001@...>
Date: 2018-09-23T06:26:15Z
fix warnings
commit f091a2ac09120d7c00059b09833c42aa5d17edbf
Author: Weiqing Yang <yangweiqing001@...>
Date: 2018-09-23T07:50:27Z
fix bug in main
commit 4137e6044c06e21c21df5e51d5dd36c1ca960843
Author: Weiqing Yang <yangweiqing001@...>
Date: 2018-09-23T07:59:26Z
Merge branch 'samza-shell' of https://github.com/weiqingy/samza into
samza-shell-dev
commit 584d25382032f8ef03938e405df1dc7a5ee2ffb3
Author: Weiqing Yang <yangweiqing001@...>
Date: 2018-09-23T09:30:38Z
update command of executing Sql file
commit 5635fa8d3024d06fd2a6ed6ccbe61427cf0e80d7
Author: Weiqing Yang <yangweiqing001@...>
Date: 2018-09-24T07:15:04Z
update SamzaExecutor and add tests
----
---