示例#1
0
def create_context_distributed(sched):
    from dask_sql import Context
    from dask.distributed import Client

    # Need dev version 1.18+ of reticulate
    # Error: C stack usage   is too close to the limit
    # devtools::install_github('rstudio/reticulate')
    if sched:
        client = Client(sched)
    else:
        client = Client()
    ctx = Context()

    # FIX: develop better client handling on the R side
    ctx.dors_client = client
    return ctx
示例#2
0
def create_context():
    from dask_sql import Context
    ctx = Context()
    ctx.dors_client = False
    return ctx