Repository: apache/arrow
File: python/pyarrow/parquet/core.py (Python)

Code before:
                "the 'filters' keyword is not supported when the "
                "pyarrow.dataset module is not available"
            )
        if partitioning != "hive":
            raise ValueError(
                "the 'partitioning' keyword is not supported when the "
                "pyarrow.dataset module is not available"
            )
        if schema is not None:
            raise ValueError(
                "the 'schema' argument is not supported when the "
                "pyarrow.dataset module is not available"
            )
        if isinstance(source, list):
            raise ValueError(
                "the 'source' argument cannot be a list of files "
                "when the pyarrow.dataset module is not available"
            )

        filesystem, path = _resolve_filesystem_and_path(source, filesystem)
        if filesystem is not None:
            if not filesystem.get_file_info(path).is_file:
                raise ValueError(
                    "the 'source' argument should be "
                    "an existing .parquet file and not a directory, "
                    "when the pyarrow.dataset module is not available"
                )

            source = filesystem.open_input_file(path)

        dataset = ParquetFile(
            source, read_dictionary=read_dictionary,
            binary_type=binary_type,
            list_type=list_type,
            memory_map=memory_map, buffer_size=buffer_size,
            pre_buffer=pre_buffer,
            coerce_int96_timestamp_unit=coerce_int96_timestamp_unit,
            decryption_properties=decryption_properties,
            thrift_string_size_limit=thrift_string_size_limit,
            thrift_container_size_limit=thrift_container_size_limit,
            page_checksum_verification=page_checksum_verification,
        )

    return dataset.read(columns=columns, use_threads=use_threads,
                        use_pandas_metadata=use_pandas_metadata)


read_table.__doc__ = _read_table_docstring.format(
    """Read a Table from Parquet format""",
    "\n".join(("""use_pandas_metadata : bool, default False
    If True and file has custom pandas schema metadata, ensure that

Review comment (suggestion):
```suggestion
                    "The 'source' argument should be "
                    "an existing parquet file and not a directory,"
                    "when the `pyarrow.dataset` module is not available."
```

Code after:
                "the 'filters' keyword is not supported when the "
                "pyarrow.dataset module is not available"
            )
        if partitioning != "hive":
            raise ValueError(
                "the 'partitioning' keyword is not supported when the "
                "pyarrow.dataset module is not available"
            )
        if schema is not None:
            raise ValueError(
                "the 'schema' argument is not supported when the "
                "pyarrow.dataset module is not available"
            )
        if isinstance(source, list):
            raise ValueError(
                "the 'source' argument cannot be a list of files "
                "when the pyarrow.dataset module is not available"
            )

        filesystem, path = _resolve_filesystem_and_path(source, filesystem)
        if filesystem is not None:
            if not filesystem.get_file_info(path).is_file:
                raise ValueError(
                    "the 'source' argument should be "
                    "an existing parquet file and not a directory "
                    "when the pyarrow.dataset module is not available"
                )

            source = filesystem.open_input_file(path)

        dataset = ParquetFile(
            source, read_dictionary=read_dictionary,
            binary_type=binary_type,
            list_type=list_type,
            memory_map=memory_map, buffer_size=buffer_size,
            pre_buffer=pre_buffer,
            coerce_int96_timestamp_unit=coerce_int96_timestamp_unit,
            decryption_properties=decryption_properties,
            thrift_string_size_limit=thrift_string_size_limit,
            thrift_container_size_limit=thrift_container_size_limit,
            page_checksum_verification=page_checksum_verification,
        )

    return dataset.read(columns=columns, use_threads=use_threads,
                        use_pandas_metadata=use_pandas_metadata)


read_table.__doc__ = _read_table_docstring.format(
    """Read a Table from Parquet format""",
    "\n".join(("""use_pandas_metadata : bool, default False
    If True and file has custom pandas schema metadata, ensure that