You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "Kotomi (Jira)" <ji...@apache.org> on 2020/04/10 09:54:00 UTC
[jira] [Commented] (HUDI-444) Refactor the codes based on scala
codestyle NullChecker rule
[ https://issues.apache.org/jira/browse/HUDI-444?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17080383#comment-17080383 ]
Kotomi commented on HUDI-444:
-----------------------------
removing `return` may cause different behavior.
for example:
in hudi-spark/src/main/scala/org/apache/hudi/HoodieSparkSqlWriter.scala
{code:java}
if (mode == SaveMode.Ignore && exists) {
log.warn(s"hoodie dataset at $basePath already exists. Ignoring & not performing actual writes.")
- return (true, common.util.Option.empty())
+ (true, common.util.Option.empty())
}{code}
and
{code:java}
if (hoodieRecords.isEmpty()) {
log.info("new batch has no new records, skipping...")
- return (true, common.util.Option.empty())
+ (true, common.util.Option.empty())
}{code}
such conditions became no use at all.
> Refactor the codes based on scala codestyle NullChecker rule
> ------------------------------------------------------------
>
> Key: HUDI-444
> URL: https://issues.apache.org/jira/browse/HUDI-444
> Project: Apache Hudi (incubating)
> Issue Type: Sub-task
> Components: Code Cleanup
> Reporter: lamber-ken
> Assignee: lamber-ken
> Priority: Minor
> Labels: pull-request-available
> Time Spent: 20m
> Remaining Estimate: 0h
>
> Refactor the codes based on scala codestyle NullChecker rule
--
This message was sent by Atlassian Jira
(v8.3.4#803005)