This is an automated email from the ASF dual-hosted git repository.
xiangfu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pinot.git
The following commit(s) were added to refs/heads/master by this push:
new 165008567e [UI] add multi value column in schema table (#11335)
165008567e is described below
commit 165008567e8fe4c10249e5e29561e78f96b73d4e
Author: Jayesh Choudhary <[email protected]>
AuthorDate: Mon Aug 14 04:30:54 2023 +0530
[UI] add multi value column in schema table (#11335)
---
.../src/main/resources/app/pages/SchemaPageDetails.tsx | 2 +-
.../src/main/resources/app/pages/TenantDetails.tsx | 2 +-
pinot-controller/src/main/resources/app/utils/Utils.tsx | 16 ++++++++++++++--
3 files changed, 16 insertions(+), 4 deletions(-)
diff --git
a/pinot-controller/src/main/resources/app/pages/SchemaPageDetails.tsx
b/pinot-controller/src/main/resources/app/pages/SchemaPageDetails.tsx
index 23be997dfb..c02a84340e 100644
--- a/pinot-controller/src/main/resources/app/pages/SchemaPageDetails.tsx
+++ b/pinot-controller/src/main/resources/app/pages/SchemaPageDetails.tsx
@@ -131,7 +131,7 @@ const SchemaPageDetails = ({ match }:
RouteComponentProps<Props>) => {
if(result.error){
setSchemaJSON(null);
setTableSchema({
- columns: ['Column', 'Type', 'Field Type'],
+ columns: ['Column', 'Type', 'Field Type', 'Multi Value'],
records: []
});
} else {
diff --git a/pinot-controller/src/main/resources/app/pages/TenantDetails.tsx
b/pinot-controller/src/main/resources/app/pages/TenantDetails.tsx
index 4719b6c824..255bfa4299 100644
--- a/pinot-controller/src/main/resources/app/pages/TenantDetails.tsx
+++ b/pinot-controller/src/main/resources/app/pages/TenantDetails.tsx
@@ -202,7 +202,7 @@ const TenantPageDetails = ({ match }:
RouteComponentProps<Props>) => {
if(result.error){
setSchemaJSON(null);
setTableSchema({
- columns: ['Column', 'Type', 'Field Type'],
+ columns: ['Column', 'Type', 'Field Type', 'Multi Value'],
records: []
});
} else {
diff --git a/pinot-controller/src/main/resources/app/utils/Utils.tsx
b/pinot-controller/src/main/resources/app/utils/Utils.tsx
index 582b897033..623e1ffe67 100644
--- a/pinot-controller/src/main/resources/app/utils/Utils.tsx
+++ b/pinot-controller/src/main/resources/app/utils/Utils.tsx
@@ -288,9 +288,9 @@ const syncTableSchemaData = (data, showFieldType) => {
const columnList = [...dimensionFields, ...metricFields, ...dateTimeField];
if (showFieldType) {
return {
- columns: ['Column', 'Type', 'Field Type'],
+ columns: ['Column', 'Type', 'Field Type', 'Multi Value'],
records: columnList.map((field) => {
- return [field.name, field.dataType, field.fieldType];
+ return [field.name, field.dataType, field.fieldType,
getMultiValueField(field)];
}),
};
}
@@ -302,6 +302,18 @@ const syncTableSchemaData = (data, showFieldType) => {
};
};
+const getMultiValueField = (field): boolean => {
+ if(!field) {
+ return false;
+ }
+
+ if("singleValueField" in field && field.singleValueField === false) {
+ return true;
+ }
+
+ return false;
+}
+
const encodeString = (str: string) => {
if(str === unescape(str)){
return escape(str);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]