python/ray/data/dataset_pipeline.py
def schema(
        self, fetch_if_missing: bool = False
    ) -> Union[type, "pyarrow.lib.Schema"]:
        """Return the schema of the dataset pipeline.

        For datasets of Arrow records, this will return the Arrow schema.
        For dataset of Python objects, this returns their Python type.

        Note: This is intended to be a method for peeking schema before
        the execution of DatasetPipeline. If execution has already started,
        it will simply return the cached schema from the previous call.

        Time complexity: O(1)

        Args:
            fetch_if_missing: If True, synchronously fetch the schema if it's
                not known. Default is False, where None is returned if the
                schema is not known.

        Returns:
            The Python type or Arrow schema of the records, or None if the
            schema is not known.
        """
        if not self._executed[0]:
            self._schema = self._peek().schema(fetch_if_missing)
        return self._schema
Return the schema of the dataset pipeline.

        For datasets of Arrow records, this will return the Arrow schema.
        For dataset of Python objects, this returns their Python type.

        Note: This is intended to be a method for peeking schema before
        the execution of DatasetPipeline. If execution has already started,
        it will simply return the cached schema from the previous call.

        Time complexity: O(1)

        Args:
            fetch_if_missing: If True, synchronously fetch the schema if it's
                not known. Default is False, where None is returned if the
                schema is not known.

        Returns:
            The Python type or Arrow schema of the records, or None if the
            schema is not known.
        
Return the schema of the dataset pipeline.
For datasets of Arrow records, this will return the Arrow schema.
For dataset of Python objects, this returns their Python type.

This is intended to be a method for peeking schema before
the execution of DatasetPipeline. If execution has already started,
it will simply return the cached schema from the previous call.


Return the schema of the dataset pipeline . For datasets of Arrow records this will return the Arrow schema . For dataset of Python objects this returns their Python type . This is intended to be a method for peeking schema before the execution of DatasetPipeline . If execution has already started it will simply return the cached schema from the previous call .
def schema(
        self, fetch_if_missing: bool = False
    ) -> Union[type, "pyarrow.lib.Schema"]:
        if not self._executed[0]:
            self._schema = self._peek().schema(fetch_if_missing)
        return self._schema
def schema ( self , fetch_if_missing : bool = False ) -> Union [ type , "pyarrow.lib.Schema" ] : if not self . _executed [ 0 ] : self . _schema = self . _peek ( ) . schema ( fetch_if_missing ) return self . _schema
Return the schema of the dataset pipeline.
Return the schema of the dataset pipeline .
"""Return the schema of the dataset pipeline.

        For datasets of Arrow records, this will return the Arrow schema.
        For dataset of Python objects, this returns their Python type.

        Note: This is intended to be a method for peeking schema before
        the execution of DatasetPipeline. If execution has already started,
        it will simply return the cached schema from the previous call.

        Time complexity: O(1)

        Args:
            fetch_if_missing: If True, synchronously fetch the schema if it's
                not known. Default is False, where None is returned if the
                schema is not known.

        Returns:
            The Python type or Arrow schema of the records, or None if the
            schema is not known.
        """
The Python type or Arrow schema of the records, or None if the
schema is not known.
The Python type or Arrow schema of the records or None if the schema is not known .
self
fetch_if_missing
bool
If True, synchronously fetch the schema if it's
not known. Default is False, where None is returned if the
schema is not known.
If True synchronously fetch the schema if it ' s not known . Default is False where None is returned if the schema is not known .