kunwp1 commented on code in PR #9681:
URL: https://github.com/apache/texera/pull/9681#discussion_r4690875294


##########
amber/src/main/scala/org/apache/texera/web/resource/dashboard/hub/HubResource.scala:
##########
@@ -305,7 +294,7 @@ object HubResource {
       uid: Integer
   ) =
     context
-      .select()
+      .select((tables.table.fields().toSeq ++ Seq(USER.EMAIL, 
tables.access.privilegeColumn)): _*)

Review Comment:
   **Optional.** The column list here now has to match what 
`VersionedResourceTables.hydrate` reads. Notice that a column left out does not 
fail: the owner's email or the privilege simply comes back `null`, and the Hub 
shows the entry without it. One way to keep the two together is to define the 
list next to `hydrate` and select it here:
   ```scala
     /** Every column [[hydrate]] reads: a query that selects fewer leaves the 
owner's email or the
       * privilege null without an error.
       */
     final def hydrationFields: Seq[Field[_]] =
       table.fields().toSeq ++ Seq(USER.EMAIL, access.privilegeColumn)
   ```
   with `.select(tables.hydrationFields: _*)` in this query.



-- 
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]

Reply via email to