You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "luoyuxia (via GitHub)" <gi...@apache.org> on 2023/03/06 12:22:11 UTC

[GitHub] [flink] luoyuxia opened a new pull request, #22106: [FLINK-30659][hive] Drop flink-sql-parser-hive module

luoyuxia opened a new pull request, #22106:
URL: https://github.com/apache/flink/pull/22106

   <!--
   *Thank you very much for contributing to Apache Flink - we are happy that you want to help us improve Flink. To help the community review your contribution in the best possible way, please go through the checklist below, which will get the contribution into a shape in which it can be best reviewed.*
   
   *Please understand that we do not do this to make contributions to Flink a hassle. In order to uphold a high standard of quality for code contributions, while at the same time managing a large number of contributions, we need contributors to prepare the contributions well, and give reviewers enough contextual information for the review. Please also understand that contributions that do not follow this guide will take longer to review and thus typically be picked up with lower priority by the community.*
   
   ## Contribution Checklist
   
     - Make sure that the pull request corresponds to a [JIRA issue](https://issues.apache.org/jira/projects/FLINK/issues). Exceptions are made for typos in JavaDoc or documentation files, which need no JIRA issue.
     
     - Name the pull request in the form "[FLINK-XXXX] [component] Title of the pull request", where *FLINK-XXXX* should be replaced by the actual issue number. Skip *component* if you are unsure about which is the best component.
     Typo fixes that have no associated JIRA issue should be named following this pattern: `[hotfix] [docs] Fix typo in event time introduction` or `[hotfix] [javadocs] Expand JavaDoc for PuncuatedWatermarkGenerator`.
   
     - Fill out the template below to describe the changes contributed by the pull request. That will give reviewers the context they need to do the review.
     
     - Make sure that the change passes the automated tests, i.e., `mvn clean verify` passes. You can set up Azure Pipelines CI to do that following [this guide](https://cwiki.apache.org/confluence/display/FLINK/Azure+Pipelines#AzurePipelines-Tutorial:SettingupAzurePipelinesforaforkoftheFlinkrepository).
   
     - Each pull request should address only one issue, not mix up code from multiple issues.
     
     - Each commit in the pull request has a meaningful commit message (including the JIRA id)
   
     - Once all items of the checklist are addressed, remove the above text and this checklist, leaving only the filled out template below.
   
   
   **(The sections below can be removed for hotfixes of typos)**
   -->
   
   ## What is the purpose of the change
   The pr is to drop `flink-sql-parser-hive` module as it's not used any more.
   
   
   ## Brief change log
   - Delete the module `flink-sql-parser-hive`
   - Adjust the logic related to hive in flink-table-planner
   - Move the constants from `flink-sql-parser-hive` to `flink-connector-hive`
   
   
   ## Verifying this change
   This change is already covered by existing tests
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): (yes / **no**)
     - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (yes / **no**)
     - The serializers: (yes / **no** / don't know)
     - The runtime per-record code paths (performance sensitive): (yes / **no** / don't know)
     - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (yes / **no** / don't know)
     - The S3 file system connector: (yes / **no** / don't know)
   
   ## Documentation
   
     - Does this pull request introduce a new feature? (yes / **no**)
     - If yes, how is the feature documented? (not applicable / docs / JavaDocs / **not documented**)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] flinkbot commented on pull request #22106: [FLINK-30659][hive] Drop flink-sql-parser-hive module

Posted by "flinkbot (via GitHub)" <gi...@apache.org>.
flinkbot commented on PR #22106:
URL: https://github.com/apache/flink/pull/22106#issuecomment-1456045109

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "d80d3c08ba3fde5d777bbae365bb776c2b850d88",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "d80d3c08ba3fde5d777bbae365bb776c2b850d88",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * d80d3c08ba3fde5d777bbae365bb776c2b850d88 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] luoyuxia commented on a diff in pull request #22106: [FLINK-30659][hive] Drop flink-sql-parser-hive module

Posted by "luoyuxia (via GitHub)" <gi...@apache.org>.
luoyuxia commented on code in PR #22106:
URL: https://github.com/apache/flink/pull/22106#discussion_r1127448535


##########
flink-connectors/flink-connector-hive/src/test/java/org/apache/flink/connectors/hive/HiveDialectITCase.java:
##########
@@ -372,7 +371,7 @@ public void testInsert() throws Exception {
         assertThat(results.toString())
                 .isEqualTo(
                         "[+I[1, 0, static], +I[1, 1, a], +I[2, 0, static], +I[2, 1, b], +I[3, 0, static], +I[3, 1, c]]");
-        tableEnv.executeSql("insert overwrite dest2 partition (p1,p2) select 1,x,y from src")
+        tableEnv.executeSql("insert overwrite table dest2 partition (p1,p2) select 1,x,y from src")

Review Comment:
   Actually, `insert overwrite dest2 partition` is not supported in Hive dialect. We need to change it to `insert overwrite table dest2 partition`.
   The origin code will fall back to the parser  implemented in  flink-sql-parser which is not what we expect.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] luoyuxia commented on a diff in pull request #22106: [FLINK-30659][hive] Drop flink-sql-parser-hive module

Posted by "luoyuxia (via GitHub)" <gi...@apache.org>.
luoyuxia commented on code in PR #22106:
URL: https://github.com/apache/flink/pull/22106#discussion_r1127443511


##########
flink-connectors/flink-connector-hive/src/test/resources/endpoint/select.q:
##########
@@ -47,7 +47,7 @@ CREATE TABLE hive_types_table (
     f7 DECIMAL(20, 8),
     f8 STRING,
     f9 VARCHAR(20),
-    f10 TIMESTAMP(9),
+    f10 TIMESTAMP,

Review Comment:
   Hive dialect doesn't support `TIMESTAMP(9)`. The origin code will fall to Flink default parser which  is not what we expect.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] Aitozi commented on a diff in pull request #22106: [FLINK-30659][hive] Drop flink-sql-parser-hive module

Posted by "Aitozi (via GitHub)" <gi...@apache.org>.
Aitozi commented on code in PR #22106:
URL: https://github.com/apache/flink/pull/22106#discussion_r1127754834


##########
flink-table/flink-sql-parser/src/main/java/org/apache/flink/sql/parser/validate/FlinkSqlConformance.java:
##########
@@ -60,24 +54,12 @@ public boolean isHavingAlias() {
 
     @Override
     public boolean isSortByOrdinal() {
-        switch (this) {
-            case DEFAULT:
-            case HIVE:
-                return true;
-            default:
-                return false;
-        }
+        return false;
     }
 
     @Override
     public boolean isSortByAlias() {
-        switch (this) {
-            case DEFAULT:
-            case HIVE:
-                return true;
-            default:
-                return false;
-        }
+        return false;

Review Comment:
   this should be true?



##########
flink-table/flink-sql-parser/src/main/java/org/apache/flink/sql/parser/validate/FlinkSqlConformance.java:
##########
@@ -60,24 +54,12 @@ public boolean isHavingAlias() {
 
     @Override
     public boolean isSortByOrdinal() {
-        switch (this) {
-            case DEFAULT:
-            case HIVE:
-                return true;
-            default:
-                return false;
-        }
+        return false;

Review Comment:
   this should be true?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] luoyuxia commented on a diff in pull request #22106: [FLINK-30659][hive] Drop flink-sql-parser-hive module

Posted by "luoyuxia (via GitHub)" <gi...@apache.org>.
luoyuxia commented on code in PR #22106:
URL: https://github.com/apache/flink/pull/22106#discussion_r1133025171


##########
flink-table/flink-sql-parser/src/main/java/org/apache/flink/sql/parser/validate/FlinkSqlConformance.java:
##########
@@ -60,24 +54,12 @@ public boolean isHavingAlias() {
 
     @Override
     public boolean isSortByOrdinal() {
-        switch (this) {
-            case DEFAULT:
-            case HIVE:
-                return true;
-            default:
-                return false;
-        }
+        return false;
     }
 
     @Override
     public boolean isSortByAlias() {
-        switch (this) {
-            case DEFAULT:
-            case HIVE:
-                return true;
-            default:
-                return false;
-        }
+        return false;

Review Comment:
   Good catch!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] luoyuxia commented on pull request #22106: [FLINK-30659][hive] Drop flink-sql-parser-hive module

Posted by "luoyuxia (via GitHub)" <gi...@apache.org>.
luoyuxia commented on PR #22106:
URL: https://github.com/apache/flink/pull/22106#issuecomment-1464817133

   @Aitozi Thanks for your reviewing. I have fixed your comments. PTAL again.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] luoyuxia commented on pull request #22106: [FLINK-30659][hive] Drop flink-sql-parser-hive module

Posted by "luoyuxia (via GitHub)" <gi...@apache.org>.
luoyuxia commented on PR #22106:
URL: https://github.com/apache/flink/pull/22106#issuecomment-1465399999

   Merging....


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] luoyuxia merged pull request #22106: [FLINK-30659][hive] Drop flink-sql-parser-hive module

Posted by "luoyuxia (via GitHub)" <gi...@apache.org>.
luoyuxia merged PR #22106:
URL: https://github.com/apache/flink/pull/22106


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org