Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
### What changes were proposed in this pull request? This PR proposes: - Updates AppVeyor to use the latest R version 4.2.0. - Uses the correct way of checking if an object is a matrix: `is.matrix`. After R 4.2.0, `class(upperBoundsOnCoefficients) != "matrix")` fails: ``` -- 1. Error (test_mllib_classification.R:245:3): spark.logit ------------------- Error in `if (class(upperBoundsOnCoefficients) != "matrix") { stop("upperBoundsOnCoefficients must be a matrix.") }`: the condition has length > 1 ``` This fixes `spark.logit` when `lowerBoundsOnCoefficients` or `upperBoundsOnCoefficients` is specified. - Explicitly use the first element in `is.na` comparison. From R 4.2.0, it throws an exception as below: ``` Error in if (is.na(c(1, 2))) print("abc") : the condition has length > 1 ``` Previously it was a warning. This fixes `createDataFrame` or `as.DataFrame` when the data type is a nested complex type. ### Why are the changes needed? To support/test the latest R. R community tends to use the latest versions aggressively. ### Does this PR introduce _any_ user-facing change? Yes, after this PR, we officially support R 4.2.0 in SparkR. ### How was this patch tested? CI in this PR should test it out. Closes #36758 from HyukjinKwon/upgrade-r-appveyor. Lead-authored-by: Hyukjin Kwon <gurwls223@apache.org> Co-authored-by: Hyukjin Kwon <gurwls223@gmail.com> Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
- Loading branch information