You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "KnightChess (via GitHub)" <gi...@apache.org> on 2024/07/17 15:38:59 UTC

[PR] [HUDI-7998] fix insert overwrite hudi table with static partition whe… [hudi]

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

   …n defining partition column with int type
   
   ### Change Logs
   
   fix #11623 
   
   ### Impact
   
   None
   
   ### Risk level (write none, low medium or high below)
   
   None
   
   ### Documentation Update
   
   None
   
   ### 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


Re: [PR] [HUDI-7998] fix insert overwrite hudi table with static partition whe… [hudi]

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "8da8d4561d79c6a45402c35ef54820eb16efbcc4",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=24880",
       "triggerID" : "8da8d4561d79c6a45402c35ef54820eb16efbcc4",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 8da8d4561d79c6a45402c35ef54820eb16efbcc4 Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=24880) 
   
   <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


Re: [PR] [HUDI-7998] fix insert overwrite hudi table with static partition whe… [hudi]

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "8da8d4561d79c6a45402c35ef54820eb16efbcc4",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "8da8d4561d79c6a45402c35ef54820eb16efbcc4",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 8da8d4561d79c6a45402c35ef54820eb16efbcc4 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


Re: [PR] [HUDI-7998] fix insert overwrite hudi table with static partition whe… [hudi]

Posted by "KnightChess (via GitHub)" <gi...@apache.org>.
KnightChess closed pull request #11643: [HUDI-7998] fix insert overwrite hudi table with static partition whe…
URL: https://github.com/apache/hudi/pull/11643


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


Re: [PR] [HUDI-7998] fix insert overwrite hudi table with static partition whe… [hudi]

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


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


Re: [PR] [HUDI-7998] fix insert overwrite hudi table with static partition whe… [hudi]

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "8da8d4561d79c6a45402c35ef54820eb16efbcc4",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=24880",
       "triggerID" : "8da8d4561d79c6a45402c35ef54820eb16efbcc4",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a4c2a9f538ddbc500a16ec3db6bf7b368e2e39e8",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "a4c2a9f538ddbc500a16ec3db6bf7b368e2e39e8",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 8da8d4561d79c6a45402c35ef54820eb16efbcc4 Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=24880) 
   * a4c2a9f538ddbc500a16ec3db6bf7b368e2e39e8 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


Re: [PR] [HUDI-7998] fix insert overwrite hudi table with static partition whe… [hudi]

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "8da8d4561d79c6a45402c35ef54820eb16efbcc4",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=24880",
       "triggerID" : "8da8d4561d79c6a45402c35ef54820eb16efbcc4",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a4c2a9f538ddbc500a16ec3db6bf7b368e2e39e8",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=24896",
       "triggerID" : "a4c2a9f538ddbc500a16ec3db6bf7b368e2e39e8",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * a4c2a9f538ddbc500a16ec3db6bf7b368e2e39e8 Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=24896) 
   
   <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


Re: [PR] [HUDI-7998] fix insert overwrite hudi table with static partition whe… [hudi]

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "8da8d4561d79c6a45402c35ef54820eb16efbcc4",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=24880",
       "triggerID" : "8da8d4561d79c6a45402c35ef54820eb16efbcc4",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 8da8d4561d79c6a45402c35ef54820eb16efbcc4 Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=24880) 
   
   <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


Re: [PR] [HUDI-7998] fix insert overwrite hudi table with static partition whe… [hudi]

Posted by "KnightChess (via GitHub)" <gi...@apache.org>.
KnightChess closed pull request #11643: [HUDI-7998] fix insert overwrite hudi table with static partition whe…
URL: https://github.com/apache/hudi/pull/11643


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


Re: [PR] [HUDI-7998] fix insert overwrite hudi table with static partition whe… [hudi]

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


##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/spark/sql/hudi/ProvidesHoodieConfig.scala:
##########
@@ -384,7 +384,7 @@ trait ProvidesHoodieConfig extends Logging {
       val staticPartitionValues = partitionSpec.filter(p => p._2.isDefined).mapValues(_.get)
       val predicates = staticPartitionValues.map { case (k, v) =>
         val partition = AttributeReference(k, partitionNameToType(k))()
-        val value = Literal(v)
+        val value = HoodieSqlCommonUtils.castIfNeeded(Literal.create(v), partitionNameToType(k))
         EqualTo(partition, value)

Review Comment:
   Great fix, can we add a UT test case?



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


Re: [PR] [HUDI-7998] fix insert overwrite hudi table with static partition whe… [hudi]

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "8da8d4561d79c6a45402c35ef54820eb16efbcc4",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=24880",
       "triggerID" : "8da8d4561d79c6a45402c35ef54820eb16efbcc4",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a4c2a9f538ddbc500a16ec3db6bf7b368e2e39e8",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=24896",
       "triggerID" : "a4c2a9f538ddbc500a16ec3db6bf7b368e2e39e8",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 8da8d4561d79c6a45402c35ef54820eb16efbcc4 Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=24880) 
   * a4c2a9f538ddbc500a16ec3db6bf7b368e2e39e8 Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=24896) 
   
   <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