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 2020/08/25 20:41:30 UTC

[GitHub] [hudi] satishkotha opened a new pull request #2037: [HUDI-1226] Fix ComplexKeyGenerator for non-partitioned tables

satishkotha opened a new pull request #2037:
URL: https://github.com/apache/hudi/pull/2037


   
   ## What is the purpose of the pull request
   ComplexKeyGenerator getPartitionPath doesnt seem to work well with non-partitioned tables. Fix it and add test case
   
   ## Brief change log
   - Ignore empty string for partition path fields
   - Return "" for partitionPath if there are no partition path fields defined
   
   ## Verify this pull request
   This change added tests
   
   ## 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.

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



[GitHub] [hudi] satishkotha commented on pull request #2037: [HUDI-1226] Fix ComplexKeyGenerator for non-partitioned tables

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


   > > @satishkotha was it throwing an exception before this change ?
   > 
   > From https://issues.apache.org/jira/browse/HUDI-1226,
   > 
   > 1. If we pass empty string(-hoodie-conf hoodie.datasource.write.partitionpath.field=), generator returns 'default' as partitionpath
   > 2. if we pass delimiter alone (-hoodie-conf hoodie.datasource.write.partitionpath.field=,), it throws
   >    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
   > 
   > at java.lang.AbstractStringBuilder.deleteCharAt(AbstractStringBuilder.java:824)
   > at java.lang.StringBuilder.deleteCharAt(StringBuilder.java:253)
   > at org.apache.hudi.keygen.KeyGenUtils.getRecordPartitionPath(KeyGenUtils.java:80)
   > at org.apache.hudi.keygen.ComplexKeyGenerator.getPartitionPath(ComplexKeyGenerator.java:52)
   > at org.apache.hudi.keygen.BuiltinKeyGenerator.getKey(BuiltinKeyGenerator.java:75)
   
   @n3nash ^


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

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



[GitHub] [hudi] n3nash merged pull request #2037: [HUDI-1226] Fix ComplexKeyGenerator for non-partitioned tables

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


   


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

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



[GitHub] [hudi] satishkotha commented on pull request #2037: [HUDI-1226] Fix ComplexKeyGenerator for non-partitioned tables

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


   > @satishkotha was it throwing an exception before this change ?
   
   From https://issues.apache.org/jira/browse/HUDI-1226, 
   1) If we pass empty string(-hoodie-conf hoodie.datasource.write.partitionpath.field=), generator returns 'default' as partitionpath
   2) if we pass delimiter alone (-hoodie-conf hoodie.datasource.write.partitionpath.field=,), it throws
   java.lang.StringIndexOutOfBoundsException: String index out of range: -1
   
   at java.lang.AbstractStringBuilder.deleteCharAt(AbstractStringBuilder.java:824)
   at java.lang.StringBuilder.deleteCharAt(StringBuilder.java:253)
   at org.apache.hudi.keygen.KeyGenUtils.getRecordPartitionPath(KeyGenUtils.java:80)
   at org.apache.hudi.keygen.ComplexKeyGenerator.getPartitionPath(ComplexKeyGenerator.java:52)
   at org.apache.hudi.keygen.BuiltinKeyGenerator.getKey(BuiltinKeyGenerator.java:75)


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

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