This is an automated email from the ASF dual-hosted git repository.
aicam pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/texera.git
The following commit(s) were added to refs/heads/main by this push:
new d33a155cbc fix: add isDatasetDownloadable and align field order &
docstring in dataset query (#3723)
d33a155cbc is described below
commit d33a155cbc57e937bdb8795178eab65fb2090df9
Author: Andy Zhang <[email protected]>
AuthorDate: Sat Sep 13 23:25:32 2025 +0800
fix: add isDatasetDownloadable and align field order & docstring in dataset
query (#3723)
fixes #3727
---------
Co-authored-by: Xinyuan Lin <[email protected]>
---
.../dashboard/DatasetSearchQueryBuilder.scala | 3 ++-
.../resource/dashboard/UnifiedResourceSchema.scala | 25 +++++++++++++---------
2 files changed, 17 insertions(+), 11 deletions(-)
diff --git
a/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/DatasetSearchQueryBuilder.scala
b/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/DatasetSearchQueryBuilder.scala
index 0175cbe177..5587a46837 100644
---
a/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/DatasetSearchQueryBuilder.scala
+++
b/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/DatasetSearchQueryBuilder.scala
@@ -42,9 +42,10 @@ object DatasetSearchQueryBuilder extends SearchQueryBuilder
with LazyLogging {
name = DATASET.NAME,
description = DATASET.DESCRIPTION,
creationTime = DATASET.CREATION_TIME,
- did = DATASET.DID,
ownerId = DATASET.OWNER_UID,
+ did = DATASET.DID,
isDatasetPublic = DATASET.IS_PUBLIC,
+ isDatasetDownloadable = DATASET.IS_DOWNLOADABLE,
datasetUserAccess = DATASET_USER_ACCESS.PRIVILEGE
)
diff --git
a/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/UnifiedResourceSchema.scala
b/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/UnifiedResourceSchema.scala
index 5d2c52584b..a97fbe71ba 100644
---
a/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/UnifiedResourceSchema.scala
+++
b/core/amber/src/main/scala/edu/uci/ics/texera/web/resource/dashboard/UnifiedResourceSchema.scala
@@ -69,6 +69,7 @@ object UnifiedResourceSchema {
did: Field[Integer] = DSL.cast(null, classOf[Integer]),
datasetStoragePath: Field[String] = DSL.cast(null, classOf[String]),
isDatasetPublic: Field[java.lang.Boolean] = DSL.cast(null,
classOf[java.lang.Boolean]),
+ isDatasetDownloadable: Field[java.lang.Boolean] = DSL.cast(null,
classOf[java.lang.Boolean]),
datasetUserAccess: Field[PrivilegeEnum] =
DSL.castNull(classOf[PrivilegeEnum])
): UnifiedResourceSchema = {
new UnifiedResourceSchema(
@@ -90,8 +91,9 @@ object UnifiedResourceSchema {
projectColor -> projectColor.as("color"),
did -> did.as("did"),
datasetStoragePath -> datasetStoragePath.as("dataset_storage_path"),
- datasetUserAccess -> datasetUserAccess.as("user_dataset_access"),
- isDatasetPublic -> isDatasetPublic.as("is_dataset_public")
+ isDatasetPublic -> isDatasetPublic.as("is_dataset_public"),
+ isDatasetDownloadable ->
isDatasetDownloadable.as("is_dataset_downloadable"),
+ datasetUserAccess -> datasetUserAccess.as("user_dataset_access")
)
)
}
@@ -106,30 +108,33 @@ object UnifiedResourceSchema {
* - `description`: A textual description of the resource as a `String`.
* - `creationTime`: The timestamp when the resource was created, as a
`Timestamp`.
* - `lastModifiedTime`: The timestamp of the last modification to the
resource, as a `Timestamp` (applicable to workflows).
- * - `ownerId`: The identifier of the resource's owner, as a `Integer`.
+ * - `ownerId`: The identifier of the resource's owner, as an `Integer`.
*
* Attributes specific to workflows:
- * - `wid`: Workflow ID, as a `Integer`.
+ * - `wid`: Workflow ID, as an `Integer`.
* - `workflowUserAccess`: Access privileges associated with the workflow, as
a `PrivilegeEnum`.
* - `projectsOfWorkflow`: IDs of projects associated with the workflow,
concatenated as a `String`.
- * - `uid`: User ID associated with the workflow, as a `Integer`.
+ * - `uid`: User ID associated with the workflow, as an `Integer`.
* - `userName`: Name of the user associated with the workflow, as a `String`.
* - `userEmail`: Email of the user associated with the workflow, as a
`String`.
*
* Attributes specific to projects:
- * - `pid`: Project ID, as a `Integer`.
- * - `projectOwnerId`: ID of the project owner, as a `Integer`.
+ * - `pid`: Project ID, as an `Integer`.
+ * - `projectOwnerId`: ID of the project owner, as an `Integer`.
* - `projectColor`: Color associated with the project, as a `String`.
*
* Attributes specific to files:
- * - `fid`: File ID, as a `Integer`.
+ * - `fid`: File ID, as an `Integer`.
* - `fileUploadTime`: Timestamp when the file was uploaded, as a `Timestamp`.
* - `filePath`: Path of the file, as a `String`.
- * - `fileSize`: Size of the file, as a `Integer`.
+ * - `fileSize`: Size of the file, as an `Integer`.
* - `fileUserAccess`: Access privileges for the file, as a
`UserFileAccessPrivilege`.
*
* Attributes specific to datasets:
- * - `did`: Dataset ID, as a `Integer`.
+ * - `did`: Dataset ID, as an `Integer`.
+ * - `datasetStoragePath`: The storage path of the dataset, as a `String`.
+ * - `isDatasetPublic`: Indicates if the dataset is public, as a `Boolean`.
+ * - `isDatasetDownloadable`: Indicates if the dataset is downloadable, as a
`Boolean`.
* - `datasetUserAccess`: Access privileges for the dataset, as a
`PrivilegeEnum`
*/
class UnifiedResourceSchema private (