Mrudhulraj commented on code in PR #6017:
URL: https://github.com/apache/texera/pull/6017#discussion_r3627174662
##########
amber/src/main/scala/org/apache/texera/web/resource/dashboard/WorkflowSearchQueryBuilder.scala:
##########
@@ -150,10 +153,10 @@ object WorkflowSearchQueryBuilder extends
SearchQueryBuilder {
val pidField = groupConcatDistinct(WORKFLOW_OF_PROJECT.PID)
val dw = DashboardWorkflow(
record.into(WORKFLOW_OF_USER).getUid.eq(uid),
- record
- .get(WORKFLOW_USER_ACCESS.PRIVILEGE)
- .toString,
- record.into(USER).getName,
+ Option(record.get(WORKFLOW_USER_ACCESS.PRIVILEGE,
classOf[PrivilegeEnum]))
+ .map(_.toString)
+ .getOrElse("NONE"),
+ Option(record.into(USER).getName).getOrElse(""),
Review Comment:
Yes, thanks for bringing this up.
I got confused between the `uid` and `USER` join on `WORKFLOW_OF_USER`.
Yes. the fallback mechanism is not needed for `getName` and `getUid` as they
cannot be `NULL`.
The only change required here would be the `NULL` fallback when the
user_access of uid is not present in the access table.
Will resolve this by setting it to NONE.
--
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]