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

(query assist) revert removing backticks #1896

Merged
merged 2 commits into from
Jun 11, 2024
Merged
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
1 change: 0 additions & 1 deletion server/routes/query_assist/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
context,
request,
response
): Promise<IOpenSearchDashboardsResponse<any | ResponseError>> => {

Check warning on line 31 in server/routes/query_assist/routes.ts

View workflow job for this annotation

GitHub Actions / Lint

Unexpected any. Specify a different type
const client = context.core.opensearch.client.asCurrentUser;
try {
// if the call does not throw any error, then the agent is properly configured
Expand All @@ -54,7 +54,7 @@
context,
request,
response
): Promise<IOpenSearchDashboardsResponse<any | ResponseError>> => {

Check warning on line 57 in server/routes/query_assist/routes.ts

View workflow job for this annotation

GitHub Actions / Lint

Unexpected any. Specify a different type
const client = context.core.opensearch.client.asCurrentUser;
try {
const pplRequest = await getAgentIdAndRequest({
Expand All @@ -77,7 +77,6 @@
.replace(/[\r\n]/g, ' ')
.trim()
.replace(/ISNOTNULL/g, 'isnotnull') // https://github.com/opensearch-project/sql/issues/2431
.replace(/`/g, '') // https://github.com/opensearch-project/dashboards-observability/issues/509, https://github.com/opensearch-project/dashboards-observability/issues/557
.replace(/\bSPAN\(/g, 'span('); // https://github.com/opensearch-project/dashboards-observability/issues/759
return response.ok({ body: ppl });
} catch (error) {
Expand Down Expand Up @@ -110,7 +109,7 @@
context,
request,
response
): Promise<IOpenSearchDashboardsResponse<any | ResponseError>> => {

Check warning on line 112 in server/routes/query_assist/routes.ts

View workflow job for this annotation

GitHub Actions / Lint

Unexpected any. Specify a different type
const client = context.core.opensearch.client.asCurrentUser;
const { index, question, query, response: _response, isError } = request.body;
const queryResponse = JSON.stringify(_response);
Expand Down
Loading