Skip to content

Commit

Permalink
space before if
Browse files Browse the repository at this point in the history
  • Loading branch information
saurfang committed Dec 29, 2015
1 parent d5307ce commit 052cb51
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion R/pkg/R/column.R
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ setMethod("%in%",
setMethod("otherwise",
signature(x = "Column", value = "ANY"),
function(x, value) {
value <- if(class(value) == "Column") { value@jc } else { value }
value <- if (class(value) == "Column") { value@jc } else { value }
jc <- callJMethod(x@jc, "otherwise", value)
column(jc)
})
8 changes: 4 additions & 4 deletions R/pkg/R/functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ setMethod("lit", signature("ANY"),
function(x) {
jc <- callJStatic("org.apache.spark.sql.functions",
"lit",
if(class(x) == "Column") { x@jc } else { x })
if (class(x) == "Column") { x@jc } else { x })
column(jc)
})

Expand Down Expand Up @@ -2262,7 +2262,7 @@ setMethod("unix_timestamp", signature(x = "Column", format = "character"),
setMethod("when", signature(condition = "Column", value = "ANY"),
function(condition, value) {
condition <- condition@jc
value <- if(class(value) == "Column") { value@jc } else { value }
value <- if (class(value) == "Column") { value@jc } else { value }
jc <- callJStatic("org.apache.spark.sql.functions", "when", condition, value)
column(jc)
})
Expand All @@ -2285,8 +2285,8 @@ setMethod("ifelse",
signature(test = "Column", yes = "ANY", no = "ANY"),
function(test, yes, no) {
test <- test@jc
yes <- if(class(yes) == "Column") { yes@jc } else { yes }
no <- if(class(no) == "Column") { no@jc } else { no }
yes <- if (class(yes) == "Column") { yes@jc } else { yes }
no <- if (class(no) == "Column") { no@jc } else { no }
jc <- callJMethod(callJStatic("org.apache.spark.sql.functions",
"when",
test, yes),
Expand Down

0 comments on commit 052cb51

Please sign in to comment.