You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@kyuubi.apache.org by GitBox <gi...@apache.org> on 2022/07/28 08:47:59 UTC

[GitHub] [incubator-kyuubi] turboFei opened a new pull request, #3158: Fix npe issue when formating the kyuubi-ctl output

turboFei opened a new pull request, #3158:
URL: https://github.com/apache/incubator-kyuubi/pull/3158

   <!--
   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.
   -->
   
   
   ### _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.apache.org/docs/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: 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] [incubator-kyuubi] turboFei commented on a diff in pull request #3158: Fix npe issue when formatting the kyuubi-ctl output

Posted by GitBox <gi...@apache.org>.
turboFei commented on code in PR #3158:
URL: https://github.com/apache/incubator-kyuubi/pull/3158#discussion_r932050954


##########
kyuubi-ctl/src/test/scala/org/apache/kyuubi/ctl/util/TabulatorSuite.scala:
##########
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.kyuubi.ctl.util
+
+import org.apache.kyuubi.KyuubiFunSuite
+
+class TabulatorSuite extends KyuubiFunSuite {
+  test("format rows have null") {
+    val rows: Array[Array[String]] = Array(Array("1", null), Array(null, "2"))
+    // scalastyle:off
+    val expected =
+      """
+        |╔════╤════╗
+        |║ c1 │ c2 ║
+        |╠════╪════╣
+        |║ 1  │    ║
+        |╟────┼────╢
+        |║    │ 2  ║
+        |╚════╧════╝
+        |""".stripMargin

Review Comment:
   thanks,
   
   how about `N/A`



##########
kyuubi-ctl/src/test/scala/org/apache/kyuubi/ctl/util/TabulatorSuite.scala:
##########
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.kyuubi.ctl.util
+
+import org.apache.kyuubi.KyuubiFunSuite
+
+class TabulatorSuite extends KyuubiFunSuite {
+  test("format rows have null") {
+    val rows: Array[Array[String]] = Array(Array("1", null), Array(null, "2"))
+    // scalastyle:off
+    val expected =
+      """
+        |╔════╤════╗
+        |║ c1 │ c2 ║
+        |╠════╪════╣
+        |║ 1  │    ║
+        |╟────┼────╢
+        |║    │ 2  ║
+        |╚════╧════╝
+        |""".stripMargin

Review Comment:
   thanks,
   
   how about `N/A`?



-- 
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] [incubator-kyuubi] ulysses-you commented on a diff in pull request #3158: Fix npe issue when formatting the kyuubi-ctl output

Posted by GitBox <gi...@apache.org>.
ulysses-you commented on code in PR #3158:
URL: https://github.com/apache/incubator-kyuubi/pull/3158#discussion_r932022158


##########
kyuubi-ctl/src/test/scala/org/apache/kyuubi/ctl/util/TabulatorSuite.scala:
##########
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.kyuubi.ctl.util
+
+import org.apache.kyuubi.KyuubiFunSuite
+
+class TabulatorSuite extends KyuubiFunSuite {
+  test("format rows have null") {
+    val rows: Array[Array[String]] = Array(Array("1", null), Array(null, "2"))
+    // scalastyle:off
+    val expected =
+      """
+        |╔════╤════╗
+        |║ c1 │ c2 ║
+        |╠════╪════╣
+        |║ 1  │    ║
+        |╟────┼────╢
+        |║    │ 2  ║
+        |╚════╧════╝
+        |""".stripMargin

Review Comment:
   It seems a bug of tabulator. The null and empty string should not be regarded as equivalent.
   
   is this better like this ?
   ```
   val rows: Array[Array[String]] = Array(Array("1", ""), Array(null, "2"))
   
   |╔═════╤════╗
   |║  c1 │ c2 ║
   |╠═════╪════╣
   |║  1  │    ║
   |╟─────┼────╢
   |║ null│ 2  ║
   |╚═════╧════╝
   ```



-- 
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] [incubator-kyuubi] ulysses-you closed pull request #3158: Fix npe issue when formatting the kyuubi-ctl output

Posted by GitBox <gi...@apache.org>.
ulysses-you closed pull request #3158: Fix npe issue when formatting the kyuubi-ctl output
URL: https://github.com/apache/incubator-kyuubi/pull/3158


-- 
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] [incubator-kyuubi] ulysses-you commented on a diff in pull request #3158: Fix npe issue when formatting the kyuubi-ctl output

Posted by GitBox <gi...@apache.org>.
ulysses-you commented on code in PR #3158:
URL: https://github.com/apache/incubator-kyuubi/pull/3158#discussion_r932021495


##########
kyuubi-ctl/src/test/scala/org/apache/kyuubi/ctl/util/TabulatorSuite.scala:
##########
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.kyuubi.ctl.util
+
+import org.apache.kyuubi.KyuubiFunSuite
+
+class TabulatorSuite extends KyuubiFunSuite {
+  test("format rows have null") {
+    val rows: Array[Array[String]] = Array(Array("1", null), Array(null, "2"))
+    // scalastyle:off
+    val expected =
+      """
+        |╔════╤════╗
+        |║ c1 │ c2 ║
+        |╠════╪════╣
+        |║ 1  │    ║
+        |╟────┼────╢
+        |║    │ 2  ║
+        |╚════╧════╝
+        |""".stripMargin

Review Comment:
   It seems a bug of tabulator. The null and empty string should not be regarded as equivalent.
   
   is this better like this ?
   ```
   val rows: Array[Array[String]] = Array(Array("1", ""), Array(null, "2"))
   
   |╔═════╤════╗
   |║  c1 │ c2 ║
   |╠═════╪════╣
   |║  1  │    ║
   |╟─────┼────╢
   |║ null│ 2  ║
   |╚═════╧════╝
   ```



-- 
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] [incubator-kyuubi] ulysses-you commented on pull request #3158: Fix npe issue when formatting the kyuubi-ctl output

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

   thanks, 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: 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] [incubator-kyuubi] codecov-commenter commented on pull request #3158: Fix npe issue when formatting the kyuubi-ctl output

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

   # [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/3158?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 [#3158](https://codecov.io/gh/apache/incubator-kyuubi/pull/3158?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (b54bff8) into [master](https://codecov.io/gh/apache/incubator-kyuubi/commit/137e818ccb327c71f9db118a2287a8fd2e65942c?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (137e818) will **decrease** coverage by `0.00%`.
   > The diff coverage is `61.11%`.
   
   > :exclamation: Current head b54bff8 differs from pull request most recent head fa9b53e. Consider uploading reports for the commit fa9b53e to get more accurate results
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #3158      +/-   ##
   ============================================
   - Coverage     51.43%   51.43%   -0.01%     
     Complexity        6        6              
   ============================================
     Files           456      456              
     Lines         25328    25329       +1     
     Branches       3520     3519       -1     
   ============================================
     Hits          13027    13027              
     Misses        11057    11057              
   - Partials       1244     1245       +1     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-kyuubi/pull/3158?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...che/kyuubi/ctl/cmd/delete/DeleteBatchCommand.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/3158/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-a3l1dWJpLWN0bC9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9jdGwvY21kL2RlbGV0ZS9EZWxldGVCYXRjaENvbW1hbmQuc2NhbGE=) | `50.00% <0.00%> (ø)` | |
   | [...rg/apache/kyuubi/ctl/cmd/log/LogBatchCommand.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/3158/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-a3l1dWJpLWN0bC9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9jdGwvY21kL2xvZy9Mb2dCYXRjaENvbW1hbmQuc2NhbGE=) | `78.00% <0.00%> (ø)` | |
   | [...che/kyuubi/ctl/cmd/submit/SubmitBatchCommand.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/3158/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-a3l1dWJpLWN0bC9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9jdGwvY21kL3N1Ym1pdC9TdWJtaXRCYXRjaENvbW1hbmQuc2NhbGE=) | `84.21% <0.00%> (ø)` | |
   | [...java/org/apache/kyuubi/client/util/BatchUtils.java](https://codecov.io/gh/apache/incubator-kyuubi/pull/3158/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-a3l1dWJpLXJlc3QtY2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9reXV1YmkvY2xpZW50L3V0aWwvQmF0Y2hVdGlscy5qYXZh) | `75.00% <75.00%> (ø)` | |
   | [...n/scala/org/apache/kyuubi/ctl/util/Tabulator.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/3158/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-a3l1dWJpLWN0bC9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9jdGwvdXRpbC9UYWJ1bGF0b3Iuc2NhbGE=) | `100.00% <100.00%> (ø)` | |
   | [...uubi/engine/spark/events/SparkOperationEvent.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/3158/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-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9ldmVudHMvU3BhcmtPcGVyYXRpb25FdmVudC5zY2FsYQ==) | `88.88% <0.00%> (-5.56%)` | :arrow_down: |
   | [...n/scala/org/apache/kyuubi/engine/ProcBuilder.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/3158/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-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9lbmdpbmUvUHJvY0J1aWxkZXIuc2NhbGE=) | `83.12% <0.00%> (-0.63%)` | :arrow_down: |
   | [...rc/main/scala/org/apache/spark/ui/EnginePage.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/3158/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-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvc3BhcmsvdWkvRW5naW5lUGFnZS5zY2FsYQ==) | `78.86% <0.00%> (-0.30%)` | :arrow_down: |
   | [...la/org/apache/kyuubi/ctl/util/TabulatorSuite.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/3158/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-a3l1dWJpLWN0bC9zcmMvdGVzdC9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9jdGwvdXRpbC9UYWJ1bGF0b3JTdWl0ZS5zY2FsYQ==) | | |
   | [...in/scala/org/apache/kyuubi/config/KyuubiConf.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/3158/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==) | `97.34% <0.00%> (+0.09%)` | :arrow_up: |
   | ... and [2 more](https://codecov.io/gh/apache/incubator-kyuubi/pull/3158/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) | |
   
   Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?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