Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert commits back to after 2.11 release #211

Merged
merged 12 commits into from
Nov 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 10 additions & 38 deletions common/constants/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,20 @@ export const OPENSEARCH_ACC_DOCUMENTATION_URL =
export const ACC_INDEX_TYPE_DOCUMENTATION_URL =
'https://github.com/opensearch-project/opensearch-spark/blob/main/docs/index.md';

export const TREE_ITEM_SKIPPING_INDEX_DEFAULT_NAME = `skipping_index`;
export const TREE_ITEM_COVERING_INDEX_DEFAULT_NAME = `covering_index`;
export const TREE_ITEM_MATERIALIZED_VIEW_DEFAULT_NAME = `materialized_view`;
export const TREE_ITEM_DATABASE_NAME_DEFAULT_NAME = `database`;
export const TREE_ITEM_TABLE_NAME_DEFAULT_NAME = `table`;
export const TREE_ITEM_LOAD_MATERIALIZED_BADGE_NAME = `Load Materialized View`;
export const TREE_ITEM_BADGE_NAME = `badge`;
export const LOAD_OPENSEARCH_INDICES_QUERY = `SHOW tables LIKE '%';`;
export const SKIPPING_INDEX_QUERY = `CREATE SKIPPING INDEX ON datasource.database.table
export const SKIPPING_INDEX = `skipping_index`;
export const ON_LOAD_QUERY = `SHOW tables LIKE '%';`;
export const SKIPPING_INDEX_QUERY = `CREATE SKIPPING INDEX ON myS3.logs_db.http_logs
(status VALUE_SET)
WITH (
auto_refresh = true,
checkpoint_location = 's3://test/'
auto_refresh = true
)`;
export const COVERING_INDEX_QUERY = `CREATE INDEX covering_idx ON datasource.database.table
export const COVERING_INDEX_QUERY = `CREATE INDEX covering_idx ON myS3.logs_db.http_logs
(status)
WITH (
auto_refresh = true,
checkpoint_location = 's3://test/'
auto_refresh = true
)`;
export const CREATE_DATABASE_QUERY = `CREATE DATABASE datasource.database`;
export const CREATE_TABLE_QUERY = `CREATE EXTERNAL TABLE datasource.database.table (
export const CREATE_DATABASE_QUERY = `CREATE DATABASE myS3.logs_db`;
export const CREATE_TABLE_QUERY = `CREATE EXTERNAL TABLE myS3.logs_db.logs (
key BIGINT,
status INTEGER,
size FLOAT,
Expand All @@ -44,17 +36,6 @@ OPTIONS (
compression 'gzip'
);`;

export const CREATE_MATERIALIZED_VIEW = `CREATE MATERIALIZED VIEW datasource.database.materialized_view
AS SELECT
count(field)
FROM datasource.database.table
GROUP BY TUMBLE (timestamp, '2 hours')
WITH (
auto_refresh = true,
watermark_delay = '2 minutes',
checkpoint_location = 's3://test/'
)`;

export const ACCELERATION_INDEX_TYPES = [
{ label: 'Skipping Index', value: 'skipping' },
{ label: 'Covering Index', value: 'covering' },
Expand Down Expand Up @@ -85,7 +66,7 @@ export const SKIPPING_INDEX_ACCELERATION_METHODS = [

export const ACCELERATION_ADD_FIELDS_TEXT = '(add fields here)';
export const ACCELERATION_INDEX_NAME_REGEX = /^[a-z][a-z_]*$/;
export const ACCELERATION_S3_URL_REGEX = /^(s3|s3a):\/\/[a-zA-Z0-9.\-]+/;
export const ACCELERATION_S3_URL_REGEX = /^(s3|s3a):\/\/[a-zA-Z0-9.\-]+\/.*/;
export const ACCELERATION_DEFUALT_SKIPPING_INDEX_NAME = 'skipping';

export const ACCELERATION_INDEX_NAME_INFO = `All OpenSearch acceleration indices have a naming format of pattern: \`prefix_<index name>_suffix\`. They share a common prefix structure, which is \`flint_<data source name>_<database name>_<table name>_\`. Additionally, they may have a suffix that varies based on the index type.
Expand All @@ -102,13 +83,4 @@ export const ACCELERATION_INDEX_NAME_INFO = `All OpenSearch acceleration indices
- All user given index names must be in lowercase letters. Index name cannot begin with underscores. Spaces, commas, and characters -, :, ", *, +, /, \, |, ?, #, >, or < are not allowed.
`;

export const OPENSEARCH_SQL_INIT_QUERY = `SHOW tables LIKE '%';`;
export const TIMESTAMP_DATATYPE = 'timestamp';
export const FETCH_OPENSEARCH_INDICES_PATH = '/api/sql_console/sqlquery';
export const POLL_INTERVAL_MS = 2000;
export const ASYNC_QUERY_ENDPOINT = '/api/spark_sql_console';
export const ASYNC_QUERY_JOB_ENDPOINT = ASYNC_QUERY_ENDPOINT + '/job/';
export const ASYNC_QUERY_SESSION_ID = 'async-query-session-id';

export const SAMPLE_PPL_QUERY = 'source = <datasource>.<database>.<table> | head 10';
export const SAMPLE_SQL_QUERY = 'select * from <datasource>.<database>.<table> limit 10';
export const SIDEBAR_POLL_INTERVAL_MS = 5000;
37 changes: 0 additions & 37 deletions common/toast/index.tsx

This file was deleted.

30 changes: 1 addition & 29 deletions common/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@ export interface RefreshIntervalType {
refreshInterval: string;
}

export interface watermarkDelayType {
delayWindow: number;
delayInterval: string;
}

export type AccelerationIndexType = 'skipping' | 'covering' | 'materialized';

export interface GroupByTumbleType {
Expand All @@ -62,7 +57,6 @@ export interface FormErrorsType {
replicaShardsError: string[];
refreshIntervalError: string[];
checkpointLocationError: string[];
watermarkDelayError: string[];
}

export type AccelerationRefreshType = 'auto' | 'interval' | 'manual';
Expand All @@ -81,30 +75,8 @@ export interface CreateAccelerationForm {
replicaShardsCount: number;
refreshType: AccelerationRefreshType;
checkpointLocation: string | undefined;
watermarkDelay: watermarkDelayType;
refreshIntervalOptions: RefreshIntervalType;
formErrors: FormErrorsType;
}

export type AsyncQueryLoadingStatus = 'SUCCESS' | 'FAILED' | 'RUNNING' | 'SCHEDULED' | 'CANCELLED';
export type TreeItemType =
| 'covering_index'
| 'skipping_index'
| 'table'
| 'database'
| 'materialized_view'
| 'Load Materialized View'
| 'badge';

export interface TreeItem {
name: string;
type: TreeItemType;
isExpanded: boolean;
values?: TreeItem[];
isLoading?: boolean;
}

export interface DatasourceTreeLoading {
flag: boolean;
status: string;
}
export type AsyncQueryLoadingStatus = 'SUCCESS' | 'FAILED' | 'RUNNING' | 'SCHEDULED' | 'CANCELED';
68 changes: 0 additions & 68 deletions common/utils/async_query_helpers.ts

This file was deleted.

10 changes: 4 additions & 6 deletions opensearch_dashboards.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
{
"id": "queryWorkbenchDashboards",
"version": "2.11.1.0",
"opensearchDashboardsVersion": "2.11.1",
"version": "2.11.0.0",
"opensearchDashboardsVersion": "2.11.0",
"server": true,
"ui": true,
"requiredPlugins": [
"navigation"
],
"requiredPlugins": ["navigation"],
"optionalPlugins": []
}
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "opensearch-query-workbench",
"version": "2.11.1.0",
"version": "2.11.0.0",
"description": "Query Workbench",
"main": "index.js",
"license": "Apache-2.0",
Expand Down Expand Up @@ -47,4 +47,4 @@
"semver": "^7.5.2",
"@cypress/request": "^3.0.0"
}
}
}
19 changes: 19 additions & 0 deletions public/ace-themes/sql_console.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/

import * as ace from 'brace';

ace.define('ace/theme/sql_console', ['require', 'exports', 'module', 'ace/lib/dom'], function (
acequire,
exports,
module
) {
exports.isDark = false;
exports.cssClass = 'ace-sql-console';
exports.cssText = require('../index.scss');

const dom = acequire('../lib/dom');
dom.importCssString(exports.cssText, exports.cssClass);
});
Loading
Loading