View source: R/dbplyr-dialect.R
| sql_translation.sql_dialect_trino | R Documentation |
Extends dbplyr's base translation so that an R expression computes in Trino what it computes in R, or fails, rather than quietly computing something else:
sql_translation.sql_dialect_trino(con)
con |
A Trino SQL dialect object. |
/ divides as a double, where Trino would truncate the quotient of two
integers; %% takes the sign of the divisor, as in R.
as.integer() and as.integer64() truncate towards zero, where a cast
would round.
paste(), paste0() and str_c() cast every argument to VARCHAR,
which Trino's CONCAT_WS requires.
grepl(), sub() and gsub() honour fixed and ignore.case, and
rewrite R's \\1 back-references into Trino's $1; sub() replaces the
first match only.
days(), weeks(), months(), years(), hours(), minutes() and
seconds() build intervals, so date + days(1) works where date + 1
does not.
Casts name Trino types, and median() and quantile() use
approx_percentile, which is the percentile Trino offers over an
arbitrary number of rows. Null-safe comparison uses Trino's native
IS DISTINCT FROM rather than dbplyr's portable CASE WHEN spelling.
A dbplyr SQL variant.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.