You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "huangxiaopingRD (via GitHub)" <gi...@apache.org> on 2023/04/22 10:56:32 UTC

[GitHub] [hudi] huangxiaopingRD opened a new pull request, #8543: [HUDI-6124] Optimize exception message for init HoodieCatalogTable assert

huangxiaopingRD opened a new pull request, #8543:
URL: https://github.com/apache/hudi/pull/8543

   …sert
   
   ### Change Logs
   
   Optimize exception message for init HoodieCatalogTable assert
   
   ### Impact
   
   No
   ### Risk level (write none, low medium or high below)
   
   None
   ### Documentation Update
   
   ### Contributor's checklist
   
   - [ ] Read through [contributor's guide](https://hudi.apache.org/contribute/how-to-contribute)
   - [ ] Change Logs and Impact were stated clearly
   - [ ] Adequate tests were added if applicable
   - [ ] CI passed
   


-- 
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@hudi.apache.org

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


[GitHub] [hudi] bvaradar commented on a diff in pull request #8543: [HUDI-6124] Optimize exception message in HoodieCatalogTable

Posted by "bvaradar (via GitHub)" <gi...@apache.org>.
bvaradar commented on code in PR #8543:
URL: https://github.com/apache/hudi/pull/8543#discussion_r1175652747


##########
hudi-spark-datasource/hudi-spark/src/test/scala/org/apache/spark/sql/hudi/TestCreateTable.scala:
##########
@@ -1065,4 +1065,21 @@ class TestCreateTable extends HoodieSparkSqlTestBase {
       }
     }
   }
