You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2021/08/25 06:22:03 UTC

[GitHub] [hudi] pengzhiwei2018 opened a new pull request #3534: [HUDI-2357] MERGE INTO doesn't work for tables created using CTAS

pengzhiwei2018 opened a new pull request #3534:
URL: https://github.com/apache/hudi/pull/3534


   
   
   ## What is the purpose of the pull request
   
   *Fix the missing extraOptions passed by CTAS. This missing options will lead the Merge Into not work for CTAS.
   
   ## Brief change log
   
   *(for example:)*
     - *Modify AnnotationLocation checkstyle rule in checkstyle.xml*
   
   ## Verify this pull request
   
   *(Please pick either of the following options)*
   
   This pull request is a trivial rework / code cleanup without any test coverage.
   
   *(or)*
   
   This pull request is already covered by existing tests, such as *(please describe tests)*.
   
   (or)
   
   This change added tests and can be verified as follows:
   
   *(example:)*
   
     - *Added integration tests for end-to-end.*
     - *Added HoodieClientWriteTest to verify the change.*
     - *Manually verified the change by running a job locally.*
   
   ## Committer checklist
   
    - [ ] Has a corresponding JIRA in PR title & commit
    
    - [ ] Commit message is descriptive of the change
    
    - [ ] CI is green
   
    - [ ] Necessary doc changes done or have another open PR
          
    - [ ] For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.
   


-- 
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] leesf commented on a change in pull request #3534: [HUDI-2357] MERGE INTO doesn't work for tables created using CTAS

Posted by GitBox <gi...@apache.org>.
leesf commented on a change in pull request #3534:
URL: https://github.com/apache/hudi/pull/3534#discussion_r695793385



##########
File path: hudi-spark-datasource/hudi-spark/src/main/scala/org/apache/spark/sql/hudi/command/InsertIntoHoodieTableCommand.scala
##########
@@ -193,15 +193,16 @@ object InsertIntoHoodieTableCommand extends Logging {
         s"[${insertPartitions.keys.mkString(" " )}]" +
         s" not equal to the defined partition in table[${table.partitionColumnNames.mkString(",")}]")
     }
-    val parameters = withSparkConf(sparkSession, table.storage.properties)() ++ extraOptions
+    val options = table.storage.properties ++ extraOptions

Review comment:
       is the current UTs cover the case (merge into using CTAS)?




-- 
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 #3534: [HUDI-2357] MERGE INTO doesn't work for tables created using CTAS

Posted by GitBox <gi...@apache.org>.
hudi-bot commented on pull request #3534:
URL: https://github.com/apache/hudi/pull/3534#issuecomment-905220326


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "acd246595e1963f6b82fb315f99942d8c2d81833",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "acd246595e1963f6b82fb315f99942d8c2d81833",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * acd246595e1963f6b82fb315f99942d8c2d81833 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run travis` re-run the last Travis build
    - `@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] leesf merged pull request #3534: [HUDI-2357] MERGE INTO doesn't work for tables created using CTAS

Posted by GitBox <gi...@apache.org>.
leesf merged pull request #3534:
URL: https://github.com/apache/hudi/pull/3534


   


-- 
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] pengzhiwei2018 commented on a change in pull request #3534: [HUDI-2357] MERGE INTO doesn't work for tables created using CTAS

Posted by GitBox <gi...@apache.org>.
pengzhiwei2018 commented on a change in pull request #3534:
URL: https://github.com/apache/hudi/pull/3534#discussion_r696311825



##########
File path: hudi-spark-datasource/hudi-spark/src/main/scala/org/apache/spark/sql/hudi/command/InsertIntoHoodieTableCommand.scala
##########
@@ -193,15 +193,16 @@ object InsertIntoHoodieTableCommand extends Logging {
         s"[${insertPartitions.keys.mkString(" " )}]" +
         s" not equal to the defined partition in table[${table.partitionColumnNames.mkString(",")}]")
     }
-    val parameters = withSparkConf(sparkSession, table.storage.properties)() ++ extraOptions
+    val options = table.storage.properties ++ extraOptions

Review comment:
       Yes, we have the UT for merge with a CTAS table. But this bug happen only for hive meta client because we have missed some hive table properties before this PR.




-- 
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] pengzhiwei2018 commented on a change in pull request #3534: [HUDI-2357] MERGE INTO doesn't work for tables created using CTAS

