[jira] [Commented] (HUDI-299) Refactoring Hoodie#getFileName

2019-10-30 Thread leesf (Jira)


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

leesf commented on HUDI-299:


Close the issue for no other views.

> Refactoring Hoodie#getFileName
> --
>
> Key: HUDI-299
> URL: https://issues.apache.org/jira/browse/HUDI-299
> Project: Apache Hudi (incubating)
>  Issue Type: Improvement
>  Components: Common Core
>Reporter: leesf
>Assignee: leesf
>Priority: Minor
> Fix For: 0.5.1
>
>
> Currently, the code style used in HoodieInstance#getFileName is below.
> {code:java}
> if (xxx) {
> return;
> } else if (xxx) {
> return;
> } else if (xxx) {
> return;
> }
> throw new IllegalArgumentException("xxx");
> {code}
> However, it could be refactored into a simpler and more readable code style.
> {code:java}
> if (xxx) {
> return;
> } 
> if (xxx) {
> return;
> } 
> if (xxx) {
> return;
> }
> throw new IllegalArgumentException("xxx");
> {code}
> CC [~vbalaji] [~vinoth]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (HUDI-299) Refactoring Hoodie#getFileName

2019-10-09 Thread Vinoth Chandar (Jira)


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

Vinoth Chandar commented on HUDI-299:
-

I have strong opinions on this. the latter allows for if blocks to be also 
dependent. i.e you can pass a first check, set some state and then modify again 
in second one. I prefer the first one as-is. 

Completely understand style is a subjective topic. So love to hear other views 
as well. IMO this is not worth the effort.

> Refactoring Hoodie#getFileName
> --
>
> Key: HUDI-299
> URL: https://issues.apache.org/jira/browse/HUDI-299
> Project: Apache Hudi (incubating)
>  Issue Type: Improvement
>  Components: Common Core
>Reporter: leesf
>Assignee: leesf
>Priority: Minor
> Fix For: 0.5.1
>
>
> Currently, the code style used in HoodieInstance#getFileName is below.
> {code:java}
> if (xxx) {
> return;
> } else if (xxx) {
> return;
> } else if (xxx) {
> return;
> }
> throw new IllegalArgumentException("xxx");
> {code}
> However, it could be refactored into a simpler and more readable code style.
> {code:java}
> if (xxx) {
> return;
> } 
> if (xxx) {
> return;
> } 
> if (xxx) {
> return;
> }
> throw new IllegalArgumentException("xxx");
> {code}
> CC [~vbalaji] [~vinoth]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)