You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kyuubi.apache.org by GitBox <gi...@apache.org> on 2021/10/20 10:29:47 UTC

[GitHub] [incubator-kyuubi] ulysses-you opened a new pull request #1268: Simplify extension code with Spark3.2 and Spark3.1 by unify zorder code

ulysses-you opened a new pull request #1268:
URL: https://github.com/apache/incubator-kyuubi/pull/1268


   <!--
   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/contributions.html
     2. If the PR is related to an issue in https://github.com/apache/incubator-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.
   -->
   Reduce file and code size to help maintain the extension.
   
   ### _How was this patch tested?_
   - [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible
   
   - [ ] Add screenshots for manual tests if appropriate
   
   - [ ] [Run test](https://kyuubi.readthedocs.io/en/latest/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: commits-unsubscribe@kyuubi.apache.org

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



[GitHub] [incubator-kyuubi] ulysses-you closed pull request #1268: Simplify extension code with Spark3.2 and Spark3.1 by unify zorder code

Posted by GitBox <gi...@apache.org>.
ulysses-you closed pull request #1268:
URL: https://github.com/apache/incubator-kyuubi/pull/1268


   


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

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



[GitHub] [incubator-kyuubi] codecov-commenter commented on pull request #1268: Simplify extension code with Spark3.2 and Spark3.1 by unify zorder code

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #1268:
URL: https://github.com/apache/incubator-kyuubi/pull/1268#issuecomment-947636606


   # [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1268?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 [#1268](https://codecov.io/gh/apache/incubator-kyuubi/pull/1268?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0eeb716) into [master](https://codecov.io/gh/apache/incubator-kyuubi/commit/48f8d292d6af32992ffb7c0fc56cfea1f60eaf6a?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (48f8d29) will **increase** coverage by `5.19%`.
   > The diff coverage is `72.97%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-kyuubi/pull/1268/graphs/tree.svg?width=650&height=150&src=pr&token=925D4tb9AH&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/incubator-kyuubi/pull/1268?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #1268      +/-   ##
   ============================================
   + Coverage     73.09%   78.28%   +5.19%     
   - Complexity       41      110      +69     
   ============================================
     Files           175      176       +1     
     Lines          6849     6886      +37     
     Branches        835      843       +8     
   ============================================
   + Hits           5006     5391     +385     
   + Misses         1442     1037     -405     
   - Partials        401      458      +57     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-kyuubi/pull/1268?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...cala/org/apache/kyuubi/sql/zorder/ZorderBase.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1268/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZGV2L2t5dXViaS1leHRlbnNpb24tc3BhcmstY29tbW9uL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL3NxbC96b3JkZXIvWm9yZGVyQmFzZS5zY2FsYQ==) | `85.00% <0.00%> (+85.00%)` | :arrow_up: |
   | [...yuubi/sql/zorder/OptimizeZorderStatementBase.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1268/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZGV2L2t5dXViaS1leHRlbnNpb24tc3BhcmstY29tbW9uL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL3NxbC96b3JkZXIvT3B0aW1pemVab3JkZXJTdGF0ZW1lbnRCYXNlLnNjYWxh) | `71.42% <50.00%> (+71.42%)` | :arrow_up: |
   | [...g/apache/kyuubi/sql/zorder/ResolveZorderBase.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1268/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZGV2L2t5dXViaS1leHRlbnNpb24tc3BhcmstY29tbW9uL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL3NxbC96b3JkZXIvUmVzb2x2ZVpvcmRlckJhc2Uuc2NhbGE=) | `69.56% <50.00%> (+69.56%)` | :arrow_up: |
   | [.../kyuubi/sql/zorder/OptimizeZorderCommandBase.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1268/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZGV2L2t5dXViaS1leHRlbnNpb24tc3BhcmstY29tbW9uL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL3NxbC96b3JkZXIvT3B0aW1pemVab3JkZXJDb21tYW5kQmFzZS5zY2FsYQ==) | `77.27% <60.00%> (+77.27%)` | :arrow_up: |
   | [...ubi/sql/zorder/InsertZorderBeforeWritingBase.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1268/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZGV2L2t5dXViaS1leHRlbnNpb24tc3BhcmstY29tbW9uL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL3NxbC96b3JkZXIvSW5zZXJ0Wm9yZGVyQmVmb3JlV3JpdGluZ0Jhc2Uuc2NhbGE=) | `82.27% <66.66%> (+82.27%)` | :arrow_up: |
   | [...che/kyuubi/sql/KyuubiSparkSQLCommonExtension.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1268/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZGV2L2t5dXViaS1leHRlbnNpb24tc3BhcmstY29tbW9uL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL3NxbC9LeXV1YmlTcGFya1NRTENvbW1vbkV4dGVuc2lvbi5zY2FsYQ==) | `90.90% <90.90%> (ø)` | |
   | [...ql/zorder/ZorderSparkSqlExtensionsParserBase.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1268/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZGV2L2t5dXViaS1leHRlbnNpb24tc3BhcmstY29tbW9uL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL3NxbC96b3JkZXIvWm9yZGVyU3BhcmtTcWxFeHRlbnNpb25zUGFyc2VyQmFzZS5zY2FsYQ==) | `72.91% <100.00%> (+72.91%)` | :arrow_up: |
   | [...he/kyuubi/sql/zorder/ZorderSqlAstBuilderBase.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1268/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZGV2L2t5dXViaS1leHRlbnNpb24tc3BhcmstY29tbW9uL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL3NxbC96b3JkZXIvWm9yZGVyU3FsQXN0QnVpbGRlckJhc2Uuc2NhbGE=) | `28.64% <100.00%> (+28.64%)` | :arrow_up: |
   | [...in/scala/org/apache/kyuubi/config/KyuubiConf.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1268/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLWNvbW1vbi9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9jb25maWcvS3l1dWJpQ29uZi5zY2FsYQ==) | `95.23% <0.00%> (-0.07%)` | :arrow_down: |
   | [...in/scala/org/apache/kyuubi/server/api/v1/dto.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1268/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvYXBpL3YxL2R0by5zY2FsYQ==) | `0.00% <0.00%> (ø)` | |
   | ... and [15 more](https://codecov.io/gh/apache/incubator-kyuubi/pull/1268/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1268?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1268?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [48f8d29...0eeb716](https://codecov.io/gh/apache/incubator-kyuubi/pull/1268?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?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: commits-unsubscribe@kyuubi.apache.org

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



[GitHub] [incubator-kyuubi] pan3793 commented on a change in pull request #1268: Simplify extension code with Spark3.2 and Spark3.1 by unify zorder code

Posted by GitBox <gi...@apache.org>.
pan3793 commented on a change in pull request #1268:
URL: https://github.com/apache/incubator-kyuubi/pull/1268#discussion_r732715839



##########
File path: dev/kyuubi-extension-spark-common/src/test/scala/org/apache/spark/sql/ZorderSuite.scala
##########
@@ -309,7 +314,9 @@ trait ZorderSuite extends KyuubiSparkSQLExtensionTest with ExpressionEvalHelper
         val plan = Project(Seq(Alias(zorder, "c")()), OneRowRelation())
         spark.sessionState.analyzer.checkAnalysis(plan)
       }.getMessage
-      assert(msg.contains("Unsupported z-order type: null"))
+      // before Spark 3.2.0 the null type catalog string is null, after Spark 3.2.0 it's void

Review comment:
       Can we link a JIRA TICKET here?




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

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



[GitHub] [incubator-kyuubi] ulysses-you commented on a change in pull request #1268: Simplify extension code with Spark3.2 and Spark3.1 by unify zorder code

Posted by GitBox <gi...@apache.org>.
ulysses-you commented on a change in pull request #1268:
URL: https://github.com/apache/incubator-kyuubi/pull/1268#discussion_r732635958



##########
File path: dev/kyuubi-extension-spark-3-2/pom.xml
##########
@@ -23,6 +23,7 @@
         <groupId>org.apache.kyuubi</groupId>
         <artifactId>kyuubi-parent</artifactId>
         <version>1.4.0-SNAPSHOT</version>
+        <relativePath>../../pom.xml</relativePath>

Review comment:
       this is a bug ..




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

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



[GitHub] [incubator-kyuubi] ulysses-you commented on a change in pull request #1268: Simplify extension code with Spark3.2 and Spark3.1 by unify zorder code

Posted by GitBox <gi...@apache.org>.
ulysses-you commented on a change in pull request #1268:
URL: https://github.com/apache/incubator-kyuubi/pull/1268#discussion_r732725490



##########
File path: dev/kyuubi-extension-spark-common/src/test/scala/org/apache/spark/sql/ZorderSuite.scala
##########
@@ -309,7 +314,9 @@ trait ZorderSuite extends KyuubiSparkSQLExtensionTest with ExpressionEvalHelper
         val plan = Project(Seq(Alias(zorder, "c")()), OneRowRelation())
         spark.sessionState.analyzer.checkAnalysis(plan)
       }.getMessage
-      assert(msg.contains("Unsupported z-order type: null"))
+      // before Spark 3.2.0 the null type catalog string is null, after Spark 3.2.0 it's void

Review comment:
       added it




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

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



[GitHub] [incubator-kyuubi] pan3793 commented on a change in pull request #1268: Simplify extension code with Spark3.2 and Spark3.1 by unify zorder code

Posted by GitBox <gi...@apache.org>.
pan3793 commented on a change in pull request #1268:
URL: https://github.com/apache/incubator-kyuubi/pull/1268#discussion_r732715329



##########
File path: dev/kyuubi-extension-spark-3-1/src/main/scala/org/apache/kyuubi/sql/KyuubiSparkSQLExtension.scala
##########
@@ -32,28 +31,15 @@ import org.apache.kyuubi.sql.zorder.{InsertZorderBeforeWritingDatasource, Insert
 // scalastyle:on line.size.limit
 class KyuubiSparkSQLExtension extends (SparkSessionExtensions => Unit) {
   override def apply(extensions: SparkSessionExtensions): Unit = {
-    // inject zorder parser and related rules
-    extensions.injectParser{ case (_, parser) => new ZorderSparkSqlExtensionsParser(parser) }
-    extensions.injectResolutionRule(ResolveZorder)
-
+    KyuubiSparkSQLCommonExtension.injectCommonExtensions(extensions)

Review comment:
       I would rather keep the inject rules as is because the order of rules are more clear to users and developers




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

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



[GitHub] [incubator-kyuubi] ulysses-you commented on pull request #1268: Simplify extension code with Spark3.2 and Spark3.1 by unify zorder code

Posted by GitBox <gi...@apache.org>.
ulysses-you commented on pull request #1268:
URL: https://github.com/apache/incubator-kyuubi/pull/1268#issuecomment-948204203


   thanks for review, merging to master


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

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



[GitHub] [incubator-kyuubi] ulysses-you commented on a change in pull request #1268: Simplify extension code with Spark3.2 and Spark3.1 by unify zorder code

Posted by GitBox <gi...@apache.org>.
ulysses-you commented on a change in pull request #1268:
URL: https://github.com/apache/incubator-kyuubi/pull/1268#discussion_r732725354



##########
File path: dev/kyuubi-extension-spark-3-1/src/main/scala/org/apache/kyuubi/sql/KyuubiSparkSQLExtension.scala
##########
@@ -32,28 +31,15 @@ import org.apache.kyuubi.sql.zorder.{InsertZorderBeforeWritingDatasource, Insert
 // scalastyle:on line.size.limit
 class KyuubiSparkSQLExtension extends (SparkSessionExtensions => Unit) {
   override def apply(extensions: SparkSessionExtensions): Unit = {
-    // inject zorder parser and related rules
-    extensions.injectParser{ case (_, parser) => new ZorderSparkSqlExtensionsParser(parser) }
-    extensions.injectResolutionRule(ResolveZorder)
-
+    KyuubiSparkSQLCommonExtension.injectCommonExtensions(extensions)

Review comment:
       I think it's fine, and common module should ensure the rules are order insensitive




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

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