Github user dongjoon-hyun commented on a diff in the pull request:

    https://github.com/apache/spark/pull/23072#discussion_r239197337
  
    --- Diff: R/pkg/tests/fulltests/test_mllib_fpm.R ---
    @@ -84,19 +84,21 @@ test_that("spark.fpGrowth", {
     })
     
     test_that("spark.prefixSpan", {
    -    df <- createDataFrame(list(list(list(list(1L, 2L), list(3L))),
    -                          list(list(list(1L), list(3L, 2L), list(1L, 2L))),
    -                          list(list(list(1L, 2L), list(5L))),
    -                          list(list(list(6L)))), schema = c("sequence"))
    -    result1 <- spark.findFrequentSequentialPatterns(df, minSupport = 0.5, 
maxPatternLength = 5L,
    -                                                    maxLocalProjDBSize = 
32000000L)
    -
    -    expected_result <- createDataFrame(list(list(list(list(1L)), 3L),
    -                                            list(list(list(3L)), 2L),
    -                                            list(list(list(2L)), 3L),
    -                                            list(list(list(1L, 2L)), 3L),
    -                                            list(list(list(1L), list(3L)), 
2L)),
    -                                            schema = c("sequence", "freq"))
    -  })
    +  df <- createDataFrame(list(list(list(list(1L, 2L), list(3L))),
    +                        list(list(list(1L), list(3L, 2L), list(1L, 2L))),
    +                        list(list(list(1L, 2L), list(5L))),
    +                        list(list(list(6L)))), schema = c("sequence"))
    +  result1 <- spark.findFrequentSequentialPatterns(df, minSupport = 0.5, 
maxPatternLength = 5L,
    +                                                  maxLocalProjDBSize = 
32000000L)
    +
    +  expected_result <- createDataFrame(list(list(list(list(1L)), 3L),
    +                                          list(list(list(3L)), 2L),
    +                                          list(list(list(2L)), 3L),
    +                                          list(list(list(1L, 2L)), 3L),
    +                                          list(list(list(1L), list(3L)), 
2L)),
    +                                          schema = c("sequence", "freq"))
    +
    +  expect_equivalent(expected_result, result1)
    --- End diff --
    
    `spark.prefixSpan` test case is irrelevant to the scope of PR.
    If we want to add this line `expect_equivalent(expected_result, result1)`, 
let's add in another PR.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to