зеркало из https://github.com/Azure/AzureKusto.git
add slice_sample dplyr verb
This commit is contained in:
Родитель
b2f84831f4
Коммит
a7d462f2e3
|
@ -38,6 +38,7 @@ S3method(kql_build,op_mutate)
|
|||
S3method(kql_build,op_rename)
|
||||
S3method(kql_build,op_select)
|
||||
S3method(kql_build,op_set_op)
|
||||
S3method(kql_build,op_slice_sample)
|
||||
S3method(kql_build,op_summarise)
|
||||
S3method(kql_build,op_ungroup)
|
||||
S3method(kql_build,op_unnest)
|
||||
|
@ -80,6 +81,7 @@ S3method(semi_join,tbl_kusto_abstract)
|
|||
S3method(setdiff,tbl_kusto_abstract)
|
||||
S3method(setequal,tbl_kusto_abstract)
|
||||
S3method(show_query,tbl_kusto_abstract)
|
||||
S3method(slice_sample,tbl_kusto_abstract)
|
||||
S3method(summarise,tbl_kusto_abstract)
|
||||
S3method(tbl_vars,tbl_kusto_abstract)
|
||||
S3method(ungroup,tbl_kusto_abstract)
|
||||
|
|
|
@ -197,6 +197,13 @@ kql_build.op_head <- function(op, ...)
|
|||
build_kql("take ", kql(escape(n, parens = FALSE)))
|
||||
}
|
||||
|
||||
#' @export
|
||||
kql_build.op_slice_sample <- function(op, ...)
|
||||
{
|
||||
n <- lapply(op$args$n, translate_kql)
|
||||
build_kql("sample ", kql(escape(n, parens = FALSE)))
|
||||
}
|
||||
|
||||
#' @export
|
||||
kql_build.op_join <- function(op, ...)
|
||||
{
|
||||
|
|
6
R/tbl.R
6
R/tbl.R
|
@ -182,6 +182,12 @@ head.tbl_kusto_abstract <- function(x, n = 6L, ...)
|
|||
add_op_single("head", x, args = list(n = n))
|
||||
}
|
||||
|
||||
#' @export
|
||||
slice_sample.tbl_kusto_abstract <- function(x, n = 6L, ...)
|
||||
{
|
||||
add_op_single("slice_sample", x, args = list(n = n))
|
||||
}
|
||||
|
||||
#' Join methods for Kusto tables
|
||||
#'
|
||||
#' These methods are the same as other joining methods, with the exception of the `.strategy`, `.shufflekeys` and `.num_partitions` optional arguments. They provide hints to the Kusto engine on how to execute the join, and can sometimes be useful to speed up a query. See the Kusto documentation for more details.
|
||||
|
|
Загрузка…
Ссылка в новой задаче