Github user felixcheung commented on a diff in the pull request:

    https://github.com/apache/spark/pull/23256#discussion_r239997109
  
    --- Diff: R/pkg/tests/fulltests/test_mllib_fpm.R ---
    @@ -84,19 +84,20 @@ 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"))
    +  result <- 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, result)
    --- End diff --
    
    this is an important fix..


---

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

Reply via email to