diff --git a/public/components/datasources/components/manage/accelerations/create_accelerations_flyout/visual_editors/materialized_view/column_expression.tsx b/public/components/datasources/components/manage/accelerations/create_accelerations_flyout/visual_editors/materialized_view/column_expression.tsx index 3da5f84db8..3550dfeda5 100644 --- a/public/components/datasources/components/manage/accelerations/create_accelerations_flyout/visual_editors/materialized_view/column_expression.tsx +++ b/public/components/datasources/components/manage/accelerations/create_accelerations_flyout/visual_editors/materialized_view/column_expression.tsx @@ -115,34 +115,39 @@ export const ColumnExpression = ({ /> - - - ({ - label: x.fieldName, - })), - ]} - selectedOptions={[ - { - label: currentColumnExpressionValue.functionParam, - }, - ]} - onChange={(fieldOption) => - updateColumnExpressionValue( - { ...currentColumnExpressionValue, functionParam: fieldOption[0].label }, - index - ) - } - isClearable={false} - /> - - + {currentColumnExpressionValue.functionName !== 'window.start' && ( + + + ({ + label: x.fieldName, + })), + ]} + selectedOptions={[ + { + label: currentColumnExpressionValue.functionParam, + }, + ]} + onChange={(fieldOption) => + updateColumnExpressionValue( + { + ...currentColumnExpressionValue, + functionParam: fieldOption[0].label, + }, + index + ) + } + isClearable={false} + /> + + + )} diff --git a/public/components/datasources/components/manage/accelerations/create_accelerations_flyout/visual_editors/query_builder.tsx b/public/components/datasources/components/manage/accelerations/create_accelerations_flyout/visual_editors/query_builder.tsx index b206267950..68acf21317 100644 --- a/public/components/datasources/components/manage/accelerations/create_accelerations_flyout/visual_editors/query_builder.tsx +++ b/public/components/datasources/components/manage/accelerations/create_accelerations_flyout/visual_editors/query_builder.tsx @@ -148,7 +148,7 @@ const buildMaterializedViewColumns = (columnsValues: MaterializedViewColumn[]) = ` ${ column.functionName !== 'window.start' ? `${column.functionName}(${buildMaterializedViewColumnName(column.functionParam!)})` - : `\`${column.functionName}\`` + : `${column.functionName}` }${column.fieldAlias ? ` AS \`${column.fieldAlias}\`` : ``}` ) .join(', \n'); diff --git a/test/accelerations.ts b/test/accelerations.ts index 3eb1439688..4521a7c7f1 100644 --- a/test/accelerations.ts +++ b/test/accelerations.ts @@ -411,7 +411,7 @@ AS SELECT count(*) AS \`counter1\`, sum(\`field2\`), avg(\`field3\`) AS \`average\`, - \`window.start\` AS \`start\` + window.start AS \`start\` FROM datasource.database.table GROUP BY TUMBLE (\`timestamp\`, '1 minute') WITH (