jerryshao commented on code in PR #12509:
URL: https://github.com/apache/gravitino/pull/12509#discussion_r3811757474
##########
core/src/main/java/org/apache/gravitino/listener/api/info/JobInfo.java:
##########
@@ -106,6 +111,26 @@ public Audit auditInfo() {
return audit;
}
+ /**
+ * Returns the time when the job was queued for execution. This is the same
as the job's creation
+ * time.
+ *
+ * @return the queued time of the job
+ */
Review Comment:
Fixed — removed the `audit == null` branch. `audit` is guaranteed non-null
(`JobEntity.AUDIT_INFO` is `Field.required`, and `JobInfo` is only constructed
via `fromJobEntity`), so this was dead code rather than a real nullability case.
##########
docs/open-api/jobs.yaml:
##########
@@ -514,6 +514,16 @@ components:
- "canceled"
audit:
$ref: "./openapi.yaml#/components/schemas/Audit"
+ queuedAt:
+ type: string
+ format: date-time
+ nullable: true
+ description: The time when the job was queued for execution, same as
the job's creation time, or null if unavailable
+ startedAt:
+ type: string
+ format: date-time
+ nullable: true
+ description: The time when the job started execution, or null if the
job has not started execution yet
Review Comment:
Fixed — removed `nullable: true` and added `queuedAt` to the schema's
`required` list, since it's always populated (derived from the job's creation
time) and already asserted non-null in tests. `startedAt`/`finishedAt` remain
nullable, as suggested.
--
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]