parameters: (path, columns=None, filters=None, storage_options=None, **kwargs)
return_statement: return dd.core.new_dd_object(dsk, name, meta, divisions)
docstring: Read cudf dataframe from ORC file(s).
  
      Note that this function is mostly borrowed from upstream Dask.
  
      Parameters
      ----------
      path: str or list(str)
          Location of file(s), which can be a full URL with protocol specifier,
          and may include glob character if a single string.
      columns: None or list(str)
          Columns to load. If None, loads all.
      filters : None or list of tuple or list of lists of tuples
          If not None, specifies a filter predicate used to filter out row groups
          using statistics stored for each row group as Parquet metadata. Row
          groups that do not match the given filter predicate are not read. The
          predicate is expressed in disjunctive normal form (DNF) like
          `[[('x', '=', 0), ...], ...]`. DNF allows arbitrary boolean logical
          combinations of single column predicates. The innermost tuples each
          describe a single column predicate. The list of inner predicates is
          interpreted as a conjunction (AND), forming a more selective and
          multiple column predicate. Finally, the outermost list combines
          these filters as a disjunction (OR). Predicates may also be passed
          as a list of tuples. This form is interpreted as a single conjunction.
          To express OR in predicates, one must use the (preferred) notation of
          list of lists of tuples.
      storage_options: None or dict
          Further parameters to pass to the bytes backend.
  
      Returns
      -------
      cudf.DataFrame
docstring_summary: Read cudf dataframe from ORC file(s).
docstring_tokens: Read cudf dataframe from ORC file ( s ) .
function: def read_orc(path, columns=None, filters=None, storage_options=None, **kwargs):
      """Read cudf dataframe from ORC file(s).
  
      Note that this function is mostly borrowed from upstream Dask.
  
      Parameters
      ----------
      path: str or list(str)
          Location of file(s), which can be a full URL with protocol specifier,
          and may include glob character if a single string.
      columns: None or list(str)
          Columns to load. If None, loads all.
      filters : None or list of tuple or list of lists of tuples
          If not None, specifies a filter predicate used to filter out row groups
          using statistics stored for each row group as Parquet metadata. Row
          groups that do not match the given filter predicate are not read. The
          predicate is expressed in disjunctive normal form (DNF) like
          `[[('x', '=', 0), ...], ...]`. DNF allows arbitrary boolean logical
          combinations of single column predicates. The innermost tuples each
          describe a single column predicate. The list of inner predicates is
          interpreted as a conjunction (AND), forming a more selective and
          multiple column predicate. Finally, the outermost list combines
          these filters as a disjunction (OR). Predicates may also be passed
          as a list of tuples. This form is interpreted as a single conjunction.
          To express OR in predicates, one must use the (preferred) notation of
          list of lists of tuples.
      storage_options: None or dict
          Further parameters to pass to the bytes backend.
  
      Returns
      -------
      cudf.DataFrame
      """
  
      storage_options = storage_options or {}
      fs, fs_token, paths = get_fs_token_paths(
          path, mode="rb", storage_options=storage_options
      )
      schema = None
      nstripes_per_file = []
      for path in paths:
          with fs.open(path, "rb") as f:
              o = orc.ORCFile(f)
              if schema is None:
                  schema = o.schema
              elif schema != o.schema:
                  raise ValueError(
                      "Incompatible schemas while parsing ORC files"
                  )
              nstripes_per_file.append(o.nstripes)
      schema = _get_pyarrow_dtypes(schema, categories=None)
      if columns is not None:
          ex = set(columns) - set(schema)
          if ex:
              raise ValueError(
                  "Requested columns ({ex}) not in schema ({set(schema)})"
              )
      else:
          columns = list(schema)
  
      with fs.open(paths[0], "rb") as f:
          meta = cudf.read_orc(
              f,
              stripes=[0] if nstripes_per_file[0] else None,
              columns=columns,
              **kwargs,
          )
  
      name = "read-orc-" + tokenize(fs_token, path, columns, **kwargs)
      dsk = {}
      N = 0
      for path, n in zip(paths, nstripes_per_file):
          for stripe in (
              range(n)
              if filters is None
              else cudf.io.orc._filter_stripes(filters, path)
          ):
              dsk[(name, N)] = (
                  _read_orc_stripe,
                  fs,
                  path,
                  stripe,
                  columns,
                  kwargs,
              )
              N += 1
  
      divisions = [None] * (len(dsk) + 1)
      return dd.core.new_dd_object(dsk, name, meta, divisions)
function_tokens: def read_orc ( path , columns = None , filters = None , storage_options = None , * * kwargs ) : storage_options = storage_options or { } fs , fs_token , paths = get_fs_token_paths ( path , mode = "rb" , storage_options = storage_options ) schema = None nstripes_per_file = [ ] for path in paths : with fs . open ( path , "rb" ) as f : o = orc . ORCFile ( f ) if schema is None : schema = o . schema elif schema != o . schema : raise ValueError ( "Incompatible schemas while parsing ORC files" ) nstripes_per_file . append ( o . nstripes ) schema = _get_pyarrow_dtypes ( schema , categories = None ) if columns is not None : ex = set ( columns ) - set ( schema ) if ex : raise ValueError ( "Requested columns ({ex}) not in schema ({set(schema)})" ) else : columns = list ( schema ) with fs . open ( paths [ 0 ] , "rb" ) as f : meta = cudf . read_orc ( f , stripes = [ 0 ] if nstripes_per_file [ 0 ] else None , columns = columns , * * kwargs , ) name = "read-orc-" + tokenize ( fs_token , path , columns , * * kwargs ) dsk = { } N = 0 for path , n in zip ( paths , nstripes_per_file ) : for stripe in ( range ( n ) if filters is None else cudf . io . orc . _filter_stripes ( filters , path ) ) : dsk [ ( name , N ) ] = ( _read_orc_stripe , fs , path , stripe , columns , kwargs , ) N += 1 divisions = [ None ] * ( len ( dsk ) + 1 ) return dd . core . new_dd_object ( dsk , name , meta , divisions )