Copilot commented on code in PR #9284:
URL: https://github.com/apache/gravitino/pull/9284#discussion_r2575744932
##########
clients/client-python/gravitino/dto/job/spark_job_template_dto.py:
##########
@@ -27,7 +27,12 @@
@register_job_template(JobType.SPARK)
@dataclass
class SparkJobTemplateDTO(JobTemplateDTO):
- """Represents a Spark Job Template Data Transfer Object (DTO)."""
+ """
+ Represents a Spark Job Template Data Transfer Object (DTO).
+
+ Note: The class_name field is required for Java/Scala Spark applications
but is
+ optional for PySpark applications. For PySpark jobs, this field can be
None.
+ """
_class_name: str = field(default=None,
metadata=config(field_name="className"))
Review Comment:
The type annotation for `_class_name` should be `Optional[str]` instead of
`str` since it has `default=None` and can be None for PySpark applications.
This inconsistency between the type annotation and the default value could lead
to type checking errors.
```suggestion
_class_name: Optional[str] = field(default=None,
metadata=config(field_name="className"))
```
--
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]