You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "Rajesh (Jira)" <ji...@apache.org> on 2022/04/01 17:31:00 UTC

[jira] [Commented] (HUDI-3726) Switching from non-partitioned to partitioned key gen does not throw any exception

    [ https://issues.apache.org/jira/browse/HUDI-3726?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17516042#comment-17516042 ] 

Rajesh commented on HUDI-3726:
------------------------------

{code:java}
def getOriginKeyGenerator(parameters: Map[String, String]): String = {
val kg = parameters.getOrElse(KEYGENERATOR_CLASS_NAME.key(), KEYGENERATOR_CLASS_NAME.defaultValue())
if (classOf[SqlKeyGenerator].getCanonicalName == kg) {
parameters.getOrElse(SqlKeyGenerator.ORIGIN_KEYGEN_CLASS_NAME, null)
} else {
kg
}
}{code}

> Switching from non-partitioned to partitioned key gen does not throw any exception
> ----------------------------------------------------------------------------------
>
>                 Key: HUDI-3726
>                 URL: https://issues.apache.org/jira/browse/HUDI-3726
>             Project: Apache Hudi
>          Issue Type: Bug
>          Components: spark
>            Reporter: sivabalan narayanan
>            Assignee: Rajesh
>            Priority: Blocker
>             Fix For: 0.11.0
>
>         Attachments: Screen Shot 2022-04-01 at 12.28.12 PM.png
>
>
> in commit C1, if non-partitioned key gen is used and for commit C2, if key gen option is missed, we fallback to simple key gen and the write succeeds. I was expecting to throw exception if key gen class is changed. 
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)