+
+  test("Test init HoodieCatalogTable class for non-Hudi table") {
+    val tableName = generateTableName
+    spark.sql(
+      s"""
+         | create table $tableName (
+         |  id int,
+         |  name string,
+         |  price double,
+         |  ts long
+         | ) using parquet
+       """.stripMargin)
+    val exception = intercept[IllegalArgumentException] {
+      spark.sql(s"""call show_commits(table => '$tableName', limit => 10)""").collect()
+    }
+    assert(exception.getMessage.contains(s"""$tableName is not a Hudi table"""))

Review Comment:
   use assertTrue



-- 
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@hudi.apache.org

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


[GitHub] [hudi] bvaradar commented on a diff in pull request #8543: [HUDI-6124] Optimize exception message for init HoodieCatalogTable assert

Posted by "bvaradar (via GitHub)" <gi...@apache.org>.
bvaradar commented on code in PR #8543:
URL: https://github.com/apache/hudi/pull/8543#discussion_r1174474333


##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/spark/sql/catalyst/catalog/HoodieCatalogTable.scala:
##########
@@ -51,7 +50,7 @@ import scala.collection.mutable
  */
 class HoodieCatalogTable(val spark: SparkSession, var table: CatalogTable) extends Logging {
 
-  assert(table.provider.map(_.toLowerCase(Locale.ROOT)).orNull == "hudi", "It's not a Hudi table")
+  assert(table.provider.map(_.toLowerCase(Locale.ROOT)).orNull == "hudi", s" ${table.qualifiedName} is not a Hudi table")

Review Comment:
   Can you replace all asserts with ValidationUtils.checkArgument in this file



-- 
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@hudi.apache.org

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


[GitHub] [hudi] bvaradar merged pull request #8543: [HUDI-6124] Optimize exception message in HoodieCatalogTable

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


-- 
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@hudi.apache.org

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


[GitHub] [hudi] hudi-bot commented on pull request #8543: [HUDI-6124] Optimize exception message for init HoodieCatalogTable assert

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #8543:
URL: https://github.com/apache/hudi/pull/8543#issuecomment-1518604866

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "04152fcbf0fbf634d0dce6bfd41ecab277beadda",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "04152fcbf0fbf634d0dce6bfd41ecab277beadda",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 04152fcbf0fbf634d0dce6bfd41ecab277beadda UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot 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: commits-unsubscribe@hudi.apache.org

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


[GitHub] [hudi] huangxiaopingRD commented on a diff in pull request #8543: [HUDI-6124] Optimize exception message in HoodieCatalogTable

Posted by "huangxiaopingRD (via GitHub)" <gi...@apache.org>.
huangxiaopingRD commented on code in PR #8543:
URL: https://github.com/apache/hudi/pull/8543#discussion_r1174495789


##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/spark/sql/catalyst/catalog/HoodieCatalogTable.scala:
##########
@@ -51,7 +50,7 @@ import scala.collection.mutable
  */
 class HoodieCatalogTable(val spark: SparkSession, var table: CatalogTable) extends Logging {
 
-  assert(table.provider.map(_.toLowerCase(Locale.ROOT)).orNull == "hudi", "It's not a Hudi table")
+  assert(table.provider.map(_.toLowerCase(Locale.ROOT)).orNull == "hudi", s" ${table.qualifiedName} is not a Hudi table")

Review Comment:
   Thank you for your good advice, it has been updated.



-- 
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@hudi.apache.org

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


[GitHub] [hudi] hudi-bot commented on pull request #8543: [HUDI-6124] Optimize exception message in HoodieCatalogTable

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #8543:
URL: https://github.com/apache/hudi/pull/8543#issuecomment-1519003931

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "04152fcbf0fbf634d0dce6bfd41ecab277beadda",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=16558",
       "triggerID" : "04152fcbf0fbf634d0dce6bfd41ecab277beadda",
       "triggerType" : "PUSH"
     }, {
       "hash" : "4ee8b4c535b3d7fac3327b37e3ea88aa326fd9cc",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=16575",
       "triggerID" : "4ee8b4c535b3d7fac3327b37e3ea88aa326fd9cc",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 4ee8b4c535b3d7fac3327b37e3ea88aa326fd9cc Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=16575) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot 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: commits-unsubscribe@hudi.apache.org

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


[GitHub] [hudi] hudi-bot commented on pull request #8543: [HUDI-6124] Optimize exception message in HoodieCatalogTable

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #8543:
URL: https://github.com/apache/hudi/pull/8543#issuecomment-1522096344

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "04152fcbf0fbf634d0dce6bfd41ecab277beadda",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=16558",
       "triggerID" : "04152fcbf0fbf634d0dce6bfd41ecab277beadda",
       "triggerType" : "PUSH"
     }, {
       "hash" : "4ee8b4c535b3d7fac3327b37e3ea88aa326fd9cc",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=16575",
       "triggerID" : "4ee8b4c535b3d7fac3327b37e3ea88aa326fd9cc",
       "triggerType" : "PUSH"
     }, {
       "hash" : "b660f610433f383d8d0cc947028e399b92fa416e",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=16652",
       "triggerID" : "b660f610433f383d8d0cc947028e399b92fa416e",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 4ee8b4c535b3d7fac3327b37e3ea88aa326fd9cc Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=16575) 
   * b660f610433f383d8d0cc947028e399b92fa416e Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=16652) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot 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: commits-unsubscribe@hudi.apache.org

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


[GitHub] [hudi] hudi-bot commented on pull request #8543: [HUDI-6124] Optimize exception message in HoodieCatalogTable

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #8543:
URL: https://github.com/apache/hudi/pull/8543#issuecomment-1522628873

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "04152fcbf0fbf634d0dce6bfd41ecab277beadda",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=16558",
       "triggerID" : "04152fcbf0fbf634d0dce6bfd41ecab277beadda",
       "triggerType" : "PUSH"
     }, {
       "hash" : "4ee8b4c535b3d7fac3327b37e3ea88aa326fd9cc",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=16575",
       "triggerID" : "4ee8b4c535b3d7fac3327b37e3ea88aa326fd9cc",
       "triggerType" : "PUSH"
     }, {
       "hash" : "b660f610433f383d8d0cc947028e399b92fa416e",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=16652",
       "triggerID" : "b660f610433f383d8d0cc947028e399b92fa416e",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * b660f610433f383d8d0cc947028e399b92fa416e Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=16652) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot 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: commits-unsubscribe@hudi.apache.org

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


