From b802e36666afedb78f30def538bb905b647334b6 Mon Sep 17 00:00:00 2001 From: hyukjinkwon Date: Fri, 28 Apr 2017 00:32:06 +0900 Subject: [PATCH] Minimised fix --- R/pkg/R/utils.R | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/R/pkg/R/utils.R b/R/pkg/R/utils.R index c13c777750d80..41b88d95aa208 100644 --- a/R/pkg/R/utils.R +++ b/R/pkg/R/utils.R @@ -864,8 +864,7 @@ captureJVMException <- function(e, method) { # Extract the first message of JVM exception. first <- strsplit(msg[2], "\r?\n\tat")[[1]][1] stop(paste0(rmsg, "no such table - ", first), call. = FALSE) - } else - if (any(grep("org.apache.spark.sql.catalyst.parser.ParseException: ", stacktrace))) { + } else if (any(grep("org.apache.spark.sql.catalyst.parser.ParseException: ", stacktrace))) { msg <- strsplit(stacktrace, "org.apache.spark.sql.catalyst.parser.ParseException: ", fixed = TRUE)[[1]] # Extract "Error in ..." message.