This repository was archived by the owner on Nov 15, 2024. It is now read-only.
Commit b7d5106
[SPARK-17902][R] Revive stringsAsFactors option for collect() in SparkR
## What changes were proposed in this pull request?
This PR proposes to revive `stringsAsFactors` option in collect API, which was mistakenly removed in apache@71a138c.
Simply, it casts `charactor` to `factor` if it meets the condition, `stringsAsFactors && is.character(vec)` in primitive type conversion.
## How was this patch tested?
Unit test in `R/pkg/tests/fulltests/test_sparkSQL.R`.
Author: hyukjinkwon <[email protected]>
Closes apache#19551 from HyukjinKwon/SPARK-17902.
(cherry picked from commit a83d8d5)
Signed-off-by: hyukjinkwon <[email protected]>1 parent b766549 commit b7d5106
2 files changed
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1174 | 1174 | | |
1175 | 1175 | | |
1176 | 1176 | | |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
1177 | 1180 | | |
1178 | 1181 | | |
1179 | 1182 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
483 | 483 | | |
484 | 484 | | |
485 | 485 | | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
486 | 492 | | |
487 | 493 | | |
488 | 494 | | |
| |||
0 commit comments