[GitHub] [hudi] hudi-bot commented on pull request #8543: [HUDI-6124] Optimize exception message for init HoodieCatalogTable assert

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #8543:
URL: https://github.com/apache/hudi/pull/8543#issuecomment-1518607429

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "04152fcbf0fbf634d0dce6bfd41ecab277beadda",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=16558",
       "triggerID" : "04152fcbf0fbf634d0dce6bfd41ecab277beadda",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 04152fcbf0fbf634d0dce6bfd41ecab277beadda Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=16558) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot 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: commits-unsubscribe@hudi.apache.org

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


[GitHub] [hudi] hudi-bot commented on pull request #8543: [HUDI-6124] Optimize exception message in HoodieCatalogTable

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #8543:
URL: https://github.com/apache/hudi/pull/8543#issuecomment-1518929615

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "04152fcbf0fbf634d0dce6bfd41ecab277beadda",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=16558",
       "triggerID" : "04152fcbf0fbf634d0dce6bfd41ecab277beadda",
       "triggerType" : "PUSH"
     }, {
       "hash" : "4ee8b4c535b3d7fac3327b37e3ea88aa326fd9cc",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "4ee8b4c535b3d7fac3327b37e3ea88aa326fd9cc",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 04152fcbf0fbf634d0dce6bfd41ecab277beadda Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=16558) 
   * 4ee8b4c535b3d7fac3327b37e3ea88aa326fd9cc UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot 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: commits-unsubscribe@hudi.apache.org

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


[GitHub] [hudi] hudi-bot commented on pull request #8543: [HUDI-6124] Optimize exception message for init HoodieCatalogTable assert

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #8543:
URL: https://github.com/apache/hudi/pull/8543#issuecomment-1518706074

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "04152fcbf0fbf634d0dce6bfd41ecab277beadda",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=16558",
       "triggerID" : "04152fcbf0fbf634d0dce6bfd41ecab277beadda",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 04152fcbf0fbf634d0dce6bfd41ecab277beadda Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=16558) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot 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: commits-unsubscribe@hudi.apache.org

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


[GitHub] [hudi] hudi-bot commented on pull request #8543: [HUDI-6124] Optimize exception message in HoodieCatalogTable

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #8543:
URL: https://github.com/apache/hudi/pull/8543#issuecomment-1518930793

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "04152fcbf0fbf634d0dce6bfd41ecab277beadda",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=16558",
       "triggerID" : "04152fcbf0fbf634d0dce6bfd41ecab277beadda",
       "triggerType" : "PUSH"
     }, {
       "hash" : "4ee8b4c535b3d7fac3327b37e3ea88aa326fd9cc",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=16575",
       "triggerID" : "4ee8b4c535b3d7fac3327b37e3ea88aa326fd9cc",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 04152fcbf0fbf634d0dce6bfd41ecab277beadda Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=16558) 
   * 4ee8b4c535b3d7fac3327b37e3ea88aa326fd9cc Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=16575) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot 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: commits-unsubscribe@hudi.apache.org

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


[GitHub] [hudi] hudi-bot commented on pull request #8543: [HUDI-6124] Optimize exception message in HoodieCatalogTable

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #8543:
URL: https://github.com/apache/hudi/pull/8543#issuecomment-1522085601

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "04152fcbf0fbf634d0dce6bfd41ecab277beadda",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=16558",
       "triggerID" : "04152fcbf0fbf634d0dce6bfd41ecab277beadda",
       "triggerType" : "PUSH"
     }, {
       "hash" : "4ee8b4c535b3d7fac3327b37e3ea88aa326fd9cc",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=16575",
       "triggerID" : "4ee8b4c535b3d7fac3327b37e3ea88aa326fd9cc",
       "triggerType" : "PUSH"
     }, {
       "hash" : "b660f610433f383d8d0cc947028e399b92fa416e",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "b660f610433f383d8d0cc947028e399b92fa416e",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 4ee8b4c535b3d7fac3327b37e3ea88aa326fd9cc Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=16575) 
   * b660f610433f383d8d0cc947028e399b92fa416e UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot 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: commits-unsubscribe@hudi.apache.org

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