Mrudhulraj commented on issue #5957:
URL: https://github.com/apache/texera/issues/5957#issuecomment-4821678189
Suggested fix and result:
```
override protected def constructFromClause(
uid: Integer,
params: DashboardResource.SearchQueryParams,
includePublic: Boolean = false
): TableLike[_] = {
val baseJoin = DATASET
.leftJoin(DATASET_USER_ACCESS)
.on(DATASET_USER_ACCESS.DID.eq(DATASET.DID))
.and(if (uid == null) DSL.falseCondition() else
DATASET_USER_ACCESS.UID.eq(uid))
.leftJoin(USER)
.on(USER.UID.eq(DATASET.OWNER_UID))
val condition: Condition =
if (uid == null) {
DATASET.IS_PUBLIC.eq(true)
} else if (includePublic) {
DATASET.IS_PUBLIC.eq(true).or(DATASET_USER_ACCESS.UID.isNotNull)
} else {
DATASET_USER_ACCESS.UID.isNotNull
}
baseJoin.where(condition)
}
```
<img width="1915" height="717" alt="Image"
src="https://github.com/user-attachments/assets/30069c7d-279f-414a-81f7-a2f5b70a1e99"
/>
--
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]