zero323 commented on a change in pull request #34151:
URL: https://github.com/apache/spark/pull/34151#discussion_r720409548
##########
File path: python/pyspark/sql/context.py
##########
@@ -15,21 +15,40 @@
# limitations under the License.
#
+from __future__ import annotations
+
import sys
import warnings
+from typing import Optional, Union, Callable, Any, Iterable, List, Tuple,
overload, TYPE_CHECKING
+
+from py4j.java_gateway import JavaObject # type: ignore[import]
-from pyspark import since, _NoValue
-from pyspark.sql.session import _monkey_patch_RDD, SparkSession
+from pyspark import since, _NoValue # type: ignore[attr-defined]
+from pyspark.sql.session import _monkey_patch_RDD, SparkSession # type:
ignore[attr-defined]
from pyspark.sql.dataframe import DataFrame
from pyspark.sql.readwriter import DataFrameReader
from pyspark.sql.streaming import DataStreamReader
from pyspark.sql.udf import UDFRegistration # noqa: F401
from pyspark.sql.utils import install_exception_handler
+from pyspark.context import SparkContext
+from pyspark.rdd import RDD
+
+if TYPE_CHECKING:
+ from pyspark.sql._typing import (
+ UserDefinedFunctionLike,
+ RowLike,
+ DateTimeLiteral,
+ LiteralType,
+ DecimalLiteral
+ )
+ from pyspark.sql.types import DataType, AtomicType, StructType
+ from pyspark.sql.pandas._typing import DataFrameLike
+ from pyspark.sql.streaming import StreamingQueryManager
__all__ = ["SQLContext", "HiveContext"]
-class SQLContext(object):
+class SQLContext(object): # type: ignore[no-redef]
Review comment:
Why is this `ignore` added?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]