Posted by GitBox <gi...@apache.org>.
pengzhiwei2018 commented on a change in pull request #3534:
URL: https://github.com/apache/hudi/pull/3534#discussion_r696311825



##########
File path: hudi-spark-datasource/hudi-spark/src/main/scala/org/apache/spark/sql/hudi/command/InsertIntoHoodieTableCommand.scala
##########
@@ -193,15 +193,16 @@ object InsertIntoHoodieTableCommand extends Logging {
         s"[${insertPartitions.keys.mkString(" " )}]" +
         s" not equal to the defined partition in table[${table.partitionColumnNames.mkString(",")}]")
     }
-    val parameters = withSparkConf(sparkSession, table.storage.properties)() ++ extraOptions
+    val options = table.storage.properties ++ extraOptions

Review comment:
       Yes, we have the UT for merge with a CTAS table. But this bug happen only for hive meta enabled because we have missed some hive table properties before this PR.




-- 
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 edited a comment on pull request #3534: [HUDI-2357] MERGE INTO doesn't work for tables created using CTAS

Posted by GitBox <gi...@apache.org>.
hudi-bot edited a comment on pull request #3534:
URL: https://github.com/apache/hudi/pull/3534#issuecomment-905220326


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "acd246595e1963f6b82fb315f99942d8c2d81833",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=1882",
       "triggerID" : "acd246595e1963f6b82fb315f99942d8c2d81833",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * acd246595e1963f6b82fb315f99942d8c2d81833 Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=1882) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run travis` re-run the last Travis build
    - `@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] pengzhiwei2018 commented on a change in pull request #3534: [HUDI-2357] MERGE INTO doesn't work for tables created using CTAS

Posted by GitBox <gi...@apache.org>.
pengzhiwei2018 commented on a change in pull request #3534:
URL: https://github.com/apache/hudi/pull/3534#discussion_r696311825



##########
File path: hudi-spark-datasource/hudi-spark/src/main/scala/org/apache/spark/sql/hudi/command/InsertIntoHoodieTableCommand.scala
##########
@@ -193,15 +193,16 @@ object InsertIntoHoodieTableCommand extends Logging {
         s"[${insertPartitions.keys.mkString(" " )}]" +
         s" not equal to the defined partition in table[${table.partitionColumnNames.mkString(",")}]")
     }
-    val parameters = withSparkConf(sparkSession, table.storage.properties)() ++ extraOptions
+    val options = table.storage.properties ++ extraOptions

Review comment:
       Yes, we have the UT for merge with a CTAS table. But this bug happen only for hive meta because we have missed some hive table properties before this PR.




-- 
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 edited a comment on pull request #3534: [HUDI-2357] MERGE INTO doesn't work for tables created using CTAS

Posted by GitBox <gi...@apache.org>.
hudi-bot edited a comment on pull request #3534:
URL: https://github.com/apache/hudi/pull/3534#issuecomment-905220326


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "acd246595e1963f6b82fb315f99942d8c2d81833",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=1882",
       "triggerID" : "acd246595e1963f6b82fb315f99942d8c2d81833",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * acd246595e1963f6b82fb315f99942d8c2d81833 Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=1882) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run travis` re-run the last Travis build
    - `@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] vingov commented on pull request #3534: [HUDI-2357] MERGE INTO doesn't work for tables created using CTAS

Posted by GitBox <gi...@apache.org>.
vingov commented on pull request #3534:
URL: https://github.com/apache/hudi/pull/3534#issuecomment-905708157


   @pengzhiwei2018 - Thanks for the quick fix, I have tested the fix and it works for tables created using CTAS, Can we include this fix as part of 0.9.0 release by any chance? 


-- 
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] pengzhiwei2018 commented on pull request #3534: [HUDI-2357] MERGE INTO doesn't work for tables created using CTAS

Posted by GitBox <gi...@apache.org>.
pengzhiwei2018 commented on pull request #3534:
URL: https://github.com/apache/hudi/pull/3534#issuecomment-906117662


   > @pengzhiwei2018 - Thanks for the quick fix, I have tested the fix and it works for tables created using CTAS, Can we include this fix as part of 0.9.0 release by any chance?
   
   well, maybe I need sync this to @vinothchandar if we can put this fix to the 0.9.
   
   


-- 
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