You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@kyuubi.apache.org by "waywtdcc (via GitHub)" <gi...@apache.org> on 2023/03/15 03:27:13 UTC

[GitHub] [kyuubi] waywtdcc opened a new pull request, #4517: [Flink engine]Fix bug in flink 1.14 version, multiple executions lead to abnormal results

waywtdcc opened a new pull request, #4517:
URL: https://github.com/apache/kyuubi/pull/4517

   Fix bug in flink 1.14 version, multiple executions lead to abnormal results
   
   <!--
   Thanks for sending a pull request!
   
   Here are some tips for you:
     1. If this is your first time, please read our contributor guidelines: https://kyuubi.readthedocs.io/en/latest/community/CONTRIBUTING.html
     2. If the PR is related to an issue in https://github.com/apache/kyuubi/issues, add '[KYUUBI #XXXX]' in your PR title, e.g., '[KYUUBI #XXXX] Your PR title ...'.
     3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][KYUUBI #XXXX] Your PR title ...'.
   -->
   
   ### _Why are the changes needed?_
   <!--
   Please clarify why the changes are needed. For instance,
     1. If you add a feature, you can talk about the use case of it.
     2. If you fix a bug, you can clarify why it is a bug.
   -->
   Fix bug in flink 1.14 version, multiple executions lead to abnormal results
   
   ### _How was this patch tested?_
   - [X] Add some test cases that check the changes thoroughly including negative and positive cases if possible
   
   - [X] Add screenshots for manual tests if appropriate
   
   - [X] [Run test](https://kyuubi.readthedocs.io/en/master/develop_tools/testing.html#running-tests) locally before make a pull request
   


-- 
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: notifications-unsubscribe@kyuubi.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [kyuubi] pan3793 commented on pull request #4517: [FLINK] Fix multiple executions lead to abnormal results on Flink 1.14

Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on PR #4517:
URL: https://github.com/apache/kyuubi/pull/4517#issuecomment-1475163388

   CI passed, and there is no logic change since @waywtdcc last commit.
   
   Thanks all, merged to master/1.7


-- 
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: notifications-unsubscribe@kyuubi.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [kyuubi] pan3793 commented on pull request #4517: [FLINK] Fix multiple executions lead to abnormal results on Flink 1.14

Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on PR #4517:
URL: https://github.com/apache/kyuubi/pull/4517#issuecomment-1469398038

   The CI reports
   ```
   [ERROR] Failed to execute goal org.scalastyle:scalastyle-maven-plugin:1.0.0:check (default-cli) on project kyuubi-flink-sql-engine_2.12: Failed during scalastyle execution: You have 7 Scalastyle violation(s). -> [Help 1]
   ```
   
   Unfortunately, scalastyle can not be fixed automatically


-- 
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: notifications-unsubscribe@kyuubi.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [kyuubi] pan3793 commented on pull request #4517: [FLINK] Fix multiple executions lead to abnormal results on Flink 1.14

Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on PR #4517:
URL: https://github.com/apache/kyuubi/pull/4517#issuecomment-1475166624

   @waywtdcc would you please link you email `chenchao4@grgbanking.com` to GitHub account? Otherwise your contribution will not be counted by GitHub


-- 
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: notifications-unsubscribe@kyuubi.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [kyuubi] pan3793 commented on a diff in pull request #4517: [Flink engine]Fix bug in flink 1.14 version, multiple executions lead to abnormal results

Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on code in PR #4517:
URL: https://github.com/apache/kyuubi/pull/4517#discussion_r1136498641


##########
externals/kyuubi-flink-sql-engine/src/main/java/org/apache/kyuubi/engine/flink/result/ResultSet.java:
##########
@@ -108,12 +108,32 @@ public String toString() {
         + '}';
   }
 
+  /**
+   * Before version 1.15, there were concurrency issues.

Review Comment:
   Could you please add a JIRA ticket in the comment? e.g.
   "Before FLINK-XXXX, there were concurrency issues, which affects Flink 1.14"



-- 
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: notifications-unsubscribe@kyuubi.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [kyuubi] pan3793 commented on a diff in pull request #4517: [FLINK] Fix multiple executions lead to abnormal results on Flink 1.14

Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on code in PR #4517:
URL: https://github.com/apache/kyuubi/pull/4517#discussion_r1136582182


##########
externals/kyuubi-flink-sql-engine/src/main/java/org/apache/kyuubi/engine/flink/result/ResultSet.java:
##########
@@ -49,6 +53,7 @@ public class ResultSet {
   // list of boolean in streaming mode,
   // true if the corresponding row is an append row, false if its a retract row
   private final List<Boolean> changeFlags;
+  public static boolean versionAtLeast15 = FlinkEngineUtils.isFlinkVersionAtLeast("1.15");

Review Comment:
   The following style should be clear enough.
   ```
   static import org.apache.kyuubi.engine.flink.FlinkEngineUtils.isFlinkVersionAtLeast
   
   if (isFlinkVersionAtLeast("1.15")) {
     ...
   } else {
     ...
   }
   ```



-- 
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: notifications-unsubscribe@kyuubi.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [kyuubi] pan3793 commented on a diff in pull request #4517: [Flink engine]Fix bug in flink 1.14 version, multiple executions lead to abnormal results

Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on code in PR #4517:
URL: https://github.com/apache/kyuubi/pull/4517#discussion_r1136497848


##########
externals/kyuubi-flink-sql-engine/src/main/java/org/apache/kyuubi/engine/flink/result/ResultSet.java:
##########
@@ -108,12 +108,32 @@ public String toString() {
         + '}';
   }
 
+  /**
+   * Before version 1.15, there were concurrency issues.
+   *
+   * @return
+   */
+  public static TableResult createResultOK() {
+    TableResult result =
+        TableResultImpl.builder()
+            .resultKind(ResultKind.SUCCESS)
+            .schema(ResolvedSchema.of(Column.physical("result", DataTypes.STRING())))
+            .data(Collections.singletonList(Row.of("OK")))
+            .build();
+    return result;
+  }
+
   public static ResultSet fromTableResult(TableResult tableResult) {
+    boolean flinkVersionAtLeast = FlinkEngineUtils.isFlinkVersionAtLeast("1.15");

Review Comment:
   if there is no reuse case, it's better to inline the variables and functions



-- 
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: notifications-unsubscribe@kyuubi.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [kyuubi] codecov-commenter commented on pull request #4517: [FLINK] Fix multiple executions lead to abnormal results on Flink 1.14

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #4517:
URL: https://github.com/apache/kyuubi/pull/4517#issuecomment-1469399602

   ## [Codecov](https://codecov.io/gh/apache/kyuubi/pull/4517?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#4517](https://codecov.io/gh/apache/kyuubi/pull/4517?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (d63ec55) into [master](https://codecov.io/gh/apache/kyuubi/commit/b23c87c318a67445abb65252e547844471a65b3d?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (b23c87c) will **decrease** coverage by `0.02%`.
   > The diff coverage is `n/a`.
   
   > :exclamation: Current head d63ec55 differs from pull request most recent head 954d760. Consider uploading reports for the commit 954d760 to get more accurate results
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #4517      +/-   ##
   ============================================
   - Coverage     53.37%   53.36%   -0.02%     
     Complexity       13       13              
   ============================================
     Files           571      571              
     Lines         31323    31333      +10     
     Branches       4223     4223              
   ============================================
   + Hits          16720    16721       +1     
   - Misses        13026    13032       +6     
   - Partials       1577     1580       +3     
   ```
   
   
   [see 13 files with indirect coverage changes](https://codecov.io/gh/apache/kyuubi/pull/4517/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   


-- 
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: notifications-unsubscribe@kyuubi.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [kyuubi] pan3793 commented on a diff in pull request #4517: [FLINK] Fix multiple executions lead to abnormal results on Flink 1.14

Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on code in PR #4517:
URL: https://github.com/apache/kyuubi/pull/4517#discussion_r1136575060


##########
externals/kyuubi-flink-sql-engine/src/main/java/org/apache/kyuubi/engine/flink/result/ResultSet.java:
##########
@@ -108,7 +113,26 @@ public String toString() {
         + '}';
   }
 
+  /**
+   * Before version 1.15(FLINK-25558), there were concurrency issues.
+   *
+   * @return TableResult.
+   */
+  public static TableResult createResultOk() {

Review Comment:
   please inline this function and comments



-- 
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: notifications-unsubscribe@kyuubi.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [kyuubi] pan3793 commented on pull request #4517: [FLINK] Fix multiple executions lead to abnormal results on Flink 1.14

Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on PR #4517:
URL: https://github.com/apache/kyuubi/pull/4517#issuecomment-1473580946

   > ... `FlinkEngineUtils` is not found
   
   Maybe caused by mixed-using Java/Scala
   
   


-- 
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: notifications-unsubscribe@kyuubi.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [kyuubi] pan3793 commented on pull request #4517: [FLINK] Fix multiple executions lead to abnormal results on Flink 1.14

Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on PR #4517:
URL: https://github.com/apache/kyuubi/pull/4517#issuecomment-1474860561

   To get out of the compile issue cause by Java/Scala mix reference, I migrate the Java code to Scala code, and improved the code by using `Dyn*` reflection tool, the change passed in local test, it suppose to pass the CI cross version verification, let wait for CI results.


-- 
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: notifications-unsubscribe@kyuubi.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [kyuubi] link3280 commented on a diff in pull request #4517: [FLINK] Fix multiple executions lead to abnormal results on Flink 1.14

Posted by "link3280 (via GitHub)" <gi...@apache.org>.
link3280 commented on code in PR #4517:
URL: https://github.com/apache/kyuubi/pull/4517#discussion_r1136541281


##########
externals/kyuubi-flink-sql-engine/src/main/java/org/apache/kyuubi/engine/flink/result/ResultSet.java:
##########
@@ -108,12 +108,32 @@ public String toString() {
         + '}';
   }
 
+  /**
+   * Before version 1.15, there were concurrency issues.
+   *
+   * @return

Review Comment:
   Please update the javadoc.



##########
externals/kyuubi-flink-sql-engine/src/test/scala/org/apache/kyuubi/engine/flink/operation/FlinkOperationSuite.scala:
##########
@@ -17,27 +17,25 @@
 
 package org.apache.kyuubi.engine.flink.operation
 
-import java.sql.DatabaseMetaData
-import java.util.UUID
-
-import scala.collection.JavaConverters._
-
 import org.apache.flink.api.common.JobID
 import org.apache.flink.table.types.logical.LogicalTypeRoot
 import org.apache.hive.service.rpc.thrift._
-import org.scalatest.concurrent.PatienceConfiguration.Timeout
-import org.scalatest.time.SpanSugar._
-
 import org.apache.kyuubi.Utils
 import org.apache.kyuubi.config.KyuubiConf._
 import org.apache.kyuubi.engine.flink.FlinkEngineUtils._
 import org.apache.kyuubi.engine.flink.WithFlinkSQLEngine
 import org.apache.kyuubi.engine.flink.result.Constants
 import org.apache.kyuubi.engine.flink.util.TestUserClassLoaderJar
 import org.apache.kyuubi.jdbc.hive.KyuubiStatement
-import org.apache.kyuubi.operation.{HiveJDBCTestHelper, NoneMode}
 import org.apache.kyuubi.operation.meta.ResultSetSchemaConstant._
+import org.apache.kyuubi.operation.{HiveJDBCTestHelper, NoneMode}
 import org.apache.kyuubi.service.ServiceState._
+import org.scalatest.concurrent.PatienceConfiguration.Timeout
+import org.scalatest.time.SpanSugar._
+
+import java.sql.DatabaseMetaData

Review Comment:
   Please remove unused imports



-- 
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: notifications-unsubscribe@kyuubi.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [kyuubi] waywtdcc commented on pull request #4517: [FLINK] Fix multiple executions lead to abnormal results on Flink 1.14

Posted by "waywtdcc (via GitHub)" <gi...@apache.org>.
waywtdcc commented on PR #4517:
URL: https://github.com/apache/kyuubi/pull/4517#issuecomment-1469387892

   > dev/reformat
   
   Does kyuubi have check style xml? On my side, I passed mvn spotless:apply
   verify


-- 
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: notifications-unsubscribe@kyuubi.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [kyuubi] pan3793 commented on pull request #4517: [FLINK] Fix multiple executions lead to abnormal results on Flink 1.14

Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on PR #4517:
URL: https://github.com/apache/kyuubi/pull/4517#issuecomment-1469268922

   @waywtdcc thanks for digging out, left some general comments, and please run `dev/reformat` to quickly fix the style issue. cc @link3280 as he is the Flink expert.


-- 
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: notifications-unsubscribe@kyuubi.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [kyuubi] pan3793 closed pull request #4517: [FLINK] Fix multiple executions lead to abnormal results on Flink 1.14

Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 closed pull request #4517: [FLINK] Fix multiple executions lead to abnormal results on Flink 1.14
URL: https://github.com/apache/kyuubi/pull/4517


-- 
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: notifications-unsubscribe@kyuubi.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [kyuubi] pan3793 commented on a diff in pull request #4517: [FLINK] Fix multiple executions lead to abnormal results on Flink 1.14

Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on code in PR #4517:
URL: https://github.com/apache/kyuubi/pull/4517#discussion_r1136577519


##########
externals/kyuubi-flink-sql-engine/src/main/java/org/apache/kyuubi/engine/flink/result/ResultSet.java:
##########
@@ -49,6 +53,7 @@ public class ResultSet {
   // list of boolean in streaming mode,
   // true if the corresponding row is an append row, false if its a retract row
   private final List<Boolean> changeFlags;
+  public static boolean versionAtLeast15 = FlinkEngineUtils.isFlinkVersionAtLeast("1.15");

Review Comment:
   Pullout everything to the field is not a good practice. If logic/variables are not complex and not used multi times, please keep them inline and in local scope.



-- 
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: notifications-unsubscribe@kyuubi.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [kyuubi] waywtdcc commented on a diff in pull request #4517: [FLINK] Fix multiple executions lead to abnormal results on Flink 1.14

Posted by "waywtdcc (via GitHub)" <gi...@apache.org>.
waywtdcc commented on code in PR #4517:
URL: https://github.com/apache/kyuubi/pull/4517#discussion_r1136580542


##########
externals/kyuubi-flink-sql-engine/src/main/java/org/apache/kyuubi/engine/flink/result/ResultSet.java:
##########
@@ -49,6 +53,7 @@ public class ResultSet {
   // list of boolean in streaming mode,
   // true if the corresponding row is an append row, false if its a retract row
   private final List<Boolean> changeFlags;
+  public static boolean versionAtLeast15 = FlinkEngineUtils.isFlinkVersionAtLeast("1.15");

Review Comment:
   Then restore the original and put it in the fromTableResult method?



-- 
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: notifications-unsubscribe@kyuubi.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [kyuubi] link3280 commented on pull request #4517: [FLINK] Fix multiple executions lead to abnormal results on Flink 1.14

Posted by "link3280 (via GitHub)" <gi...@apache.org>.
link3280 commented on PR #4517:
URL: https://github.com/apache/kyuubi/pull/4517#issuecomment-1472990818

   @waywtdcc Please fix the CI issue first. 
   
   This issue looks weird to me. `FlinkEngineUtils` not found. @pan3793 Do you have any clue?


-- 
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: notifications-unsubscribe@kyuubi.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [kyuubi] link3280 commented on a diff in pull request #4517: [FLINK] Fix multiple executions lead to abnormal results on Flink 1.14

Posted by "link3280 (via GitHub)" <gi...@apache.org>.
link3280 commented on code in PR #4517:
URL: https://github.com/apache/kyuubi/pull/4517#discussion_r1136541281


##########
externals/kyuubi-flink-sql-engine/src/main/java/org/apache/kyuubi/engine/flink/result/ResultSet.java:
##########
@@ -108,12 +108,32 @@ public String toString() {
         + '}';
   }
 
+  /**
+   * Before version 1.15, there were concurrency issues.
+   *
+   * @return

Review Comment:
   Please update the Javadoc to describe what's retuned or remove the return annotation.



-- 
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: notifications-unsubscribe@kyuubi.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [kyuubi] pan3793 commented on a diff in pull request #4517: [FLINK] Fix multiple executions lead to abnormal results on Flink 1.14

Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on code in PR #4517:
URL: https://github.com/apache/kyuubi/pull/4517#discussion_r1136577519


##########
externals/kyuubi-flink-sql-engine/src/main/java/org/apache/kyuubi/engine/flink/result/ResultSet.java:
##########
@@ -49,6 +53,7 @@ public class ResultSet {
   // list of boolean in streaming mode,
   // true if the corresponding row is an append row, false if its a retract row
   private final List<Boolean> changeFlags;
+  public static boolean versionAtLeast15 = FlinkEngineUtils.isFlinkVersionAtLeast("1.15");

Review Comment:
   Pullout everything as fields is not a good practice. If logic/variables are not complex and not used multi times, please keep them inline and in local scope.



-- 
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: notifications-unsubscribe@kyuubi.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [kyuubi] pan3793 commented on a diff in pull request #4517: [FLINK] Fix multiple executions lead to abnormal results on Flink 1.14

Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on code in PR #4517:
URL: https://github.com/apache/kyuubi/pull/4517#discussion_r1136577519


##########
externals/kyuubi-flink-sql-engine/src/main/java/org/apache/kyuubi/engine/flink/result/ResultSet.java:
##########
@@ -49,6 +53,7 @@ public class ResultSet {
   // list of boolean in streaming mode,
   // true if the corresponding row is an append row, false if its a retract row
   private final List<Boolean> changeFlags;
+  public static boolean versionAtLeast15 = FlinkEngineUtils.isFlinkVersionAtLeast("1.15");

Review Comment:
   Pullout everything to the field is not a good practice. If logic/variables are not complex and not used multi times, please keep them inline and local scope.



-- 
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: notifications-unsubscribe@kyuubi.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org