diff --git a/.github/workflows/dashboards-observability-test-and-build-workflow.yml b/.github/workflows/dashboards-observability-test-and-build-workflow.yml index 4921cdbd4..88acf8733 100644 --- a/.github/workflows/dashboards-observability-test-and-build-workflow.yml +++ b/.github/workflows/dashboards-observability-test-and-build-workflow.yml @@ -20,6 +20,11 @@ jobs: - name: Checkout Plugin uses: actions/checkout@v1 + # Enable longer filenames for windows + - name: Enable longer filenames + if: ${{ matrix.os == 'windows-latest' }} + run: git config --system core.longpaths true + - name: Checkout OpenSearch Dashboards uses: actions/checkout@v2 with: diff --git a/dashboards-observability/.cypress/integration/1_event_analytics.spec.js b/dashboards-observability/.cypress/integration/1_event_analytics.spec.js index 3f43a6eb7..39b207ff9 100644 --- a/dashboards-observability/.cypress/integration/1_event_analytics.spec.js +++ b/dashboards-observability/.cypress/integration/1_event_analytics.spec.js @@ -18,33 +18,36 @@ import { landOnEventExplorer, landOnEventVisualizations, landOnPanels, - renderTreeMapchart, renderPieChart, renderLineChartForDataConfig, renderDataConfig, aggregationValues, DataConfigLineChart, - renderAddParent, renderGaugeChart, - renderAddParent -} from '../utils/event_constants'; -import { supressResizeObserverIssue } from '../utils/constants'; +} from '../utils/event_analytics/constants'; +import { supressResizeObserverIssue, COMMAND_TIMEOUT_LONG } from '../utils/constants'; +import { clearQuerySearchBoxText } from '../utils/event_analytics/helpers'; const renderHistogramChart = () => { querySearch(TEST_QUERIES[5].query, TEST_QUERIES[5].dateRangeDOM); - cy.get('[data-test-subj="configPane__vizTypeSelector"] [data-test-subj="comboBoxInput"]').type('Histogram').type('{enter}'); + cy.get('[data-test-subj="configPane__vizTypeSelector"] [data-test-subj="comboBoxInput"]') + .type('Histogram') + .type('{enter}'); cy.wait(delay); - cy.get('g.draglayer.cursor-crosshair').should('exist'); - cy.get('#configPanel__panelOptions .euiFieldText').click().type('Histogram chart'); - cy.get('.euiFlexItem .euiFormRow [placeholder="Description"]').click().type('This is the description for Histogram chart'); - cy.get('.euiIEFlexWrapFix').eq(1).contains('Chart Styles').should('exist'); - cy.get('.euiFormLabel.euiFormRow__label').eq(2).contains('Bucket Size'); - cy.get('.euiFieldNumber').eq(0).type('4'); - cy.get('.euiFormLabel.euiFormRow__label').eq(3).contains('Bucket Offset'); - cy.get('.euiFieldNumber').eq(0).type('6'); + cy.get('g.draglayer.cursor-crosshair').should('exist'); + cy.get('#configPanel__panelOptions .euiFieldText').click().type('Histogram chart'); + cy.get('.euiFlexItem .euiFormRow [placeholder="Description"]') + .click() + .type('This is the description for Histogram chart'); + cy.get('.euiIEFlexWrapFix').eq(1).contains('Chart Styles').should('exist'); + cy.get('.euiFormLabel.euiFormRow__label').eq(2).contains('Bucket Size'); + cy.get('.euiFieldNumber').eq(0).type('4'); + cy.get('.euiFormLabel.euiFormRow__label').eq(3).contains('Bucket Offset'); + cy.get('.euiFieldNumber').eq(0).type('6'); }; const vis_name_sub_string = Math.floor(Math.random() * 100); + const saveVisualizationAndVerify = () => { cy.get('[data-test-subj="eventExplorer__saveManagementPopover"]').click(); cy.get('[data-test-subj="eventExplorer__querySaveComboBox"]').click(); @@ -66,6 +69,7 @@ const saveVisualizationAndVerify = () => { .type('{enter}'); cy.get('.euiBasicTable .euiTableCellContent button').eq(0).click(); }; + const deleteVisualization = () => { cy.get('a[href = "#/event_analytics"]').click(); cy.get('.euiFlexGroup .euiFormControlLayout__childrenWrapper input') @@ -79,6 +83,7 @@ const deleteVisualization = () => { cy.get('button[data-test-subj = "popoverModal__deleteButton"]').click(); cy.get('.euiToastHeader').should('exist'); }; + describe('Adding sample data and visualization', () => { it('Adds sample flights data for event analytics', () => { cy.visit(`${Cypress.env('opensearchDashboards')}/app/home#/tutorial_directory/sampleData`); @@ -92,15 +97,11 @@ describe('Adding sample data and visualization', () => { describe('Has working breadcrumbs', () => { it('Redirect to correct page on breadcrumb click', () => { landOnEventExplorer(); - cy.wait(delay * 3); cy.get('.euiBreadcrumb[href="#/event_analytics/explorer"]').contains('Explorer').click(); - cy.wait(delay); cy.get('[data-test-subj="searchAutocompleteTextArea"]').should('exist'); cy.get('.euiBreadcrumb[href="#/event_analytics"]').contains('Event analytics').click(); - cy.wait(delay); cy.get('.euiTitle').contains('Event analytics').should('exist'); cy.get('.euiBreadcrumb[href="observability-dashboards#/"]').contains('Observability').click(); - cy.wait(delay); cy.get('.euiTitle').contains('Event analytics').should('exist'); }); }); @@ -121,7 +122,6 @@ describe('Search a query on event home', () => { expect(Object.values(state.queries)[0]['selectedDateRange'][0]).equal('now/y'); expect(Object.values(state.queries)[0]['selectedDateRange'][1]).equal('now'); }); - cy.wait(delay); cy.url().should('contain', '#/event_analytics/explorer'); cy.get('[data-test-subj="searchAutocompleteTextArea"]').contains(TEST_QUERIES[0].query); @@ -129,30 +129,31 @@ describe('Search a query on event home', () => { }); describe('Open flyout for a data row to see details', () => { - beforeEach(() => { + before(() => { landOnEventExplorer(); + clearQuerySearchBoxText('searchAutocompleteTextArea'); querySearch(TEST_QUERIES[0].query, TEST_QUERIES[0].dateRangeDOM); }); it('Should be able to open flyout and see data, json and traces', () => { cy.get('[data-test-subj="docTable"] tbody tr button.euiButtonIcon').first().click(); + supressResizeObserverIssue(); cy.get('.observability-flyout').should('exist'); + cy.get('.observability-flyout .osdDocViewer .euiTabs span.euiTab__content') + .contains('Table') + .should('be.visible'); cy.get('.observability-flyout .osdDocViewer .euiTabs span.euiTab__content') .contains('JSON') - .click(); + .should('be.visible'); cy.get('.observability-flyout .osdDocViewer .euiTabs span.euiTab__content') .contains('Traces') - .click(); - cy.get('.observability-flyout .osdDocViewer .euiTabs span.euiTab__content') - .contains('Table') - .click(); + .should('be.visible'); }); it('Should be able to see srrounding docs', () => { - cy.get('[data-test-subj="docTable"] tbody tr button.euiButtonIcon').first().click(); - cy.get('.observability-flyout').should('exist'); cy.get('.observability-flyout span.euiButton__text') .contains('View surrounding events') + .should('be.visible') .click(); cy.get('.observability-flyout #surroundingFyout') .contains('View surrounding events') @@ -161,7 +162,7 @@ describe('Open flyout for a data row to see details', () => { }); describe('Add/delete/switch explorer top level tabs', () => { - beforeEach(() => { + before(() => { landOnEventExplorer(); }); @@ -184,7 +185,7 @@ describe('Add/delete/switch explorer top level tabs', () => { .first() .click(); cy.wait(delay); - + supressResizeObserverIssue(); cy.get('[data-test-subj="eventExplorer__topLevelTabbing"]') .find('button.euiTab') .first() @@ -237,32 +238,6 @@ describe('Add/delete/switch explorer top level tabs', () => { }); }); -describe('Load a saved query from event home', () => { - it('Click on a saved query and redirect to explorer', () => { - landOnEventExplorer(); - querySearch(TEST_QUERIES[0].query, TEST_QUERIES[0].dateRangeDOM); - - cy.get('.tab-title').contains('Events').click(); - cy.get('[data-test-subj="eventExplorer__saveManagementPopover"]').click(); - cy.get('[data-test-subj="eventExplorer__querySaveName"]').type(SAVE_QUERY4); - cy.get('[data-test-subj="eventExplorer__querySaveConfirm"]').click(); - cy.wait(delay * 2); - - cy.get('.euiToastHeader__title').contains('successfully').should('exist'); - - landOnEventHome(); - - cy.get('[data-test-subj="eventHome__savedQueryTableName"]') - .first() - .contains(SAVE_QUERY4) - .click(); - cy.wait(delay); - - cy.url().should('contain', '#/event_analytics/explorer'); - cy.get('[data-test-subj="searchAutocompleteTextArea"]').contains(TEST_QUERIES[0].query); - }); -}); - describe('Click actions', () => { beforeEach(() => { landOnEventHome(); @@ -296,40 +271,18 @@ describe('Click actions', () => { }); describe('Saves a query on explorer page', () => { - it('Saves a query on event tab of explorer page', () => { - landOnEventExplorer(); - querySearch(TEST_QUERIES[0].query, TEST_QUERIES[0].dateRangeDOM); - cy.wait(delay); - - cy.get('.tab-title').contains('Events').click(); - cy.get('[data-test-subj="eventExplorer__saveManagementPopover"]').click(); - cy.wait(delay); - cy.get('[data-test-subj="eventExplorer__querySaveName"]').type(SAVE_QUERY1); - cy.get('[data-test-subj="eventExplorer__querySaveConfirm"]').click(); - cy.wait(delay * 2); - - cy.get('.euiToastHeader__title').contains('successfully').should('exist'); - - landOnEventHome(); - - cy.get('[data-test-subj="eventHome__savedQueryTableName"]').first().contains(SAVE_QUERY1); - }); - it('Saves a visualization on visualization tab of explorer page', () => { landOnEventExplorer(); querySearch(TEST_QUERIES[1].query, TEST_QUERIES[1].dateRangeDOM); - cy.wait(delay); supressResizeObserverIssue(); cy.get('button[id="main-content-vis"]').contains('Visualizations').click(); cy.get('[data-test-subj="eventExplorer__saveManagementPopover"]').click(); - cy.wait(delay * 2); - cy.get( - '[data-test-subj="eventExplorer__querySaveComboBox"] [data-test-subj="comboBoxToggleListButton"]' - ).click(); - cy.get('[data-test-subj="eventExplorer__querySaveName"]').type(SAVE_QUERY2); + cy.get('[data-test-subj="eventExplorer__querySaveName"]') + .focus() + .type(SAVE_QUERY2, { force: true }); + cy.get('[data-test-subj="eventExplorer__querySaveConfirm"]').click(); cy.wait(delay * 2); - cy.get('.euiToastHeader__title').contains('successfully').should('exist'); landOnEventHome(); @@ -346,35 +299,73 @@ describe('Saves a query on explorer page', () => { .contains(/^Create$/) .click(); cy.wait(delay); - landOnEventExplorer(); querySearch(TEST_QUERIES[1].query, TEST_QUERIES[1].dateRangeDOM); - cy.wait(delay); - supressResizeObserverIssue(); - cy.get('button[id="main-content-vis"]').contains('Visualizations').click(); + cy.get('button[id="main-content-vis"]', { timeout: COMMAND_TIMEOUT_LONG }) + .contains('Visualizations') + .click(); cy.get('[data-test-subj="eventExplorer__saveManagementPopover"]').click(); - cy.wait(delay * 2); - cy.get( - '[data-test-subj="eventExplorer__querySaveComboBox"] [data-test-subj="comboBoxToggleListButton"]' - ).click(); - cy.get('[data-test-subj="eventExplorer__querySaveName"]').type(SAVE_QUERY3); + cy.get('[data-test-subj="eventExplorer__querySaveName"]') + .focus() + .type(SAVE_QUERY3, { force: true }); cy.get('[data-test-subj="eventExplorer__querySaveComboBox"]').type(TESTING_PANEL); cy.get(`input[value="${TESTING_PANEL}"]`).click(); - cy.get( - '[data-test-subj="eventExplorer__querySaveComboBox"] [data-test-subj="comboBoxToggleListButton"]' - ).click(); - cy.get('[data-test-subj="eventExplorer__querySaveConfirm"]').click(); + cy.get('[data-test-subj="eventExplorer__querySaveConfirm"]').click({ force: true }); cy.wait(delay); - cy.get('.euiToastHeader__title').contains('successfully').should('exist'); }); + + it('Saves a query on event tab of explorer page', () => { + landOnEventExplorer(); + querySearch(TEST_QUERIES[0].query, TEST_QUERIES[0].dateRangeDOM); + + cy.get('.tab-title').contains('Events').click(); + cy.get('[data-test-subj="eventExplorer__saveManagementPopover"]').click(); + cy.get('[data-test-subj="eventExplorer__querySaveName"]').type(SAVE_QUERY1); + cy.get('[data-test-subj="eventExplorer__querySaveConfirm"]').click(); + cy.wait(delay * 2); + + cy.get('.euiToastHeader__title', { timeout: COMMAND_TIMEOUT_LONG }) + .contains('successfully') + .should('exist'); + + landOnEventHome(); + + cy.get('[data-test-subj="eventHome__savedQueryTableName"]').first().contains(SAVE_QUERY1); + }); + + it('Click on a saved query from event analytics home', () => { + landOnEventExplorer(); + querySearch(TEST_QUERIES[0].query, TEST_QUERIES[0].dateRangeDOM); + + cy.get('.tab-title').contains('Events').click(); + cy.get('[data-test-subj="eventExplorer__saveManagementPopover"]').click(); + cy.get('[data-test-subj="eventExplorer__querySaveName"]').type(SAVE_QUERY4); + cy.get('[data-test-subj="eventExplorer__querySaveConfirm"]').click(); + cy.wait(delay * 2); + cy.get('.euiToastHeader__title', { timeout: COMMAND_TIMEOUT_LONG }) + .contains('successfully') + .should('exist'); + + landOnEventHome(); + + cy.get('[data-test-subj="eventHome__savedQueryTableName"]') + .first() + .contains(SAVE_QUERY4) + .click(); + + cy.url().should('contain', '#/event_analytics/explorer'); + cy.get('[data-test-subj="searchAutocompleteTextArea"]', { + timeout: COMMAND_TIMEOUT_LONG, + }).contains(TEST_QUERIES[0].query); + }); }); describe('Override timestamp for an index', () => { it('Click override button to override default timestamp', () => { landOnEventExplorer(); - + clearQuerySearchBoxText('searchAutocompleteTextArea'); cy.get('[data-test-subj="searchAutocompleteTextArea"]').type(TEST_QUERIES[2].query); cy.get('[data-test-subj="superDatePickerApplyTimeButton"]').contains('Refresh').click(); cy.get('.tab-title').contains('Events').click(); @@ -394,8 +385,6 @@ describe('Toggle sidebar fields', () => { it('Toggle fields between available and selected section', () => { landOnEventExplorer(); querySearch(TEST_QUERIES[0].query, YEAR_TO_DATE_DOM_ID); - cy.wait(delay); - cy.get('[data-test-subj="fieldToggle-AvgTicketPrice"]').click(); cy.get('[data-test-subj="field-AvgTicketPrice"]').should('exist'); cy.get('[data-test-subj="docTable"]').find('th').contains('_source').should('not.exist'); @@ -409,8 +398,6 @@ describe('Search fields in sidebar', () => { it('Search a field', () => { landOnEventExplorer(); querySearch(TEST_QUERIES[0].query, YEAR_TO_DATE_DOM_ID); - cy.wait(delay); - cy.get('[data-test-subj="eventExplorer__sidebarSearch"]').type('A'); cy.get('[data-test-subj="field-Cancelled"]').should('not.exist'); cy.get('[data-test-subj="field-AvgTicketPrice"]').should('exist'); @@ -425,18 +412,12 @@ describe('Delete saved objects', () => { cy.get('[data-test-subj="tablePaginationPopoverButton"]').click(); cy.get('.euiContextMenuItem__text').contains('50 rows').click(); cy.get('.euiCheckbox__input[data-test-subj="checkboxSelectAll"]').click(); - cy.wait(delay); cy.get('.euiButton__text').contains('Actions').click(); - cy.wait(delay); cy.get('.euiContextMenuItem__text').contains('Delete').click(); - cy.wait(delay); - cy.get('button.euiButton--danger').should('be.disabled'); - cy.get('input.euiFieldText[placeholder="delete"]').type('delete'); cy.get('button.euiButton--danger').should('not.be.disabled'); cy.get('.euiButton__text').contains('Delete').click(); - cy.wait(delay * 4); cy.get('.euiTextAlign').contains('No Queries or Visualizations').should('exist'); }); }); @@ -507,13 +488,10 @@ describe('Switch on and off livetail', () => { describe('Live tail stop automatically', () => { it('Moving to other tab should stop live tail automatically', () => { landOnEventExplorer(); - cy.wait(delay); - + clearQuerySearchBoxText('searchAutocompleteTextArea'); cy.get('[data-test-subj="searchAutocompleteTextArea"]').type(TEST_QUERIES[1].query); - cy.get('[data-test-subj=eventLiveTail]').click(); cy.get('[data-test-subj=eventLiveTail__delay10s]').click(); - cy.wait(delay * 2); cy.get('.euiToastHeader__title').contains('On').should('exist'); }); @@ -530,12 +508,14 @@ describe('Live tail stop automatically', () => { }); it('Click to switch to another tab', () => { - cy.get('[data-test-subj="eventExplorer__addNewTab"]').click(); - cy.get('[data-test-subj="eventExplorer__topLevelTabbing"]') + cy.get('[data-test-subj="eventExplorer__addNewTab"]', { + timeout: COMMAND_TIMEOUT_LONG, + }).click(); + cy.get('[data-test-subj="eventExplorer__topLevelTabbing"]', { timeout: COMMAND_TIMEOUT_LONG }) .find('button.euiTab') .first() .click(); - cy.wait(delay); + supressResizeObserverIssue(); cy.get('[data-test-subj="eventExplorer__topLevelTabbing"]') .find('button.euiTab') @@ -544,14 +524,19 @@ describe('Live tail stop automatically', () => { }); it('Close current selected tab', () => { - cy.get('[data-test-subj="eventExplorer__addNewTab"]').click(); - cy.get('[data-test-subj="eventExplorer__addNewTab"]').click(); + cy.get('[data-test-subj="eventExplorer__addNewTab"]', { + timeout: COMMAND_TIMEOUT_LONG, + }).click(); + cy.get('[data-test-subj="eventExplorer__addNewTab"]', { + timeout: COMMAND_TIMEOUT_LONG, + }).click(); cy.get('[data-test-subj="eventExplorer__topLevelTabbing"]') .find('button.euiTab') .then((lists) => { const initialLength = Cypress.$(lists).length; cy.get('[data-test-subj="eventExplorer__topLevelTabbing"] button.euiTab').eq(1).click(); cy.get('button.euiTab-isSelected [data-test-subj="eventExplorer__tabClose"]').click(); + supressResizeObserverIssue(); cy.get('[data-test-subj="eventExplorer__topLevelTabbing"]') .find('button.euiTab') .should('have.length', initialLength - 1); @@ -563,21 +548,10 @@ describe('Live tail stop automatically', () => { }); }); -describe('Renders noresult chart', () => { - beforeEach(() => { - landOnEventVisualizations(); - }); - - it('It should render no result when there is no data', () => { - cy.get('[data-test-subj="vizWorkspace__noData"] p') - .contains('No results found') - .should('exist'); - }); -}); - -describe('Renders bar charts', () => { +describe.skip('Renders bar charts', () => { beforeEach(() => { landOnEventVisualizations(); + clearQuerySearchBoxText('searchAutocompleteTextArea'); }); it('Renders vertical bar chart', () => { @@ -633,7 +607,7 @@ describe('Renders bar charts', () => { }); }); -describe('Renders line charts', () => { +describe.skip('Renders line charts', () => { beforeEach(() => { landOnEventVisualizations(); }); @@ -662,9 +636,10 @@ describe('Renders line charts', () => { }); }); -describe('Renders pie charts', () => { +describe.skip('Renders pie charts', () => { beforeEach(() => { landOnEventVisualizations(); + clearQuerySearchBoxText('searchAutocompleteTextArea'); }); it('Renders pie chart', () => { @@ -678,9 +653,10 @@ describe('Renders pie charts', () => { }); }); -describe('Renders heatmap chart', () => { +describe.skip('Renders heatmap chart', () => { beforeEach(() => { landOnEventVisualizations(); + clearQuerySearchBoxText('searchAutocompleteTextArea'); }); it('Renders heatmap chart with different z-axes', () => { @@ -704,12 +680,10 @@ describe('Renders heatmap chart', () => { }); }); -describe('Renders markdown chart', () => { - beforeEach(() => { - landOnEventVisualizations(); - }); - +describe.skip('Renders markdown chart', () => { it('Renders markdown chart with test title', () => { + landOnEventVisualizations(); + clearQuerySearchBoxText('searchAutocompleteTextArea'); querySearch(TEST_QUERIES[3].query, TEST_QUERIES[3].dateRangeDOM); cy.get( '[data-test-subj="configPane__vizTypeSelector"] [data-test-subj="comboBoxInput"]' @@ -725,12 +699,10 @@ describe('Renders markdown chart', () => { }); }); -describe('Renders data view', () => { - beforeEach(() => { - landOnEventVisualizations(); - }); - +describe.skip('Renders data view', () => { it('Switch views between data table and visualization workspace', () => { + landOnEventVisualizations(); + clearQuerySearchBoxText('searchAutocompleteTextArea'); querySearch(TEST_QUERIES[3].query, TEST_QUERIES[3].dateRangeDOM); cy.get('[data-test-subj="workspace__dataTableViewSwitch"]').click(); cy.get('[data-test-subj="workspace__dataTable"]').should('exist'); @@ -739,7 +711,7 @@ describe('Renders data view', () => { }); }); -describe('Renders chart and verify Toast message if X-axis and Y-axis values are empty', () => { +describe.skip('Renders chart and verify Toast message if X-axis and Y-axis values are empty', () => { beforeEach(() => { landOnEventVisualizations(); }); @@ -806,9 +778,10 @@ describe('Renders chart and verify Toast message if X-axis and Y-axis values are }); }); -describe('Render Table View', () => { - beforeEach(() => { +describe.skip('Render Table View', () => { + before(() => { landOnEventVisualizations(); + clearQuerySearchBoxText('searchAutocompleteTextArea'); querySearch(TEST_QUERIES[3].query, TEST_QUERIES[3].dateRangeDOM); cy.get('[data-test-subj="workspace__dataTableViewSwitch"]').click(); }); @@ -864,20 +837,21 @@ describe('Render Table View', () => { cy.get('[aria-label="Page 4"]').contains('4').click(); cy.get('.ag-cell-value').contains('Edmonton').should('exist'); }); + it('Switch visualization for table view and rows per page data', () => { cy.get('.euiButtonEmpty__text').eq('6').click(); cy.get('.euiContextMenuItem__text').eq(1).click(); }); }); -describe('Render Time series chart/Line chart and verify Data configurations UI ', () => { +describe.skip('Render Time series chart/Line chart and verify Data configurations UI ', () => { it('Render line chart and verify Data Configuration Panel', () => { renderLineChartForDataConfig(); DataConfigLineChart(); }); }); -describe('Renders Data Configurations section for Pie chart', () => { +describe.skip('Renders Data Configurations section for Pie chart', () => { beforeEach(() => { landOnEventVisualizations(); }); @@ -906,7 +880,7 @@ describe('Renders Data Configurations section for Pie chart', () => { cy.get('.euiTitle.euiTitle--xxsmall').eq(1).contains('Dimensions').should('exist'); cy.get('.first-division .euiFormLabel.euiFormRow__label').eq(0).contains('Aggregation'); cy.get('[data-test-subj="comboBoxSearchInput"]').eq(0).click(); - aggregationValues.forEach(function (value){ + aggregationValues.forEach(function (value) { cy.get('.euiComboBoxOption__content').contains(value); }); }); @@ -917,28 +891,32 @@ describe('Renders Data Configurations section for Pie chart', () => { cy.get('.euiResizableButton.euiResizableButton--horizontal').eq(1).click(); cy.get('[data-test-subj="panel-1-toggle"]').click(); cy.get('[class*="euiResizableToggleButton-isCollapsed"]').eq(1).should('exist'); -describe('Renders Histogram chart', () => { + }); +}); + +describe.skip('Renders Histogram chart', () => { beforeEach(() => { landOnEventVisualizations(); -}); + }); -it('Renders Histogram chart and save visualization', () => { - renderHistogramChart(); + it('Renders Histogram chart and save visualization', () => { + renderHistogramChart(); cy.get('.euiFlexItem.euiFlexItem--flexGrowZero .euiButton__text').eq(2).click(); cy.wait(delay); saveVisualizationAndVerify(); }); - it('Delete Visualization for Histogram chart from list of saved Visualizations on Event analytics page', () =>{ - deleteVisualization(); - }) + it('Delete Visualization for Histogram chart from list of saved Visualizations on Event analytics page', () => { + deleteVisualization(); + }); - it('Renders Histogram chart, add value parameters and verify Reset button click is working', () => { - renderHistogramChart(); + it('Renders Histogram chart, add value parameters and verify Reset button click is working', () => { + renderHistogramChart(); cy.get('[data-test-subj="visualizeEditorResetButton"]').click(); }); }); -describe('Render Gauge Chart and verify if data gets render', () => { + +describe.skip('Render Gauge Chart and verify if data gets render', () => { it('Render gauge chart and verify by default no data gets render', () => { renderGaugeChart(); cy.get('.main-svg').contains('BeatsWest').should('not.exist'); @@ -951,7 +929,7 @@ describe('Render Gauge Chart and verify if data gets render', () => { }); }); -describe('Render Gauge Chart and work with chart styles', () => { +describe.skip('Render Gauge Chart and work with chart styles', () => { it('Render gauge chart and change orientation to vertical', () => { renderGaugeChart(); cy.get('.euiButton__text').contains('Update chart').click(); @@ -966,7 +944,7 @@ describe('Render Gauge Chart and work with chart styles', () => { cy.get('[data-test-subj="valueFieldNumber"]').eq(0).type('30'); cy.get('.euiButton__text').contains('Preview').click(); }); - + it('Render gauge chart and change value size then verify the update on chart', () => { renderGaugeChart(); cy.get('.euiButton__text').contains('Update chart').click(); @@ -976,7 +954,7 @@ describe('Render Gauge Chart and work with chart styles', () => { }); }); -describe('Render Gauge Chart and work with threshold', () => { +describe.skip('Render Gauge Chart and work with threshold', () => { it('Render gauge chart and add threshold then verify by default the threshold is not seen', () => { renderGaugeChart(); cy.get('.euiButton__text').contains('Update chart').click(); @@ -1007,11 +985,11 @@ describe('Render Gauge Chart and work with threshold', () => { cy.get('.euiSwitch__label').contains('Show threshold markers').click(); cy.get('.euiButton__text').contains('Preview').click(); cy.get('path[style*="rgb(252, 5, 5)"]').eq(1).should('exist'); - cy.get('.bg-arc').find('path[style*="rgb(252, 5, 5)"]').should('have.length',4); + cy.get('.bg-arc').find('path[style*="rgb(252, 5, 5)"]').should('have.length', 4); }); }); -describe('Render gauge chart and verify if reset works properly', () => { +describe.skip('Render gauge chart and verify if reset works properly', () => { it('Render gauge chart with all feild data then click on reset and verify reset works properly', () => { renderGaugeChart(); cy.get('.euiButton__text').contains('Update chart').click(); @@ -1029,10 +1007,15 @@ describe('Render gauge chart and verify if reset works properly', () => { cy.get('.euiSwitch__label').contains('Show threshold markers').click(); cy.get('.euiButton__text').contains('Preview').click(); cy.get('.euiButtonEmpty__text').contains('Reset').click(); - cy.get('input[placeholder="Title"]').should('not.have.value','Gauge Chart'); - cy.get('textarea[placeholder="Description"]').should('not.have.value','Description For Gauge Chart') - cy.get('[data-test-subj="valueFieldNumber"]').eq(0).should('have.value',''); - cy.get('[data-test-subj="valueFieldNumber"]').eq(1).should('have.value',''); - cy.get('button.euiSwitch__button[aria-checked="false"]').should('exist').should('have.length',3); + cy.get('input[placeholder="Title"]').should('not.have.value', 'Gauge Chart'); + cy.get('textarea[placeholder="Description"]').should( + 'not.have.value', + 'Description For Gauge Chart' + ); + cy.get('[data-test-subj="valueFieldNumber"]').eq(0).should('have.value', ''); + cy.get('[data-test-subj="valueFieldNumber"]').eq(1).should('have.value', ''); + cy.get('button.euiSwitch__button[aria-checked="false"]') + .should('exist') + .should('have.length', 3); }); }); diff --git a/dashboards-observability/.cypress/integration/VisualizationCharts/10_scatter_chart.spec.js b/dashboards-observability/.cypress/integration/VisualizationCharts/10_scatter_chart.spec.js index d84e23b00..0c093812e 100644 --- a/dashboards-observability/.cypress/integration/VisualizationCharts/10_scatter_chart.spec.js +++ b/dashboards-observability/.cypress/integration/VisualizationCharts/10_scatter_chart.spec.js @@ -9,7 +9,7 @@ import { TEST_QUERIES, querySearch, landOnEventVisualizations - } from '../../utils/event_constants'; + } from '../../utils/event_analytics/constants'; const numberOfWindow = 4; const legendSize = 20; diff --git a/dashboards-observability/.cypress/integration/VisualizationCharts/11_horizontalBar_chart.spec.js b/dashboards-observability/.cypress/integration/VisualizationCharts/11_horizontalBar_chart.spec.js index a93030962..d8eba981e 100644 --- a/dashboards-observability/.cypress/integration/VisualizationCharts/11_horizontalBar_chart.spec.js +++ b/dashboards-observability/.cypress/integration/VisualizationCharts/11_horizontalBar_chart.spec.js @@ -9,7 +9,7 @@ import { TEST_QUERIES, querySearch, landOnEventVisualizations, - } from '../../utils/event_constants'; + } from '../../utils/event_analytics/constants'; const numberOfWindow = 4; const labelSize = 20; diff --git a/dashboards-observability/.cypress/integration/VisualizationCharts/12_boxPlot_chart.spec.js b/dashboards-observability/.cypress/integration/VisualizationCharts/12_boxPlot_chart.spec.js index d4dae465e..be143450b 100644 --- a/dashboards-observability/.cypress/integration/VisualizationCharts/12_boxPlot_chart.spec.js +++ b/dashboards-observability/.cypress/integration/VisualizationCharts/12_boxPlot_chart.spec.js @@ -9,7 +9,7 @@ import { TEST_QUERIES, querySearch, landOnEventVisualizations, -} from '../../utils/event_constants'; +} from '../../utils/event_analytics/constants'; const numberOfWindow = 4; const labelSize = 20; diff --git a/dashboards-observability/.cypress/integration/VisualizationCharts/13_logsView.spec.js b/dashboards-observability/.cypress/integration/VisualizationCharts/13_logsView.spec.js index 542e3d776..8f8b163da 100644 --- a/dashboards-observability/.cypress/integration/VisualizationCharts/13_logsView.spec.js +++ b/dashboards-observability/.cypress/integration/VisualizationCharts/13_logsView.spec.js @@ -11,7 +11,7 @@ import { landOnEventVisualizations, saveVisualizationAndVerify, deleteVisualization, -} from '../../utils/event_constants'; +} from '../../utils/event_analytics/constants'; const renderLogsView = () => { landOnEventVisualizations(); diff --git a/dashboards-observability/.cypress/integration/VisualizationCharts/13_stats_chart.spec.js b/dashboards-observability/.cypress/integration/VisualizationCharts/13_stats_chart.spec.js index 43e071f1e..f3c6c561a 100644 --- a/dashboards-observability/.cypress/integration/VisualizationCharts/13_stats_chart.spec.js +++ b/dashboards-observability/.cypress/integration/VisualizationCharts/13_stats_chart.spec.js @@ -9,7 +9,7 @@ import { TEST_QUERIES, querySearch, landOnEventVisualizations -} from '../../utils/event_constants'; +} from '../../utils/event_analytics/constants'; const numberOfWindow = 4; const metricsPrecisionUpdated = 2; diff --git a/dashboards-observability/.cypress/integration/VisualizationCharts/7_pie_chart.spec.js b/dashboards-observability/.cypress/integration/VisualizationCharts/7_pie_chart.spec.js index b731db10b..0167f6059 100644 --- a/dashboards-observability/.cypress/integration/VisualizationCharts/7_pie_chart.spec.js +++ b/dashboards-observability/.cypress/integration/VisualizationCharts/7_pie_chart.spec.js @@ -12,7 +12,7 @@ import { renderDataConfig, saveVisualizationAndVerify, deleteVisualization, - } from '../../utils/event_constants'; + } from '../../utils/event_analytics/constants'; const renderPieChart = () => { landOnEventVisualizations(); diff --git a/dashboards-observability/.cypress/integration/VisualizationCharts/9_coordinateMap_chart.spec.js b/dashboards-observability/.cypress/integration/VisualizationCharts/9_coordinateMap_chart.spec.js index 175011188..10569fe03 100644 --- a/dashboards-observability/.cypress/integration/VisualizationCharts/9_coordinateMap_chart.spec.js +++ b/dashboards-observability/.cypress/integration/VisualizationCharts/9_coordinateMap_chart.spec.js @@ -8,7 +8,7 @@ import { TEST_QUERIES, querySearch, landOnEventVisualizations -} from '../../utils/event_constants'; +} from '../../utils/event_analytics/constants'; const numberOfWindow = 4; const labelSize = 20; diff --git a/dashboards-observability/.cypress/utils/constants.js b/dashboards-observability/.cypress/utils/constants.js index d67d3988f..415679aba 100644 --- a/dashboards-observability/.cypress/utils/constants.js +++ b/dashboards-observability/.cypress/utils/constants.js @@ -4,6 +4,7 @@ */ export const delay = 1500; +export const COMMAND_TIMEOUT_LONG = 10000; // trace analytics export const TRACE_ID = '8832ed6abbb2a83516461960c89af49d'; diff --git a/dashboards-observability/.cypress/utils/event_constants.js b/dashboards-observability/.cypress/utils/event_analytics/constants.js similarity index 97% rename from dashboards-observability/.cypress/utils/event_constants.js rename to dashboards-observability/.cypress/utils/event_analytics/constants.js index 9e0f89697..8a996fd12 100644 --- a/dashboards-observability/.cypress/utils/event_constants.js +++ b/dashboards-observability/.cypress/utils/event_analytics/constants.js @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { supressResizeObserverIssue } from './constants'; +import { COMMAND_TIMEOUT_LONG, supressResizeObserverIssue, TIMEOUT_DELAY } from '../constants'; export const delay = 1000; export const YEAR_TO_DATE_DOM_ID = '[data-test-subj="superDatePickerCommonlyUsed_Year_to date"]'; @@ -72,10 +72,13 @@ export const aggregationValues = [ ]; export const querySearch = (query, rangeSelected) => { - cy.get('[data-test-subj="searchAutocompleteTextArea"]').type(query); + cy.get('[data-test-subj="searchAutocompleteTextArea"]', { timeout: COMMAND_TIMEOUT_LONG }) + .clear() + .focus() + .type(query, { delay: 50 }); cy.get('[data-test-subj="superDatePickerToggleQuickMenuButton"]').click(); - cy.wait(delay); cy.get(rangeSelected).click(); + cy.wait(delay * 2); cy.get('[data-test-subj="superDatePickerApplyTimeButton"]').contains('Refresh').click(); }; @@ -88,6 +91,7 @@ export const landOnEventExplorer = () => { cy.visit( `${Cypress.env('opensearchDashboards')}/app/observability-dashboards#/event_analytics/explorer` ); + supressResizeObserverIssue(); cy.wait(delay); }; diff --git a/dashboards-observability/.cypress/utils/event_analytics/helpers.js b/dashboards-observability/.cypress/utils/event_analytics/helpers.js new file mode 100644 index 000000000..32944db75 --- /dev/null +++ b/dashboards-observability/.cypress/utils/event_analytics/helpers.js @@ -0,0 +1,12 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +import { COMMAND_TIMEOUT_LONG } from '../constants'; + +export const clearQuerySearchBoxText = (testSubjectName) => { + cy.get(`[data-test-subj="${testSubjectName}"]`, { + timeout: COMMAND_TIMEOUT_LONG, + }).clear({ force: true }); +}; diff --git a/dashboards-observability/common/constants/explorer.ts b/dashboards-observability/common/constants/explorer.ts index 96908eab0..75393f177 100644 --- a/dashboards-observability/common/constants/explorer.ts +++ b/dashboards-observability/common/constants/explorer.ts @@ -15,6 +15,9 @@ export const RAW_QUERY = 'rawQuery'; export const FINAL_QUERY = 'finalQuery'; export const SELECTED_DATE_RANGE = 'selectedDateRange'; export const INDEX = 'index'; +export const SELECTED_PATTERN_FIELD = 'selectedPatternField'; +export const PATTERN_REGEX = 'patternRegex'; +export const FILTERED_PATTERN = 'filteredPattern'; export const SELECTED_TIMESTAMP = 'selectedTimestamp'; export const SELECTED_FIELDS = 'selectedFields'; export const UNSELECTED_FIELDS = 'unselectedFields'; @@ -29,7 +32,7 @@ export const TAB_CHART_ID_TXT_PFX = 'main-content-vis-'; export const TAB_EVENT_ID = 'main-content-events'; export const TAB_CHART_ID = 'main-content-vis'; export const HAS_SAVED_TIMESTAMP = 'hasSavedTimestamp'; -export const FILTER_OPTIONS = ['Visualization', 'Query']; +export const FILTER_OPTIONS = ['Visualization', 'Query', 'Metric']; export const SAVED_QUERY = 'savedQuery'; export const SAVED_VISUALIZATION = 'savedVisualization'; export const SAVED_OBJECT_ID = 'savedObjectId'; @@ -78,11 +81,16 @@ export const REDUX_EXPL_SLICE_FIELDS = 'fields'; export const REDUX_EXPL_SLICE_QUERY_TABS = 'queryTabs'; export const REDUX_EXPL_SLICE_VISUALIZATION = 'explorerVisualization'; export const REDUX_EXPL_SLICE_COUNT_DISTRIBUTION = 'countDistributionVisualization'; +export const REDUX_EXPL_SLICE_PATTERNS = 'patterns'; export const PLOTLY_GAUGE_COLUMN_NUMBER = 4; export const APP_ANALYTICS_TAB_ID_REGEX = /application-analytics-tab.+/; export const DEFAULT_AVAILABILITY_QUERY = 'stats count() by span( timestamp, 1h )'; +export const PPL_DEFAULT_PATTERN_REGEX_FILETER = '[a-zA-Z\\d]'; +// Greedily matches the longest substring for example (patterns referer | patterns pattern='[0-9]' message | where ...) used to modify the query for patterns table +export const PATTERNS_REGEX = /\|\s*patterns.+?\|.*\s*where\s+patterns_field\s*\=\s*'[^a-zA-Z0-9]+'/; +// Used to extract the initial pattern applied +export const PATTERNS_EXTRACTOR_REGEX = /patterns\s+(?\S+)/; export const ADD_BUTTON_TEXT = '+ Add color theme'; -export const ADD_SERIES_POSITION_TEXT = '+ Add label position'; export const NUMBER_INPUT_MIN_LIMIT = 1; export const VIZ_CONTAIN_XY_AXIS = [ @@ -281,7 +289,13 @@ export const DATA_CONFIG_HINTS_INFO = { [BREAKDOWNS]: "Defines how each series is broken down. Breakdowns are 'by' clauses that subdivide the existing series.", }; -export const SERIES_POSITION_OPTIONS = [ - { id: htmlIdGenerator('ct')(), label: 'Left', side: 'left' }, - { id: htmlIdGenerator('ct')(), label: 'Right', side: 'right' }, -]; + +// Metrics constants +export const UNITS_OF_MEASURE = [ + 'seconds (s)', + 'hours (h)', + 'celsius (C)', + 'farenheit (F)', + 'meters (m)', + 'kilometers (k)', +] diff --git a/dashboards-observability/common/constants/metrics.ts b/dashboards-observability/common/constants/metrics.ts new file mode 100644 index 000000000..dbe64b88b --- /dev/null +++ b/dashboards-observability/common/constants/metrics.ts @@ -0,0 +1,26 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +// requests constants +export const VISUALIZATION = 'viz'; +export const SAVED_VISUALIZATION = 'savedVisualization'; +export const PPL_DATASOURCES_REQUEST = + 'show datasources | where CONNECTOR_TYPE="PROMETHEUS" | fields DATASOURCE_NAME'; + +// redux +export const REDUX_SLICE_METRICS = 'metrics'; + +export const resolutionOptions = [ + { value: 's', text: 'seconds' }, + { value: 'm', text: 'minutes' }, + { value: 'h', text: 'hours' }, + { value: 'd', text: 'days' }, + // { value: 'M', text: 'Months' }, // commenting it here as prometheus doesn't have support + // { value: 'q', text: 'quarters' }, + { value: 'y', text: 'years' }, +]; + +export const DEFAULT_METRIC_HEIGHT = 2; +export const DEFAULT_METRIC_WIDTH = 12; diff --git a/dashboards-observability/common/constants/shared.ts b/dashboards-observability/common/constants/shared.ts index 0d56653ff..c24e76fcc 100644 --- a/dashboards-observability/common/constants/shared.ts +++ b/dashboards-observability/common/constants/shared.ts @@ -31,6 +31,8 @@ export const observabilityPluginOrder = 6000; export const SQL_DOCUMENTATION_URL = 'https://opensearch.org/docs/latest/search-plugins/sql/index/'; export const PPL_DOCUMENTATION_URL = 'https://opensearch.org/docs/latest/observability-plugin/ppl/commands/'; +export const PPL_PATTERNS_DOCUMENTATION_URL = + 'https://github.com/opensearch-project/sql/blob/2.x/docs/user/ppl/cmd/patterns.rst#description'; export const UI_DATE_FORMAT = 'MM/DD/YYYY hh:mm A'; export const PPL_DATE_FORMAT = 'YYYY-MM-DD HH:mm:ss.SSSSSS'; export const SPAN_REGEX = /span/; diff --git a/dashboards-observability/common/query_manager/antlr/grammar/OpenSearchPPLLexer.g4 b/dashboards-observability/common/query_manager/antlr/grammar/OpenSearchPPLLexer.g4 index c30967a77..f51386796 100644 --- a/dashboards-observability/common/query_manager/antlr/grammar/OpenSearchPPLLexer.g4 +++ b/dashboards-observability/common/query_manager/antlr/grammar/OpenSearchPPLLexer.g4 @@ -11,6 +11,8 @@ channels { WHITESPACE, ERRORCHANNEL } // COMMAND KEYWORDS SEARCH: 'SEARCH'; +DESCRIBE: 'DESCRIBE'; +SHOW: 'SHOW'; FROM: 'FROM'; WHERE: 'WHERE'; FIELDS: 'FIELDS'; @@ -23,8 +25,16 @@ HEAD: 'HEAD'; TOP: 'TOP'; RARE: 'RARE'; PARSE: 'PARSE'; +METHOD: 'METHOD'; +REGEX: 'REGEX'; +PUNCT: 'PUNCT'; +GROK: 'GROK'; +PATTERN: 'PATTERN'; +PATTERNS: 'PATTERNS'; +NEW_FIELD: 'NEW_FIELD'; KMEANS: 'KMEANS'; AD: 'AD'; +ML: 'ML'; // COMMAND ASSIST KEYWORDS AS: 'AS'; @@ -33,6 +43,7 @@ SOURCE: 'SOURCE'; INDEX: 'INDEX'; D: 'D'; DESC: 'DESC'; +CATALOGS: 'CATALOGS'; // CLAUSE KEYWORDS SORTBY: 'SORTBY'; @@ -59,6 +70,7 @@ SAMPLE_SIZE: 'SAMPLE_SIZE'; OUTPUT_AFTER: 'OUTPUT_AFTER'; TIME_DECAY: 'TIME_DECAY'; ANOMALY_RATE: 'ANOMALY_RATE'; +CATEGORY_FIELD: 'CATEGORY_FIELD'; TIME_FIELD: 'TIME_FIELD'; TIME_ZONE: 'TIME_ZONE'; TRAINING_DATA_SIZE: 'TRAINING_DATA_SIZE'; @@ -101,6 +113,7 @@ DAY_SECOND: 'DAY_SECOND'; DAY_MINUTE: 'DAY_MINUTE'; DAY_HOUR: 'DAY_HOUR'; YEAR_MONTH: 'YEAR_MONTH'; +CONVERT_TZ: 'CONVERT_TZ'; // DATASET TYPES DATAMODEL: 'DATAMODEL'; @@ -168,6 +181,7 @@ VAR_POP: 'VAR_POP'; STDDEV_SAMP: 'STDDEV_SAMP'; STDDEV_POP: 'STDDEV_POP'; PERCENTILE: 'PERCENTILE'; +TAKE: 'TAKE'; FIRST: 'FIRST'; LAST: 'LAST'; LIST: 'LIST'; @@ -222,21 +236,39 @@ TAN: 'TAN'; // DATE AND TIME FUNCTIONS ADDDATE: 'ADDDATE'; +CURDATE: 'CURDATE'; +CURRENT_DATE: 'CURRENT_DATE'; +CURRENT_TIME: 'CURRENT_TIME'; +CURRENT_TIMESTAMP: 'CURRENT_TIMESTAMP'; +CURTIME: 'CURTIME'; DATE: 'DATE'; DATE_ADD: 'DATE_ADD'; +DATE_FORMAT: 'DATE_FORMAT'; DATE_SUB: 'DATE_SUB'; +DAYNAME: 'DAYNAME'; DAYOFMONTH: 'DAYOFMONTH'; DAYOFWEEK: 'DAYOFWEEK'; DAYOFYEAR: 'DAYOFYEAR'; -DAYNAME: 'DAYNAME'; FROM_DAYS: 'FROM_DAYS'; +LOCALTIME: 'LOCALTIME'; +LOCALTIMESTAMP: 'LOCALTIMESTAMP'; +FROM_UNIXTIME: 'FROM_UNIXTIME'; +MAKEDATE: 'MAKEDATE'; +MAKETIME: 'MAKETIME'; MONTHNAME: 'MONTHNAME'; +NOW: 'NOW'; +PERIOD_ADD: 'PERIOD_ADD'; +PERIOD_DIFF: 'PERIOD_DIFF'; SUBDATE: 'SUBDATE'; +SYSDATE: 'SYSDATE'; TIME: 'TIME'; TIME_TO_SEC: 'TIME_TO_SEC'; TIMESTAMP: 'TIMESTAMP'; -DATE_FORMAT: 'DATE_FORMAT'; TO_DAYS: 'TO_DAYS'; +UTC_DATE: 'UTC_DATE'; +UTC_TIME: 'UTC_TIME'; +UTC_TIMESTAMP: 'UTC_TIMESTAMP'; +UNIX_TIMESTAMP: 'UNIX_TIMESTAMP'; // TEXT FUNCTIONS SUBSTR: 'SUBSTR'; @@ -267,11 +299,16 @@ ISNOTNULL: 'ISNOTNULL'; IFNULL: 'IFNULL'; NULLIF: 'NULLIF'; IF: 'IF'; +TYPEOF: 'TYPEOF'; // RELEVANCE FUNCTIONS AND PARAMETERS MATCH: 'MATCH'; MATCH_PHRASE: 'MATCH_PHRASE'; +MATCH_PHRASE_PREFIX: 'MATCH_PHRASE_PREFIX'; +MATCH_BOOL_PREFIX: 'MATCH_BOOL_PREFIX'; SIMPLE_QUERY_STRING: 'SIMPLE_QUERY_STRING'; +MULTI_MATCH: 'MULTI_MATCH'; +QUERY_STRING: 'QUERY_STRING'; ALLOW_LEADING_WILDCARD: 'ALLOW_LEADING_WILDCARD'; ANALYZE_WILDCARD: 'ANALYZE_WILDCARD'; @@ -282,6 +319,7 @@ CUTOFF_FREQUENCY: 'CUTOFF_FREQUENCY'; DEFAULT_FIELD: 'DEFAULT_FIELD'; DEFAULT_OPERATOR: 'DEFAULT_OPERATOR'; ENABLE_POSITION_INCREMENTS: 'ENABLE_POSITION_INCREMENTS'; +ESCAPE: 'ESCAPE'; FLAGS: 'FLAGS'; FUZZY_MAX_EXPANSIONS: 'FUZZY_MAX_EXPANSIONS'; FUZZY_PREFIX_LENGTH: 'FUZZY_PREFIX_LENGTH'; diff --git a/dashboards-observability/common/query_manager/antlr/grammar/OpenSearchPPLParser.g4 b/dashboards-observability/common/query_manager/antlr/grammar/OpenSearchPPLParser.g4 index de96295f9..3909cef29 100644 --- a/dashboards-observability/common/query_manager/antlr/grammar/OpenSearchPPLParser.g4 +++ b/dashboards-observability/common/query_manager/antlr/grammar/OpenSearchPPLParser.g4 @@ -14,13 +14,19 @@ root /** statement */ pplStatement - : searchCommand (PIPE commands)* + : pplCommands (PIPE commands)* ; /** commands */ +pplCommands + : searchCommand + | describeCommand + | showCatalogsCommand + ; + commands : whereCommand | fieldsCommand | renameCommand | statsCommand | dedupCommand | sortCommand | evalCommand | headCommand - | topCommand | rareCommand | parseCommand | kmeansCommand | adCommand; + | topCommand | rareCommand | grokCommand | parseCommand | patternsCommand | kmeansCommand | adCommand | mlCommand; searchCommand : (SEARCH)? fromClause #searchFrom @@ -28,6 +34,14 @@ searchCommand | (SEARCH)? logicalExpression fromClause #searchFilterFrom ; +describeCommand + : DESCRIBE tableSourceClause + ; + +showCatalogsCommand + : SHOW CATALOGS + ; + whereCommand : WHERE logicalExpression ; @@ -85,10 +99,27 @@ rareCommand (byClause)? ; +grokCommand + : GROK (source_field=expression) (pattern=stringLiteral) + ; + parseCommand - : PARSE expression pattern + : PARSE (source_field=expression) (pattern=stringLiteral) ; - + +patternsCommand + : PATTERNS (patternsParameter)* (source_field=expression) + ; + +patternsParameter + : (NEW_FIELD EQUAL new_field=stringLiteral) + | (PATTERN EQUAL pattern=stringLiteral) + ; + +patternsMethod + : PUNCT | REGEX + ; + kmeansCommand : KMEANS (kmeansParameter)* ; @@ -110,6 +141,7 @@ adParameter | (OUTPUT_AFTER EQUAL output_after=integerLiteral) | (TIME_DECAY EQUAL time_decay=decimalLiteral) | (ANOMALY_RATE EQUAL anomaly_rate=decimalLiteral) + | (CATEGORY_FIELD EQUAL category_field=stringLiteral) | (TIME_FIELD EQUAL time_field=stringLiteral) | (DATE_FORMAT EQUAL date_format=stringLiteral) | (TIME_ZONE EQUAL time_zone=stringLiteral) @@ -117,10 +149,24 @@ adParameter | (ANOMALY_SCORE_THRESHOLD EQUAL anomaly_score_threshold=decimalLiteral) ; +mlCommand + : ML (mlArg)* + ; + +mlArg + : (argName=ident EQUAL argValue=literalValue) + ; + /** clauses */ fromClause - : SOURCE EQUAL tableSource (COMMA tableSource)* - | INDEX EQUAL tableSource (COMMA tableSource)* + : SOURCE EQUAL tableSourceClause + | INDEX EQUAL tableSourceClause + | SOURCE EQUAL tableFunction + | INDEX EQUAL tableFunction + ; + +tableSourceClause + : tableSource (COMMA tableSource)* ; renameClasue @@ -164,12 +210,17 @@ statsFunction | COUNT LT_PRTHS RT_PRTHS #countAllFunctionCall | (DISTINCT_COUNT | DC) LT_PRTHS valueExpression RT_PRTHS #distinctCountFunctionCall | percentileAggFunction #percentileAggFunctionCall + | takeAggFunction #takeAggFunctionCall ; statsFunctionName : AVG | COUNT | SUM | MIN | MAX | VAR_SAMP | VAR_POP | STDDEV_SAMP | STDDEV_POP ; +takeAggFunction + : TAKE LT_PRTHS fieldExpression (COMMA size=integerLiteral)? RT_PRTHS + ; + percentileAggFunction : PERCENTILE LESS value=integerLiteral GREATER LT_PRTHS aggField=fieldExpression RT_PRTHS ; @@ -208,6 +259,11 @@ primaryExpression | dataTypeFunctionCall | fieldExpression | literalValue + | constantFunction + ; + +constantFunction + : constantFunctionName LT_PRTHS functionArgs? RT_PRTHS ; booleanExpression @@ -238,6 +294,10 @@ tableSource | ID_DATE_SUFFIX ; +tableFunction + : qualifiedName LT_PRTHS functionArgs RT_PRTHS + ; + /** fields */ fieldList : fieldExpression (COMMA fieldExpression)* @@ -300,6 +360,7 @@ evalFunctionName | dateAndTimeFunctionBase | textFunctionBase | conditionFunctionBase + | systemFunctionBase ; functionArgs @@ -307,7 +368,7 @@ functionArgs ; functionArg - : valueExpression + : (ident EQUAL)? valueExpression ; relevanceArg @@ -317,8 +378,8 @@ relevanceArg relevanceArgName : ALLOW_LEADING_WILDCARD | ANALYZER | ANALYZE_WILDCARD | AUTO_GENERATE_SYNONYMS_PHRASE_QUERY | BOOST | CUTOFF_FREQUENCY | DEFAULT_FIELD | DEFAULT_OPERATOR | ENABLE_POSITION_INCREMENTS - | FIELDS | FLAGS | FUZZINESS | FUZZY_MAX_EXPANSIONS | FUZZY_PREFIX_LENGTH | FUZZY_REWRITE - | FUZZY_TRANSPOSITIONS | LENIENT | LOW_FREQ_OPERATOR | MAX_DETERMINIZED_STATES + | ESCAPE | FIELDS | FLAGS | FUZZINESS | FUZZY_MAX_EXPANSIONS | FUZZY_PREFIX_LENGTH + | FUZZY_REWRITE | FUZZY_TRANSPOSITIONS | LENIENT | LOW_FREQ_OPERATOR | MAX_DETERMINIZED_STATES | MAX_EXPANSIONS | MINIMUM_SHOULD_MATCH | OPERATOR | PHRASE_SLOP | PREFIX_LENGTH | QUOTE_ANALYZER | QUOTE_FIELD_SUFFIX | REWRITE | SLOP | TIE_BREAKER | TIME_ZONE | TYPE | ZERO_TERMS_QUERY @@ -360,9 +421,17 @@ trigonometricFunctionName ; dateAndTimeFunctionBase - : ADDDATE | DATE | DATE_ADD | DATE_SUB | DAY | DAYNAME | DAYOFMONTH | DAYOFWEEK | DAYOFYEAR | FROM_DAYS - | HOUR | MICROSECOND | MINUTE | MONTH | MONTHNAME | QUARTER | SECOND | SUBDATE | TIME | TIME_TO_SEC - | TIMESTAMP | TO_DAYS | YEAR | WEEK | DATE_FORMAT + : ADDDATE | CONVERT_TZ | DATE | DATE_ADD | DATE_FORMAT | DATE_SUB + | DATETIME | DAY | DAYNAME | DAYOFMONTH | DAYOFWEEK | DAYOFYEAR | FROM_DAYS | FROM_UNIXTIME + | HOUR | MAKEDATE | MAKETIME | MICROSECOND | MINUTE | MONTH | MONTHNAME | PERIOD_ADD + | PERIOD_DIFF | QUARTER | SECOND | SUBDATE | SYSDATE | TIME | TIME_TO_SEC + | TIMESTAMP | TO_DAYS | UNIX_TIMESTAMP | WEEK | YEAR + ; + +// Functions which value could be cached in scope of a single query +constantFunctionName + : CURRENT_DATE | CURRENT_TIME | CURRENT_TIMESTAMP | LOCALTIME | LOCALTIMESTAMP | UTC_TIMESTAMP | UTC_DATE | UTC_TIME + | CURDATE | CURTIME | NOW ; /** condition function return boolean value */ @@ -371,6 +440,10 @@ conditionFunctionBase | IF | ISNULL | ISNOTNULL | IFNULL | NULLIF ; +systemFunctionBase + : TYPEOF + ; + textFunctionBase : SUBSTR | SUBSTRING | TRIM | LTRIM | RTRIM | LOWER | UPPER | CONCAT | CONCAT_WS | LENGTH | STRCMP | RIGHT | LEFT | ASCII | LOCATE | REPLACE @@ -389,10 +462,14 @@ binaryOperator singleFieldRelevanceFunctionName : MATCH | MATCH_PHRASE + | MATCH_BOOL_PREFIX + | MATCH_PHRASE_PREFIX ; multiFieldRelevanceFunctionName : SIMPLE_QUERY_STRING + | MULTI_MATCH + | QUERY_STRING ; /** literals and values*/ @@ -402,6 +479,7 @@ literalValue | integerLiteral | decimalLiteral | booleanLiteral + | datetimeLiteral //#datetime ; intervalLiteral @@ -424,8 +502,23 @@ booleanLiteral : TRUE | FALSE ; -pattern - : stringLiteral +// Date and Time Literal, follow ANSI 92 +datetimeLiteral + : dateLiteral + | timeLiteral + | timestampLiteral + ; + +dateLiteral + : DATE date=stringLiteral + ; + +timeLiteral + : TIME time=stringLiteral + ; + +timestampLiteral + : TIMESTAMP timestamp=stringLiteral ; intervalUnit @@ -472,4 +565,8 @@ keywordsCanBeId | TIMESTAMP | DATE | TIME | FIRST | LAST | timespanUnit | SPAN + | constantFunctionName + | dateAndTimeFunctionBase + | textFunctionBase + | mathematicalFunctionBase ; \ No newline at end of file diff --git a/dashboards-observability/common/query_manager/antlr/output/OpenSearchPPLLexer.interp b/dashboards-observability/common/query_manager/antlr/output/OpenSearchPPLLexer.interp new file mode 100644 index 000000000..22eb5e912 --- /dev/null +++ b/dashboards-observability/common/query_manager/antlr/output/OpenSearchPPLLexer.interp @@ -0,0 +1,945 @@ +token literal names: +null +'SEARCH' +'DESCRIBE' +'SHOW' +'FROM' +'WHERE' +'FIELDS' +'RENAME' +'STATS' +'DEDUP' +'SORT' +'EVAL' +'HEAD' +'TOP' +'RARE' +'PARSE' +'METHOD' +'REGEX' +'PUNCT' +'GROK' +'PATTERN' +'PATTERNS' +'NEW_FIELD' +'KMEANS' +'AD' +'ML' +'AS' +'BY' +'SOURCE' +'INDEX' +'D' +'DESC' +'CATALOGS' +'SORTBY' +'AUTO' +'STR' +'IP' +'NUM' +'KEEPEMPTY' +'CONSECUTIVE' +'DEDUP_SPLITVALUES' +'PARTITIONS' +'ALLNUM' +'DELIM' +'CENTROIDS' +'ITERATIONS' +'DISTANCE_TYPE' +'NUMBER_OF_TREES' +'SHINGLE_SIZE' +'SAMPLE_SIZE' +'OUTPUT_AFTER' +'TIME_DECAY' +'ANOMALY_RATE' +'CATEGORY_FIELD' +'TIME_FIELD' +'TIME_ZONE' +'TRAINING_DATA_SIZE' +'ANOMALY_SCORE_THRESHOLD' +'CASE' +'IN' +'NOT' +'OR' +'AND' +'XOR' +'TRUE' +'FALSE' +'REGEXP' +'DATETIME' +'INTERVAL' +'MICROSECOND' +'MILLISECOND' +'SECOND' +'MINUTE' +'HOUR' +'DAY' +'WEEK' +'MONTH' +'QUARTER' +'YEAR' +'SECOND_MICROSECOND' +'MINUTE_MICROSECOND' +'MINUTE_SECOND' +'HOUR_MICROSECOND' +'HOUR_SECOND' +'HOUR_MINUTE' +'DAY_MICROSECOND' +'DAY_SECOND' +'DAY_MINUTE' +'DAY_HOUR' +'YEAR_MONTH' +'CONVERT_TZ' +'DATAMODEL' +'LOOKUP' +'SAVEDSEARCH' +'INT' +'INTEGER' +'DOUBLE' +'LONG' +'FLOAT' +'STRING' +'BOOLEAN' +'|' +',' +'.' +'=' +'>' +'<' +null +null +null +'+' +'-' +'*' +'/' +'%' +'!' +':' +'(' +')' +'[' +']' +'\'' +'"' +'`' +'~' +'&' +'^' +'AVG' +'COUNT' +'DISTINCT_COUNT' +'ESTDC' +'ESTDC_ERROR' +'MAX' +'MEAN' +'MEDIAN' +'MIN' +'MODE' +'RANGE' +'STDEV' +'STDEVP' +'SUM' +'SUMSQ' +'VAR_SAMP' +'VAR_POP' +'STDDEV_SAMP' +'STDDEV_POP' +'PERCENTILE' +'TAKE' +'FIRST' +'LAST' +'LIST' +'VALUES' +'EARLIEST' +'EARLIEST_TIME' +'LATEST' +'LATEST_TIME' +'PER_DAY' +'PER_HOUR' +'PER_MINUTE' +'PER_SECOND' +'RATE' +'SPARKLINE' +'C' +'DC' +'ABS' +'CEIL' +'CEILING' +'CONV' +'CRC32' +'E' +'EXP' +'FLOOR' +'LN' +'LOG' +'LOG10' +'LOG2' +'MOD' +'PI' +'POW' +'POWER' +'RAND' +'ROUND' +'SIGN' +'SQRT' +'TRUNCATE' +'ACOS' +'ASIN' +'ATAN' +'ATAN2' +'COS' +'COT' +'DEGREES' +'RADIANS' +'SIN' +'TAN' +'ADDDATE' +'CURDATE' +'CURRENT_DATE' +'CURRENT_TIME' +'CURRENT_TIMESTAMP' +'CURTIME' +'DATE' +'DATE_ADD' +'DATE_FORMAT' +'DATE_SUB' +'DAYNAME' +'DAYOFMONTH' +'DAYOFWEEK' +'DAYOFYEAR' +'FROM_DAYS' +'LOCALTIME' +'LOCALTIMESTAMP' +'FROM_UNIXTIME' +'MAKEDATE' +'MAKETIME' +'MONTHNAME' +'NOW' +'PERIOD_ADD' +'PERIOD_DIFF' +'SUBDATE' +'SYSDATE' +'TIME' +'TIME_TO_SEC' +'TIMESTAMP' +'TO_DAYS' +'UTC_DATE' +'UTC_TIME' +'UTC_TIMESTAMP' +'UNIX_TIMESTAMP' +'SUBSTR' +'SUBSTRING' +'LTRIM' +'RTRIM' +'TRIM' +'TO' +'LOWER' +'UPPER' +'CONCAT' +'CONCAT_WS' +'LENGTH' +'STRCMP' +'RIGHT' +'LEFT' +'ASCII' +'LOCATE' +'REPLACE' +'CAST' +'LIKE' +'ISNULL' +'ISNOTNULL' +'IFNULL' +'NULLIF' +'IF' +'TYPEOF' +'MATCH' +'MATCH_PHRASE' +'MATCH_PHRASE_PREFIX' +'MATCH_BOOL_PREFIX' +'SIMPLE_QUERY_STRING' +'MULTI_MATCH' +'QUERY_STRING' +'ALLOW_LEADING_WILDCARD' +'ANALYZE_WILDCARD' +'ANALYZER' +'AUTO_GENERATE_SYNONYMS_PHRASE_QUERY' +'BOOST' +'CUTOFF_FREQUENCY' +'DEFAULT_FIELD' +'DEFAULT_OPERATOR' +'ENABLE_POSITION_INCREMENTS' +'ESCAPE' +'FLAGS' +'FUZZY_MAX_EXPANSIONS' +'FUZZY_PREFIX_LENGTH' +'FUZZY_TRANSPOSITIONS' +'FUZZY_REWRITE' +'FUZZINESS' +'LENIENT' +'LOW_FREQ_OPERATOR' +'MAX_DETERMINIZED_STATES' +'MAX_EXPANSIONS' +'MINIMUM_SHOULD_MATCH' +'OPERATOR' +'PHRASE_SLOP' +'PREFIX_LENGTH' +'QUOTE_ANALYZER' +'QUOTE_FIELD_SUFFIX' +'REWRITE' +'SLOP' +'TIE_BREAKER' +'TYPE' +'ZERO_TERMS_QUERY' +'SPAN' +'MS' +'S' +'M' +'H' +'W' +'Q' +'Y' +null +null +null +null +null +null +null +null + +token symbolic names: +null +SEARCH +DESCRIBE +SHOW +FROM +WHERE +FIELDS +RENAME +STATS +DEDUP +SORT +EVAL +HEAD +TOP +RARE +PARSE +METHOD +REGEX +PUNCT +GROK +PATTERN +PATTERNS +NEW_FIELD +KMEANS +AD +ML +AS +BY +SOURCE +INDEX +D +DESC +CATALOGS +SORTBY +AUTO +STR +IP +NUM +KEEPEMPTY +CONSECUTIVE +DEDUP_SPLITVALUES +PARTITIONS +ALLNUM +DELIM +CENTROIDS +ITERATIONS +DISTANCE_TYPE +NUMBER_OF_TREES +SHINGLE_SIZE +SAMPLE_SIZE +OUTPUT_AFTER +TIME_DECAY +ANOMALY_RATE +CATEGORY_FIELD +TIME_FIELD +TIME_ZONE +TRAINING_DATA_SIZE +ANOMALY_SCORE_THRESHOLD +CASE +IN +NOT +OR +AND +XOR +TRUE +FALSE +REGEXP +DATETIME +INTERVAL +MICROSECOND +MILLISECOND +SECOND +MINUTE +HOUR +DAY +WEEK +MONTH +QUARTER +YEAR +SECOND_MICROSECOND +MINUTE_MICROSECOND +MINUTE_SECOND +HOUR_MICROSECOND +HOUR_SECOND +HOUR_MINUTE +DAY_MICROSECOND +DAY_SECOND +DAY_MINUTE +DAY_HOUR +YEAR_MONTH +CONVERT_TZ +DATAMODEL +LOOKUP +SAVEDSEARCH +INT +INTEGER +DOUBLE +LONG +FLOAT +STRING +BOOLEAN +PIPE +COMMA +DOT +EQUAL +GREATER +LESS +NOT_GREATER +NOT_LESS +NOT_EQUAL +PLUS +MINUS +STAR +DIVIDE +MODULE +EXCLAMATION_SYMBOL +COLON +LT_PRTHS +RT_PRTHS +LT_SQR_PRTHS +RT_SQR_PRTHS +SINGLE_QUOTE +DOUBLE_QUOTE +BACKTICK +BIT_NOT_OP +BIT_AND_OP +BIT_XOR_OP +AVG +COUNT +DISTINCT_COUNT +ESTDC +ESTDC_ERROR +MAX +MEAN +MEDIAN +MIN +MODE +RANGE +STDEV +STDEVP +SUM +SUMSQ +VAR_SAMP +VAR_POP +STDDEV_SAMP +STDDEV_POP +PERCENTILE +TAKE +FIRST +LAST +LIST +VALUES +EARLIEST +EARLIEST_TIME +LATEST +LATEST_TIME +PER_DAY +PER_HOUR +PER_MINUTE +PER_SECOND +RATE +SPARKLINE +C +DC +ABS +CEIL +CEILING +CONV +CRC32 +E +EXP +FLOOR +LN +LOG +LOG10 +LOG2 +MOD +PI +POW +POWER +RAND +ROUND +SIGN +SQRT +TRUNCATE +ACOS +ASIN +ATAN +ATAN2 +COS +COT +DEGREES +RADIANS +SIN +TAN +ADDDATE +CURDATE +CURRENT_DATE +CURRENT_TIME +CURRENT_TIMESTAMP +CURTIME +DATE +DATE_ADD +DATE_FORMAT +DATE_SUB +DAYNAME +DAYOFMONTH +DAYOFWEEK +DAYOFYEAR +FROM_DAYS +LOCALTIME +LOCALTIMESTAMP +FROM_UNIXTIME +MAKEDATE +MAKETIME +MONTHNAME +NOW +PERIOD_ADD +PERIOD_DIFF +SUBDATE +SYSDATE +TIME +TIME_TO_SEC +TIMESTAMP +TO_DAYS +UTC_DATE +UTC_TIME +UTC_TIMESTAMP +UNIX_TIMESTAMP +SUBSTR +SUBSTRING +LTRIM +RTRIM +TRIM +TO +LOWER +UPPER +CONCAT +CONCAT_WS +LENGTH +STRCMP +RIGHT +LEFT +ASCII +LOCATE +REPLACE +CAST +LIKE +ISNULL +ISNOTNULL +IFNULL +NULLIF +IF +TYPEOF +MATCH +MATCH_PHRASE +MATCH_PHRASE_PREFIX +MATCH_BOOL_PREFIX +SIMPLE_QUERY_STRING +MULTI_MATCH +QUERY_STRING +ALLOW_LEADING_WILDCARD +ANALYZE_WILDCARD +ANALYZER +AUTO_GENERATE_SYNONYMS_PHRASE_QUERY +BOOST +CUTOFF_FREQUENCY +DEFAULT_FIELD +DEFAULT_OPERATOR +ENABLE_POSITION_INCREMENTS +ESCAPE +FLAGS +FUZZY_MAX_EXPANSIONS +FUZZY_PREFIX_LENGTH +FUZZY_TRANSPOSITIONS +FUZZY_REWRITE +FUZZINESS +LENIENT +LOW_FREQ_OPERATOR +MAX_DETERMINIZED_STATES +MAX_EXPANSIONS +MINIMUM_SHOULD_MATCH +OPERATOR +PHRASE_SLOP +PREFIX_LENGTH +QUOTE_ANALYZER +QUOTE_FIELD_SUFFIX +REWRITE +SLOP +TIE_BREAKER +TYPE +ZERO_TERMS_QUERY +SPAN +MS +S +M +H +W +Q +Y +ID +INTEGER_LITERAL +DECIMAL_LITERAL +ID_DATE_SUFFIX +DQUOTA_STRING +SQUOTA_STRING +BQUOTA_STRING +ERROR_RECOGNITION + +rule names: +SEARCH +DESCRIBE +SHOW +FROM +WHERE +FIELDS +RENAME +STATS +DEDUP +SORT +EVAL +HEAD +TOP +RARE +PARSE +METHOD +REGEX +PUNCT +GROK +PATTERN +PATTERNS +NEW_FIELD +KMEANS +AD +ML +AS +BY +SOURCE +INDEX +D +DESC +CATALOGS +SORTBY +AUTO +STR +IP +NUM +KEEPEMPTY +CONSECUTIVE +DEDUP_SPLITVALUES +PARTITIONS +ALLNUM +DELIM +CENTROIDS +ITERATIONS +DISTANCE_TYPE +NUMBER_OF_TREES +SHINGLE_SIZE +SAMPLE_SIZE +OUTPUT_AFTER +TIME_DECAY +ANOMALY_RATE +CATEGORY_FIELD +TIME_FIELD +TIME_ZONE +TRAINING_DATA_SIZE +ANOMALY_SCORE_THRESHOLD +CASE +IN +NOT +OR +AND +XOR +TRUE +FALSE +REGEXP +DATETIME +INTERVAL +MICROSECOND +MILLISECOND +SECOND +MINUTE +HOUR +DAY +WEEK +MONTH +QUARTER +YEAR +SECOND_MICROSECOND +MINUTE_MICROSECOND +MINUTE_SECOND +HOUR_MICROSECOND +HOUR_SECOND +HOUR_MINUTE +DAY_MICROSECOND +DAY_SECOND +DAY_MINUTE +DAY_HOUR +YEAR_MONTH +CONVERT_TZ +DATAMODEL +LOOKUP +SAVEDSEARCH +INT +INTEGER +DOUBLE +LONG +FLOAT +STRING +BOOLEAN +PIPE +COMMA +DOT +EQUAL +GREATER +LESS +NOT_GREATER +NOT_LESS +NOT_EQUAL +PLUS +MINUS +STAR +DIVIDE +MODULE +EXCLAMATION_SYMBOL +COLON +LT_PRTHS +RT_PRTHS +LT_SQR_PRTHS +RT_SQR_PRTHS +SINGLE_QUOTE +DOUBLE_QUOTE +BACKTICK +BIT_NOT_OP +BIT_AND_OP +BIT_XOR_OP +AVG +COUNT +DISTINCT_COUNT +ESTDC +ESTDC_ERROR +MAX +MEAN +MEDIAN +MIN +MODE +RANGE +STDEV +STDEVP +SUM +SUMSQ +VAR_SAMP +VAR_POP +STDDEV_SAMP +STDDEV_POP +PERCENTILE +TAKE +FIRST +LAST +LIST +VALUES +EARLIEST +EARLIEST_TIME +LATEST +LATEST_TIME +PER_DAY +PER_HOUR +PER_MINUTE +PER_SECOND +RATE +SPARKLINE +C +DC +ABS +CEIL +CEILING +CONV +CRC32 +E +EXP +FLOOR +LN +LOG +LOG10 +LOG2 +MOD +PI +POW +POWER +RAND +ROUND +SIGN +SQRT +TRUNCATE +ACOS +ASIN +ATAN +ATAN2 +COS +COT +DEGREES +RADIANS +SIN +TAN +ADDDATE +CURDATE +CURRENT_DATE +CURRENT_TIME +CURRENT_TIMESTAMP +CURTIME +DATE +DATE_ADD +DATE_FORMAT +DATE_SUB +DAYNAME +DAYOFMONTH +DAYOFWEEK +DAYOFYEAR +FROM_DAYS +LOCALTIME +LOCALTIMESTAMP +FROM_UNIXTIME +MAKEDATE +MAKETIME +MONTHNAME +NOW +PERIOD_ADD +PERIOD_DIFF +SUBDATE +SYSDATE +TIME +TIME_TO_SEC +TIMESTAMP +TO_DAYS +UTC_DATE +UTC_TIME +UTC_TIMESTAMP +UNIX_TIMESTAMP +SUBSTR +SUBSTRING +LTRIM +RTRIM +TRIM +TO +LOWER +UPPER +CONCAT +CONCAT_WS +LENGTH +STRCMP +RIGHT +LEFT +ASCII +LOCATE +REPLACE +CAST +LIKE +ISNULL +ISNOTNULL +IFNULL +NULLIF +IF +TYPEOF +MATCH +MATCH_PHRASE +MATCH_PHRASE_PREFIX +MATCH_BOOL_PREFIX +SIMPLE_QUERY_STRING +MULTI_MATCH +QUERY_STRING +ALLOW_LEADING_WILDCARD +ANALYZE_WILDCARD +ANALYZER +AUTO_GENERATE_SYNONYMS_PHRASE_QUERY +BOOST +CUTOFF_FREQUENCY +DEFAULT_FIELD +DEFAULT_OPERATOR +ENABLE_POSITION_INCREMENTS +ESCAPE +FLAGS +FUZZY_MAX_EXPANSIONS +FUZZY_PREFIX_LENGTH +FUZZY_TRANSPOSITIONS +FUZZY_REWRITE +FUZZINESS +LENIENT +LOW_FREQ_OPERATOR +MAX_DETERMINIZED_STATES +MAX_EXPANSIONS +MINIMUM_SHOULD_MATCH +OPERATOR +PHRASE_SLOP +PREFIX_LENGTH +QUOTE_ANALYZER +QUOTE_FIELD_SUFFIX +REWRITE +SLOP +TIE_BREAKER +TYPE +ZERO_TERMS_QUERY +SPAN +MS +S +M +H +W +Q +Y +ID +INTEGER_LITERAL +DECIMAL_LITERAL +DATE_SUFFIX +ID_LITERAL +ID_DATE_SUFFIX +DQUOTA_STRING +SQUOTA_STRING +BQUOTA_STRING +DEC_DIGIT +ERROR_RECOGNITION + +channel names: +DEFAULT_TOKEN_CHANNEL +HIDDEN +null +null +WHITESPACE +ERRORCHANNEL + +mode names: +DEFAULT_MODE + +atn: +[3, 51485, 51898, 1421, 44986, 20307, 1543, 60043, 49729, 2, 309, 3131, 8, 1, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23, 4, 24, 9, 24, 4, 25, 9, 25, 4, 26, 9, 26, 4, 27, 9, 27, 4, 28, 9, 28, 4, 29, 9, 29, 4, 30, 9, 30, 4, 31, 9, 31, 4, 32, 9, 32, 4, 33, 9, 33, 4, 34, 9, 34, 4, 35, 9, 35, 4, 36, 9, 36, 4, 37, 9, 37, 4, 38, 9, 38, 4, 39, 9, 39, 4, 40, 9, 40, 4, 41, 9, 41, 4, 42, 9, 42, 4, 43, 9, 43, 4, 44, 9, 44, 4, 45, 9, 45, 4, 46, 9, 46, 4, 47, 9, 47, 4, 48, 9, 48, 4, 49, 9, 49, 4, 50, 9, 50, 4, 51, 9, 51, 4, 52, 9, 52, 4, 53, 9, 53, 4, 54, 9, 54, 4, 55, 9, 55, 4, 56, 9, 56, 4, 57, 9, 57, 4, 58, 9, 58, 4, 59, 9, 59, 4, 60, 9, 60, 4, 61, 9, 61, 4, 62, 9, 62, 4, 63, 9, 63, 4, 64, 9, 64, 4, 65, 9, 65, 4, 66, 9, 66, 4, 67, 9, 67, 4, 68, 9, 68, 4, 69, 9, 69, 4, 70, 9, 70, 4, 71, 9, 71, 4, 72, 9, 72, 4, 73, 9, 73, 4, 74, 9, 74, 4, 75, 9, 75, 4, 76, 9, 76, 4, 77, 9, 77, 4, 78, 9, 78, 4, 79, 9, 79, 4, 80, 9, 80, 4, 81, 9, 81, 4, 82, 9, 82, 4, 83, 9, 83, 4, 84, 9, 84, 4, 85, 9, 85, 4, 86, 9, 86, 4, 87, 9, 87, 4, 88, 9, 88, 4, 89, 9, 89, 4, 90, 9, 90, 4, 91, 9, 91, 4, 92, 9, 92, 4, 93, 9, 93, 4, 94, 9, 94, 4, 95, 9, 95, 4, 96, 9, 96, 4, 97, 9, 97, 4, 98, 9, 98, 4, 99, 9, 99, 4, 100, 9, 100, 4, 101, 9, 101, 4, 102, 9, 102, 4, 103, 9, 103, 4, 104, 9, 104, 4, 105, 9, 105, 4, 106, 9, 106, 4, 107, 9, 107, 4, 108, 9, 108, 4, 109, 9, 109, 4, 110, 9, 110, 4, 111, 9, 111, 4, 112, 9, 112, 4, 113, 9, 113, 4, 114, 9, 114, 4, 115, 9, 115, 4, 116, 9, 116, 4, 117, 9, 117, 4, 118, 9, 118, 4, 119, 9, 119, 4, 120, 9, 120, 4, 121, 9, 121, 4, 122, 9, 122, 4, 123, 9, 123, 4, 124, 9, 124, 4, 125, 9, 125, 4, 126, 9, 126, 4, 127, 9, 127, 4, 128, 9, 128, 4, 129, 9, 129, 4, 130, 9, 130, 4, 131, 9, 131, 4, 132, 9, 132, 4, 133, 9, 133, 4, 134, 9, 134, 4, 135, 9, 135, 4, 136, 9, 136, 4, 137, 9, 137, 4, 138, 9, 138, 4, 139, 9, 139, 4, 140, 9, 140, 4, 141, 9, 141, 4, 142, 9, 142, 4, 143, 9, 143, 4, 144, 9, 144, 4, 145, 9, 145, 4, 146, 9, 146, 4, 147, 9, 147, 4, 148, 9, 148, 4, 149, 9, 149, 4, 150, 9, 150, 4, 151, 9, 151, 4, 152, 9, 152, 4, 153, 9, 153, 4, 154, 9, 154, 4, 155, 9, 155, 4, 156, 9, 156, 4, 157, 9, 157, 4, 158, 9, 158, 4, 159, 9, 159, 4, 160, 9, 160, 4, 161, 9, 161, 4, 162, 9, 162, 4, 163, 9, 163, 4, 164, 9, 164, 4, 165, 9, 165, 4, 166, 9, 166, 4, 167, 9, 167, 4, 168, 9, 168, 4, 169, 9, 169, 4, 170, 9, 170, 4, 171, 9, 171, 4, 172, 9, 172, 4, 173, 9, 173, 4, 174, 9, 174, 4, 175, 9, 175, 4, 176, 9, 176, 4, 177, 9, 177, 4, 178, 9, 178, 4, 179, 9, 179, 4, 180, 9, 180, 4, 181, 9, 181, 4, 182, 9, 182, 4, 183, 9, 183, 4, 184, 9, 184, 4, 185, 9, 185, 4, 186, 9, 186, 4, 187, 9, 187, 4, 188, 9, 188, 4, 189, 9, 189, 4, 190, 9, 190, 4, 191, 9, 191, 4, 192, 9, 192, 4, 193, 9, 193, 4, 194, 9, 194, 4, 195, 9, 195, 4, 196, 9, 196, 4, 197, 9, 197, 4, 198, 9, 198, 4, 199, 9, 199, 4, 200, 9, 200, 4, 201, 9, 201, 4, 202, 9, 202, 4, 203, 9, 203, 4, 204, 9, 204, 4, 205, 9, 205, 4, 206, 9, 206, 4, 207, 9, 207, 4, 208, 9, 208, 4, 209, 9, 209, 4, 210, 9, 210, 4, 211, 9, 211, 4, 212, 9, 212, 4, 213, 9, 213, 4, 214, 9, 214, 4, 215, 9, 215, 4, 216, 9, 216, 4, 217, 9, 217, 4, 218, 9, 218, 4, 219, 9, 219, 4, 220, 9, 220, 4, 221, 9, 221, 4, 222, 9, 222, 4, 223, 9, 223, 4, 224, 9, 224, 4, 225, 9, 225, 4, 226, 9, 226, 4, 227, 9, 227, 4, 228, 9, 228, 4, 229, 9, 229, 4, 230, 9, 230, 4, 231, 9, 231, 4, 232, 9, 232, 4, 233, 9, 233, 4, 234, 9, 234, 4, 235, 9, 235, 4, 236, 9, 236, 4, 237, 9, 237, 4, 238, 9, 238, 4, 239, 9, 239, 4, 240, 9, 240, 4, 241, 9, 241, 4, 242, 9, 242, 4, 243, 9, 243, 4, 244, 9, 244, 4, 245, 9, 245, 4, 246, 9, 246, 4, 247, 9, 247, 4, 248, 9, 248, 4, 249, 9, 249, 4, 250, 9, 250, 4, 251, 9, 251, 4, 252, 9, 252, 4, 253, 9, 253, 4, 254, 9, 254, 4, 255, 9, 255, 4, 256, 9, 256, 4, 257, 9, 257, 4, 258, 9, 258, 4, 259, 9, 259, 4, 260, 9, 260, 4, 261, 9, 261, 4, 262, 9, 262, 4, 263, 9, 263, 4, 264, 9, 264, 4, 265, 9, 265, 4, 266, 9, 266, 4, 267, 9, 267, 4, 268, 9, 268, 4, 269, 9, 269, 4, 270, 9, 270, 4, 271, 9, 271, 4, 272, 9, 272, 4, 273, 9, 273, 4, 274, 9, 274, 4, 275, 9, 275, 4, 276, 9, 276, 4, 277, 9, 277, 4, 278, 9, 278, 4, 279, 9, 279, 4, 280, 9, 280, 4, 281, 9, 281, 4, 282, 9, 282, 4, 283, 9, 283, 4, 284, 9, 284, 4, 285, 9, 285, 4, 286, 9, 286, 4, 287, 9, 287, 4, 288, 9, 288, 4, 289, 9, 289, 4, 290, 9, 290, 4, 291, 9, 291, 4, 292, 9, 292, 4, 293, 9, 293, 4, 294, 9, 294, 4, 295, 9, 295, 4, 296, 9, 296, 4, 297, 9, 297, 4, 298, 9, 298, 4, 299, 9, 299, 4, 300, 9, 300, 4, 301, 9, 301, 4, 302, 9, 302, 4, 303, 9, 303, 4, 304, 9, 304, 4, 305, 9, 305, 4, 306, 9, 306, 4, 307, 9, 307, 4, 308, 9, 308, 4, 309, 9, 309, 4, 310, 9, 310, 4, 311, 9, 311, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 14, 3, 14, 3, 14, 3, 14, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 25, 3, 25, 3, 25, 3, 26, 3, 26, 3, 26, 3, 27, 3, 27, 3, 27, 3, 28, 3, 28, 3, 28, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 30, 3, 30, 3, 30, 3, 30, 3, 30, 3, 30, 3, 31, 3, 31, 3, 32, 3, 32, 3, 32, 3, 32, 3, 32, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 36, 3, 36, 3, 36, 3, 36, 3, 37, 3, 37, 3, 37, 3, 38, 3, 38, 3, 38, 3, 38, 3, 39, 3, 39, 3, 39, 3, 39, 3, 39, 3, 39, 3, 39, 3, 39, 3, 39, 3, 39, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 41, 3, 41, 3, 41, 3, 41, 3, 41, 3, 41, 3, 41, 3, 41, 3, 41, 3, 41, 3, 41, 3, 41, 3, 41, 3, 41, 3, 41, 3, 41, 3, 41, 3, 41, 3, 42, 3, 42, 3, 42, 3, 42, 3, 42, 3, 42, 3, 42, 3, 42, 3, 42, 3, 42, 3, 42, 3, 43, 3, 43, 3, 43, 3, 43, 3, 43, 3, 43, 3, 43, 3, 44, 3, 44, 3, 44, 3, 44, 3, 44, 3, 44, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 48, 3, 48, 3, 48, 3, 48, 3, 48, 3, 48, 3, 48, 3, 48, 3, 48, 3, 48, 3, 48, 3, 48, 3, 48, 3, 48, 3, 48, 3, 48, 3, 49, 3, 49, 3, 49, 3, 49, 3, 49, 3, 49, 3, 49, 3, 49, 3, 49, 3, 49, 3, 49, 3, 49, 3, 49, 3, 50, 3, 50, 3, 50, 3, 50, 3, 50, 3, 50, 3, 50, 3, 50, 3, 50, 3, 50, 3, 50, 3, 50, 3, 51, 3, 51, 3, 51, 3, 51, 3, 51, 3, 51, 3, 51, 3, 51, 3, 51, 3, 51, 3, 51, 3, 51, 3, 51, 3, 52, 3, 52, 3, 52, 3, 52, 3, 52, 3, 52, 3, 52, 3, 52, 3, 52, 3, 52, 3, 52, 3, 53, 3, 53, 3, 53, 3, 53, 3, 53, 3, 53, 3, 53, 3, 53, 3, 53, 3, 53, 3, 53, 3, 53, 3, 53, 3, 54, 3, 54, 3, 54, 3, 54, 3, 54, 3, 54, 3, 54, 3, 54, 3, 54, 3, 54, 3, 54, 3, 54, 3, 54, 3, 54, 3, 54, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 56, 3, 56, 3, 56, 3, 56, 3, 56, 3, 56, 3, 56, 3, 56, 3, 56, 3, 56, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 58, 3, 58, 3, 58, 3, 58, 3, 58, 3, 58, 3, 58, 3, 58, 3, 58, 3, 58, 3, 58, 3, 58, 3, 58, 3, 58, 3, 58, 3, 58, 3, 58, 3, 58, 3, 58, 3, 58, 3, 58, 3, 58, 3, 58, 3, 58, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 3, 60, 3, 60, 3, 60, 3, 61, 3, 61, 3, 61, 3, 61, 3, 62, 3, 62, 3, 62, 3, 63, 3, 63, 3, 63, 3, 63, 3, 64, 3, 64, 3, 64, 3, 64, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 66, 3, 66, 3, 66, 3, 66, 3, 66, 3, 66, 3, 67, 3, 67, 3, 67, 3, 67, 3, 67, 3, 67, 3, 67, 3, 68, 3, 68, 3, 68, 3, 68, 3, 68, 3, 68, 3, 68, 3, 68, 3, 68, 3, 69, 3, 69, 3, 69, 3, 69, 3, 69, 3, 69, 3, 69, 3, 69, 3, 69, 3, 70, 3, 70, 3, 70, 3, 70, 3, 70, 3, 70, 3, 70, 3, 70, 3, 70, 3, 70, 3, 70, 3, 70, 3, 71, 3, 71, 3, 71, 3, 71, 3, 71, 3, 71, 3, 71, 3, 71, 3, 71, 3, 71, 3, 71, 3, 71, 3, 72, 3, 72, 3, 72, 3, 72, 3, 72, 3, 72, 3, 72, 3, 73, 3, 73, 3, 73, 3, 73, 3, 73, 3, 73, 3, 73, 3, 74, 3, 74, 3, 74, 3, 74, 3, 74, 3, 75, 3, 75, 3, 75, 3, 75, 3, 76, 3, 76, 3, 76, 3, 76, 3, 76, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 78, 3, 78, 3, 78, 3, 78, 3, 78, 3, 78, 3, 78, 3, 78, 3, 79, 3, 79, 3, 79, 3, 79, 3, 79, 3, 80, 3, 80, 3, 80, 3, 80, 3, 80, 3, 80, 3, 80, 3, 80, 3, 80, 3, 80, 3, 80, 3, 80, 3, 80, 3, 80, 3, 80, 3, 80, 3, 80, 3, 80, 3, 80, 3, 81, 3, 81, 3, 81, 3, 81, 3, 81, 3, 81, 3, 81, 3, 81, 3, 81, 3, 81, 3, 81, 3, 81, 3, 81, 3, 81, 3, 81, 3, 81, 3, 81, 3, 81, 3, 81, 3, 82, 3, 82, 3, 82, 3, 82, 3, 82, 3, 82, 3, 82, 3, 82, 3, 82, 3, 82, 3, 82, 3, 82, 3, 82, 3, 82, 3, 83, 3, 83, 3, 83, 3, 83, 3, 83, 3, 83, 3, 83, 3, 83, 3, 83, 3, 83, 3, 83, 3, 83, 3, 83, 3, 83, 3, 83, 3, 83, 3, 83, 3, 84, 3, 84, 3, 84, 3, 84, 3, 84, 3, 84, 3, 84, 3, 84, 3, 84, 3, 84, 3, 84, 3, 84, 3, 85, 3, 85, 3, 85, 3, 85, 3, 85, 3, 85, 3, 85, 3, 85, 3, 85, 3, 85, 3, 85, 3, 85, 3, 86, 3, 86, 3, 86, 3, 86, 3, 86, 3, 86, 3, 86, 3, 86, 3, 86, 3, 86, 3, 86, 3, 86, 3, 86, 3, 86, 3, 86, 3, 86, 3, 87, 3, 87, 3, 87, 3, 87, 3, 87, 3, 87, 3, 87, 3, 87, 3, 87, 3, 87, 3, 87, 3, 88, 3, 88, 3, 88, 3, 88, 3, 88, 3, 88, 3, 88, 3, 88, 3, 88, 3, 88, 3, 88, 3, 89, 3, 89, 3, 89, 3, 89, 3, 89, 3, 89, 3, 89, 3, 89, 3, 89, 3, 90, 3, 90, 3, 90, 3, 90, 3, 90, 3, 90, 3, 90, 3, 90, 3, 90, 3, 90, 3, 90, 3, 91, 3, 91, 3, 91, 3, 91, 3, 91, 3, 91, 3, 91, 3, 91, 3, 91, 3, 91, 3, 91, 3, 92, 3, 92, 3, 92, 3, 92, 3, 92, 3, 92, 3, 92, 3, 92, 3, 92, 3, 92, 3, 93, 3, 93, 3, 93, 3, 93, 3, 93, 3, 93, 3, 93, 3, 94, 3, 94, 3, 94, 3, 94, 3, 94, 3, 94, 3, 94, 3, 94, 3, 94, 3, 94, 3, 94, 3, 94, 3, 95, 3, 95, 3, 95, 3, 95, 3, 96, 3, 96, 3, 96, 3, 96, 3, 96, 3, 96, 3, 96, 3, 96, 3, 97, 3, 97, 3, 97, 3, 97, 3, 97, 3, 97, 3, 97, 3, 98, 3, 98, 3, 98, 3, 98, 3, 98, 3, 99, 3, 99, 3, 99, 3, 99, 3, 99, 3, 99, 3, 100, 3, 100, 3, 100, 3, 100, 3, 100, 3, 100, 3, 100, 3, 101, 3, 101, 3, 101, 3, 101, 3, 101, 3, 101, 3, 101, 3, 101, 3, 102, 3, 102, 3, 103, 3, 103, 3, 104, 3, 104, 3, 105, 3, 105, 3, 106, 3, 106, 3, 107, 3, 107, 3, 108, 3, 108, 3, 108, 3, 109, 3, 109, 3, 109, 3, 110, 3, 110, 3, 110, 3, 111, 3, 111, 3, 112, 3, 112, 3, 113, 3, 113, 3, 114, 3, 114, 3, 115, 3, 115, 3, 116, 3, 116, 3, 117, 3, 117, 3, 118, 3, 118, 3, 119, 3, 119, 3, 120, 3, 120, 3, 121, 3, 121, 3, 122, 3, 122, 3, 123, 3, 123, 3, 124, 3, 124, 3, 125, 3, 125, 3, 126, 3, 126, 3, 127, 3, 127, 3, 128, 3, 128, 3, 128, 3, 128, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 129, 3, 130, 3, 130, 3, 130, 3, 130, 3, 130, 3, 130, 3, 130, 3, 130, 3, 130, 3, 130, 3, 130, 3, 130, 3, 130, 3, 130, 3, 130, 3, 131, 3, 131, 3, 131, 3, 131, 3, 131, 3, 131, 3, 132, 3, 132, 3, 132, 3, 132, 3, 132, 3, 132, 3, 132, 3, 132, 3, 132, 3, 132, 3, 132, 3, 132, 3, 133, 3, 133, 3, 133, 3, 133, 3, 134, 3, 134, 3, 134, 3, 134, 3, 134, 3, 135, 3, 135, 3, 135, 3, 135, 3, 135, 3, 135, 3, 135, 3, 136, 3, 136, 3, 136, 3, 136, 3, 137, 3, 137, 3, 137, 3, 137, 3, 137, 3, 138, 3, 138, 3, 138, 3, 138, 3, 138, 3, 138, 3, 139, 3, 139, 3, 139, 3, 139, 3, 139, 3, 139, 3, 140, 3, 140, 3, 140, 3, 140, 3, 140, 3, 140, 3, 140, 3, 141, 3, 141, 3, 141, 3, 141, 3, 142, 3, 142, 3, 142, 3, 142, 3, 142, 3, 142, 3, 143, 3, 143, 3, 143, 3, 143, 3, 143, 3, 143, 3, 143, 3, 143, 3, 143, 3, 144, 3, 144, 3, 144, 3, 144, 3, 144, 3, 144, 3, 144, 3, 144, 3, 145, 3, 145, 3, 145, 3, 145, 3, 145, 3, 145, 3, 145, 3, 145, 3, 145, 3, 145, 3, 145, 3, 145, 3, 146, 3, 146, 3, 146, 3, 146, 3, 146, 3, 146, 3, 146, 3, 146, 3, 146, 3, 146, 3, 146, 3, 147, 3, 147, 3, 147, 3, 147, 3, 147, 3, 147, 3, 147, 3, 147, 3, 147, 3, 147, 3, 147, 3, 148, 3, 148, 3, 148, 3, 148, 3, 148, 3, 149, 3, 149, 3, 149, 3, 149, 3, 149, 3, 149, 3, 150, 3, 150, 3, 150, 3, 150, 3, 150, 3, 151, 3, 151, 3, 151, 3, 151, 3, 151, 3, 152, 3, 152, 3, 152, 3, 152, 3, 152, 3, 152, 3, 152, 3, 153, 3, 153, 3, 153, 3, 153, 3, 153, 3, 153, 3, 153, 3, 153, 3, 153, 3, 154, 3, 154, 3, 154, 3, 154, 3, 154, 3, 154, 3, 154, 3, 154, 3, 154, 3, 154, 3, 154, 3, 154, 3, 154, 3, 154, 3, 155, 3, 155, 3, 155, 3, 155, 3, 155, 3, 155, 3, 155, 3, 156, 3, 156, 3, 156, 3, 156, 3, 156, 3, 156, 3, 156, 3, 156, 3, 156, 3, 156, 3, 156, 3, 156, 3, 157, 3, 157, 3, 157, 3, 157, 3, 157, 3, 157, 3, 157, 3, 157, 3, 158, 3, 158, 3, 158, 3, 158, 3, 158, 3, 158, 3, 158, 3, 158, 3, 158, 3, 159, 3, 159, 3, 159, 3, 159, 3, 159, 3, 159, 3, 159, 3, 159, 3, 159, 3, 159, 3, 159, 3, 160, 3, 160, 3, 160, 3, 160, 3, 160, 3, 160, 3, 160, 3, 160, 3, 160, 3, 160, 3, 160, 3, 161, 3, 161, 3, 161, 3, 161, 3, 161, 3, 162, 3, 162, 3, 162, 3, 162, 3, 162, 3, 162, 3, 162, 3, 162, 3, 162, 3, 162, 3, 163, 3, 163, 3, 164, 3, 164, 3, 164, 3, 165, 3, 165, 3, 165, 3, 165, 3, 166, 3, 166, 3, 166, 3, 166, 3, 166, 3, 167, 3, 167, 3, 167, 3, 167, 3, 167, 3, 167, 3, 167, 3, 167, 3, 168, 3, 168, 3, 168, 3, 168, 3, 168, 3, 169, 3, 169, 3, 169, 3, 169, 3, 169, 3, 169, 3, 170, 3, 170, 3, 171, 3, 171, 3, 171, 3, 171, 3, 172, 3, 172, 3, 172, 3, 172, 3, 172, 3, 172, 3, 173, 3, 173, 3, 173, 3, 174, 3, 174, 3, 174, 3, 174, 3, 175, 3, 175, 3, 175, 3, 175, 3, 175, 3, 175, 3, 176, 3, 176, 3, 176, 3, 176, 3, 176, 3, 177, 3, 177, 3, 177, 3, 177, 3, 178, 3, 178, 3, 178, 3, 179, 3, 179, 3, 179, 3, 179, 3, 180, 3, 180, 3, 180, 3, 180, 3, 180, 3, 180, 3, 181, 3, 181, 3, 181, 3, 181, 3, 181, 3, 182, 3, 182, 3, 182, 3, 182, 3, 182, 3, 182, 3, 183, 3, 183, 3, 183, 3, 183, 3, 183, 3, 184, 3, 184, 3, 184, 3, 184, 3, 184, 3, 185, 3, 185, 3, 185, 3, 185, 3, 185, 3, 185, 3, 185, 3, 185, 3, 185, 3, 186, 3, 186, 3, 186, 3, 186, 3, 186, 3, 187, 3, 187, 3, 187, 3, 187, 3, 187, 3, 188, 3, 188, 3, 188, 3, 188, 3, 188, 3, 189, 3, 189, 3, 189, 3, 189, 3, 189, 3, 189, 3, 190, 3, 190, 3, 190, 3, 190, 3, 191, 3, 191, 3, 191, 3, 191, 3, 192, 3, 192, 3, 192, 3, 192, 3, 192, 3, 192, 3, 192, 3, 192, 3, 193, 3, 193, 3, 193, 3, 193, 3, 193, 3, 193, 3, 193, 3, 193, 3, 194, 3, 194, 3, 194, 3, 194, 3, 195, 3, 195, 3, 195, 3, 195, 3, 196, 3, 196, 3, 196, 3, 196, 3, 196, 3, 196, 3, 196, 3, 196, 3, 197, 3, 197, 3, 197, 3, 197, 3, 197, 3, 197, 3, 197, 3, 197, 3, 198, 3, 198, 3, 198, 3, 198, 3, 198, 3, 198, 3, 198, 3, 198, 3, 198, 3, 198, 3, 198, 3, 198, 3, 198, 3, 199, 3, 199, 3, 199, 3, 199, 3, 199, 3, 199, 3, 199, 3, 199, 3, 199, 3, 199, 3, 199, 3, 199, 3, 199, 3, 200, 3, 200, 3, 200, 3, 200, 3, 200, 3, 200, 3, 200, 3, 200, 3, 200, 3, 200, 3, 200, 3, 200, 3, 200, 3, 200, 3, 200, 3, 200, 3, 200, 3, 200, 3, 201, 3, 201, 3, 201, 3, 201, 3, 201, 3, 201, 3, 201, 3, 201, 3, 202, 3, 202, 3, 202, 3, 202, 3, 202, 3, 203, 3, 203, 3, 203, 3, 203, 3, 203, 3, 203, 3, 203, 3, 203, 3, 203, 3, 204, 3, 204, 3, 204, 3, 204, 3, 204, 3, 204, 3, 204, 3, 204, 3, 204, 3, 204, 3, 204, 3, 204, 3, 205, 3, 205, 3, 205, 3, 205, 3, 205, 3, 205, 3, 205, 3, 205, 3, 205, 3, 206, 3, 206, 3, 206, 3, 206, 3, 206, 3, 206, 3, 206, 3, 206, 3, 207, 3, 207, 3, 207, 3, 207, 3, 207, 3, 207, 3, 207, 3, 207, 3, 207, 3, 207, 3, 207, 3, 208, 3, 208, 3, 208, 3, 208, 3, 208, 3, 208, 3, 208, 3, 208, 3, 208, 3, 208, 3, 209, 3, 209, 3, 209, 3, 209, 3, 209, 3, 209, 3, 209, 3, 209, 3, 209, 3, 209, 3, 210, 3, 210, 3, 210, 3, 210, 3, 210, 3, 210, 3, 210, 3, 210, 3, 210, 3, 210, 3, 211, 3, 211, 3, 211, 3, 211, 3, 211, 3, 211, 3, 211, 3, 211, 3, 211, 3, 211, 3, 212, 3, 212, 3, 212, 3, 212, 3, 212, 3, 212, 3, 212, 3, 212, 3, 212, 3, 212, 3, 212, 3, 212, 3, 212, 3, 212, 3, 212, 3, 213, 3, 213, 3, 213, 3, 213, 3, 213, 3, 213, 3, 213, 3, 213, 3, 213, 3, 213, 3, 213, 3, 213, 3, 213, 3, 213, 3, 214, 3, 214, 3, 214, 3, 214, 3, 214, 3, 214, 3, 214, 3, 214, 3, 214, 3, 215, 3, 215, 3, 215, 3, 215, 3, 215, 3, 215, 3, 215, 3, 215, 3, 215, 3, 216, 3, 216, 3, 216, 3, 216, 3, 216, 3, 216, 3, 216, 3, 216, 3, 216, 3, 216, 3, 217, 3, 217, 3, 217, 3, 217, 3, 218, 3, 218, 3, 218, 3, 218, 3, 218, 3, 218, 3, 218, 3, 218, 3, 218, 3, 218, 3, 218, 3, 219, 3, 219, 3, 219, 3, 219, 3, 219, 3, 219, 3, 219, 3, 219, 3, 219, 3, 219, 3, 219, 3, 219, 3, 220, 3, 220, 3, 220, 3, 220, 3, 220, 3, 220, 3, 220, 3, 220, 3, 221, 3, 221, 3, 221, 3, 221, 3, 221, 3, 221, 3, 221, 3, 221, 3, 222, 3, 222, 3, 222, 3, 222, 3, 222, 3, 223, 3, 223, 3, 223, 3, 223, 3, 223, 3, 223, 3, 223, 3, 223, 3, 223, 3, 223, 3, 223, 3, 223, 3, 224, 3, 224, 3, 224, 3, 224, 3, 224, 3, 224, 3, 224, 3, 224, 3, 224, 3, 224, 3, 225, 3, 225, 3, 225, 3, 225, 3, 225, 3, 225, 3, 225, 3, 225, 3, 226, 3, 226, 3, 226, 3, 226, 3, 226, 3, 226, 3, 226, 3, 226, 3, 226, 3, 227, 3, 227, 3, 227, 3, 227, 3, 227, 3, 227, 3, 227, 3, 227, 3, 227, 3, 228, 3, 228, 3, 228, 3, 228, 3, 228, 3, 228, 3, 228, 3, 228, 3, 228, 3, 228, 3, 228, 3, 228, 3, 228, 3, 228, 3, 229, 3, 229, 3, 229, 3, 229, 3, 229, 3, 229, 3, 229, 3, 229, 3, 229, 3, 229, 3, 229, 3, 229, 3, 229, 3, 229, 3, 229, 3, 230, 3, 230, 3, 230, 3, 230, 3, 230, 3, 230, 3, 230, 3, 231, 3, 231, 3, 231, 3, 231, 3, 231, 3, 231, 3, 231, 3, 231, 3, 231, 3, 231, 3, 232, 3, 232, 3, 232, 3, 232, 3, 232, 3, 232, 3, 233, 3, 233, 3, 233, 3, 233, 3, 233, 3, 233, 3, 234, 3, 234, 3, 234, 3, 234, 3, 234, 3, 235, 3, 235, 3, 235, 3, 236, 3, 236, 3, 236, 3, 236, 3, 236, 3, 236, 3, 237, 3, 237, 3, 237, 3, 237, 3, 237, 3, 237, 3, 238, 3, 238, 3, 238, 3, 238, 3, 238, 3, 238, 3, 238, 3, 239, 3, 239, 3, 239, 3, 239, 3, 239, 3, 239, 3, 239, 3, 239, 3, 239, 3, 239, 3, 240, 3, 240, 3, 240, 3, 240, 3, 240, 3, 240, 3, 240, 3, 241, 3, 241, 3, 241, 3, 241, 3, 241, 3, 241, 3, 241, 3, 242, 3, 242, 3, 242, 3, 242, 3, 242, 3, 242, 3, 243, 3, 243, 3, 243, 3, 243, 3, 243, 3, 244, 3, 244, 3, 244, 3, 244, 3, 244, 3, 244, 3, 245, 3, 245, 3, 245, 3, 245, 3, 245, 3, 245, 3, 245, 3, 246, 3, 246, 3, 246, 3, 246, 3, 246, 3, 246, 3, 246, 3, 246, 3, 247, 3, 247, 3, 247, 3, 247, 3, 247, 3, 248, 3, 248, 3, 248, 3, 248, 3, 248, 3, 249, 3, 249, 3, 249, 3, 249, 3, 249, 3, 249, 3, 249, 3, 250, 3, 250, 3, 250, 3, 250, 3, 250, 3, 250, 3, 250, 3, 250, 3, 250, 3, 250, 3, 251, 3, 251, 3, 251, 3, 251, 3, 251, 3, 251, 3, 251, 3, 252, 3, 252, 3, 252, 3, 252, 3, 252, 3, 252, 3, 252, 3, 253, 3, 253, 3, 253, 3, 254, 3, 254, 3, 254, 3, 254, 3, 254, 3, 254, 3, 254, 3, 255, 3, 255, 3, 255, 3, 255, 3, 255, 3, 255, 3, 256, 3, 256, 3, 256, 3, 256, 3, 256, 3, 256, 3, 256, 3, 256, 3, 256, 3, 256, 3, 256, 3, 256, 3, 256, 3, 257, 3, 257, 3, 257, 3, 257, 3, 257, 3, 257, 3, 257, 3, 257, 3, 257, 3, 257, 3, 257, 3, 257, 3, 257, 3, 257, 3, 257, 3, 257, 3, 257, 3, 257, 3, 257, 3, 257, 3, 258, 3, 258, 3, 258, 3, 258, 3, 258, 3, 258, 3, 258, 3, 258, 3, 258, 3, 258, 3, 258, 3, 258, 3, 258, 3, 258, 3, 258, 3, 258, 3, 258, 3, 258, 3, 259, 3, 259, 3, 259, 3, 259, 3, 259, 3, 259, 3, 259, 3, 259, 3, 259, 3, 259, 3, 259, 3, 259, 3, 259, 3, 259, 3, 259, 3, 259, 3, 259, 3, 259, 3, 259, 3, 259, 3, 260, 3, 260, 3, 260, 3, 260, 3, 260, 3, 260, 3, 260, 3, 260, 3, 260, 3, 260, 3, 260, 3, 260, 3, 261, 3, 261, 3, 261, 3, 261, 3, 261, 3, 261, 3, 261, 3, 261, 3, 261, 3, 261, 3, 261, 3, 261, 3, 261, 3, 262, 3, 262, 3, 262, 3, 262, 3, 262, 3, 262, 3, 262, 3, 262, 3, 262, 3, 262, 3, 262, 3, 262, 3, 262, 3, 262, 3, 262, 3, 262, 3, 262, 3, 262, 3, 262, 3, 262, 3, 262, 3, 262, 3, 262, 3, 263, 3, 263, 3, 263, 3, 263, 3, 263, 3, 263, 3, 263, 3, 263, 3, 263, 3, 263, 3, 263, 3, 263, 3, 263, 3, 263, 3, 263, 3, 263, 3, 263, 3, 264, 3, 264, 3, 264, 3, 264, 3, 264, 3, 264, 3, 264, 3, 264, 3, 264, 3, 265, 3, 265, 3, 265, 3, 265, 3, 265, 3, 265, 3, 265, 3, 265, 3, 265, 3, 265, 3, 265, 3, 265, 3, 265, 3, 265, 3, 265, 3, 265, 3, 265, 3, 265, 3, 265, 3, 265, 3, 265, 3, 265, 3, 265, 3, 265, 3, 265, 3, 265, 3, 265, 3, 265, 3, 265, 3, 265, 3, 265, 3, 265, 3, 265, 3, 265, 3, 265, 3, 265, 3, 266, 3, 266, 3, 266, 3, 266, 3, 266, 3, 266, 3, 267, 3, 267, 3, 267, 3, 267, 3, 267, 3, 267, 3, 267, 3, 267, 3, 267, 3, 267, 3, 267, 3, 267, 3, 267, 3, 267, 3, 267, 3, 267, 3, 267, 3, 268, 3, 268, 3, 268, 3, 268, 3, 268, 3, 268, 3, 268, 3, 268, 3, 268, 3, 268, 3, 268, 3, 268, 3, 268, 3, 268, 3, 269, 3, 269, 3, 269, 3, 269, 3, 269, 3, 269, 3, 269, 3, 269, 3, 269, 3, 269, 3, 269, 3, 269, 3, 269, 3, 269, 3, 269, 3, 269, 3, 269, 3, 270, 3, 270, 3, 270, 3, 270, 3, 270, 3, 270, 3, 270, 3, 270, 3, 270, 3, 270, 3, 270, 3, 270, 3, 270, 3, 270, 3, 270, 3, 270, 3, 270, 3, 270, 3, 270, 3, 270, 3, 270, 3, 270, 3, 270, 3, 270, 3, 270, 3, 270, 3, 270, 3, 271, 3, 271, 3, 271, 3, 271, 3, 271, 3, 271, 3, 271, 3, 272, 3, 272, 3, 272, 3, 272, 3, 272, 3, 272, 3, 273, 3, 273, 3, 273, 3, 273, 3, 273, 3, 273, 3, 273, 3, 273, 3, 273, 3, 273, 3, 273, 3, 273, 3, 273, 3, 273, 3, 273, 3, 273, 3, 273, 3, 273, 3, 273, 3, 273, 3, 273, 3, 274, 3, 274, 3, 274, 3, 274, 3, 274, 3, 274, 3, 274, 3, 274, 3, 274, 3, 274, 3, 274, 3, 274, 3, 274, 3, 274, 3, 274, 3, 274, 3, 274, 3, 274, 3, 274, 3, 274, 3, 275, 3, 275, 3, 275, 3, 275, 3, 275, 3, 275, 3, 275, 3, 275, 3, 275, 3, 275, 3, 275, 3, 275, 3, 275, 3, 275, 3, 275, 3, 275, 3, 275, 3, 275, 3, 275, 3, 275, 3, 275, 3, 276, 3, 276, 3, 276, 3, 276, 3, 276, 3, 276, 3, 276, 3, 276, 3, 276, 3, 276, 3, 276, 3, 276, 3, 276, 3, 276, 3, 277, 3, 277, 3, 277, 3, 277, 3, 277, 3, 277, 3, 277, 3, 277, 3, 277, 3, 277, 3, 278, 3, 278, 3, 278, 3, 278, 3, 278, 3, 278, 3, 278, 3, 278, 3, 279, 3, 279, 3, 279, 3, 279, 3, 279, 3, 279, 3, 279, 3, 279, 3, 279, 3, 279, 3, 279, 3, 279, 3, 279, 3, 279, 3, 279, 3, 279, 3, 279, 3, 279, 3, 280, 3, 280, 3, 280, 3, 280, 3, 280, 3, 280, 3, 280, 3, 280, 3, 280, 3, 280, 3, 280, 3, 280, 3, 280, 3, 280, 3, 280, 3, 280, 3, 280, 3, 280, 3, 280, 3, 280, 3, 280, 3, 280, 3, 280, 3, 280, 3, 281, 3, 281, 3, 281, 3, 281, 3, 281, 3, 281, 3, 281, 3, 281, 3, 281, 3, 281, 3, 281, 3, 281, 3, 281, 3, 281, 3, 281, 3, 282, 3, 282, 3, 282, 3, 282, 3, 282, 3, 282, 3, 282, 3, 282, 3, 282, 3, 282, 3, 282, 3, 282, 3, 282, 3, 282, 3, 282, 3, 282, 3, 282, 3, 282, 3, 282, 3, 282, 3, 282, 3, 283, 3, 283, 3, 283, 3, 283, 3, 283, 3, 283, 3, 283, 3, 283, 3, 283, 3, 284, 3, 284, 3, 284, 3, 284, 3, 284, 3, 284, 3, 284, 3, 284, 3, 284, 3, 284, 3, 284, 3, 284, 3, 285, 3, 285, 3, 285, 3, 285, 3, 285, 3, 285, 3, 285, 3, 285, 3, 285, 3, 285, 3, 285, 3, 285, 3, 285, 3, 285, 3, 286, 3, 286, 3, 286, 3, 286, 3, 286, 3, 286, 3, 286, 3, 286, 3, 286, 3, 286, 3, 286, 3, 286, 3, 286, 3, 286, 3, 286, 3, 287, 3, 287, 3, 287, 3, 287, 3, 287, 3, 287, 3, 287, 3, 287, 3, 287, 3, 287, 3, 287, 3, 287, 3, 287, 3, 287, 3, 287, 3, 287, 3, 287, 3, 287, 3, 287, 3, 288, 3, 288, 3, 288, 3, 288, 3, 288, 3, 288, 3, 288, 3, 288, 3, 289, 3, 289, 3, 289, 3, 289, 3, 289, 3, 290, 3, 290, 3, 290, 3, 290, 3, 290, 3, 290, 3, 290, 3, 290, 3, 290, 3, 290, 3, 290, 3, 290, 3, 291, 3, 291, 3, 291, 3, 291, 3, 291, 3, 292, 3, 292, 3, 292, 3, 292, 3, 292, 3, 292, 3, 292, 3, 292, 3, 292, 3, 292, 3, 292, 3, 292, 3, 292, 3, 292, 3, 292, 3, 292, 3, 292, 3, 293, 3, 293, 3, 293, 3, 293, 3, 293, 3, 294, 3, 294, 3, 294, 3, 295, 3, 295, 3, 296, 3, 296, 3, 297, 3, 297, 3, 298, 3, 298, 3, 299, 3, 299, 3, 300, 3, 300, 3, 301, 3, 301, 3, 302, 6, 302, 3045, 10, 302, 13, 302, 14, 302, 3046, 3, 303, 6, 303, 3050, 10, 303, 13, 303, 14, 303, 3051, 5, 303, 3054, 10, 303, 3, 303, 3, 303, 6, 303, 3058, 10, 303, 13, 303, 14, 303, 3059, 3, 304, 3, 304, 6, 304, 3064, 10, 304, 13, 304, 14, 304, 3065, 7, 304, 3068, 10, 304, 12, 304, 14, 304, 3071, 11, 304, 3, 305, 6, 305, 3074, 10, 305, 13, 305, 14, 305, 3075, 3, 305, 7, 305, 3079, 10, 305, 12, 305, 14, 305, 3082, 11, 305, 3, 306, 3, 306, 3, 306, 3, 307, 3, 307, 3, 307, 3, 307, 3, 307, 3, 307, 7, 307, 3093, 10, 307, 12, 307, 14, 307, 3096, 11, 307, 3, 307, 3, 307, 3, 308, 3, 308, 3, 308, 3, 308, 3, 308, 3, 308, 7, 308, 3106, 10, 308, 12, 308, 14, 308, 3109, 11, 308, 3, 308, 3, 308, 3, 309, 3, 309, 3, 309, 3, 309, 3, 309, 3, 309, 7, 309, 3119, 10, 309, 12, 309, 14, 309, 3122, 11, 309, 3, 309, 3, 309, 3, 310, 3, 310, 3, 311, 3, 311, 3, 311, 3, 311, 3, 3075, 2, 2, 312, 3, 2, 3, 5, 2, 4, 7, 2, 5, 9, 2, 6, 11, 2, 7, 13, 2, 8, 15, 2, 9, 17, 2, 10, 19, 2, 11, 21, 2, 12, 23, 2, 13, 25, 2, 14, 27, 2, 15, 29, 2, 16, 31, 2, 17, 33, 2, 18, 35, 2, 19, 37, 2, 20, 39, 2, 21, 41, 2, 22, 43, 2, 23, 45, 2, 24, 47, 2, 25, 49, 2, 26, 51, 2, 27, 53, 2, 28, 55, 2, 29, 57, 2, 30, 59, 2, 31, 61, 2, 32, 63, 2, 33, 65, 2, 34, 67, 2, 35, 69, 2, 36, 71, 2, 37, 73, 2, 38, 75, 2, 39, 77, 2, 40, 79, 2, 41, 81, 2, 42, 83, 2, 43, 85, 2, 44, 87, 2, 45, 89, 2, 46, 91, 2, 47, 93, 2, 48, 95, 2, 49, 97, 2, 50, 99, 2, 51, 101, 2, 52, 103, 2, 53, 105, 2, 54, 107, 2, 55, 109, 2, 56, 111, 2, 57, 113, 2, 58, 115, 2, 59, 117, 2, 60, 119, 2, 61, 121, 2, 62, 123, 2, 63, 125, 2, 64, 127, 2, 65, 129, 2, 66, 131, 2, 67, 133, 2, 68, 135, 2, 69, 137, 2, 70, 139, 2, 71, 141, 2, 72, 143, 2, 73, 145, 2, 74, 147, 2, 75, 149, 2, 76, 151, 2, 77, 153, 2, 78, 155, 2, 79, 157, 2, 80, 159, 2, 81, 161, 2, 82, 163, 2, 83, 165, 2, 84, 167, 2, 85, 169, 2, 86, 171, 2, 87, 173, 2, 88, 175, 2, 89, 177, 2, 90, 179, 2, 91, 181, 2, 92, 183, 2, 93, 185, 2, 94, 187, 2, 95, 189, 2, 96, 191, 2, 97, 193, 2, 98, 195, 2, 99, 197, 2, 100, 199, 2, 101, 201, 2, 102, 203, 2, 103, 205, 2, 104, 207, 2, 105, 209, 2, 106, 211, 2, 107, 213, 2, 108, 215, 2, 109, 217, 2, 110, 219, 2, 111, 221, 2, 112, 223, 2, 113, 225, 2, 114, 227, 2, 115, 229, 2, 116, 231, 2, 117, 233, 2, 118, 235, 2, 119, 237, 2, 120, 239, 2, 121, 241, 2, 122, 243, 2, 123, 245, 2, 124, 247, 2, 125, 249, 2, 126, 251, 2, 127, 253, 2, 128, 255, 2, 129, 257, 2, 130, 259, 2, 131, 261, 2, 132, 263, 2, 133, 265, 2, 134, 267, 2, 135, 269, 2, 136, 271, 2, 137, 273, 2, 138, 275, 2, 139, 277, 2, 140, 279, 2, 141, 281, 2, 142, 283, 2, 143, 285, 2, 144, 287, 2, 145, 289, 2, 146, 291, 2, 147, 293, 2, 148, 295, 2, 149, 297, 2, 150, 299, 2, 151, 301, 2, 152, 303, 2, 153, 305, 2, 154, 307, 2, 155, 309, 2, 156, 311, 2, 157, 313, 2, 158, 315, 2, 159, 317, 2, 160, 319, 2, 161, 321, 2, 162, 323, 2, 163, 325, 2, 164, 327, 2, 165, 329, 2, 166, 331, 2, 167, 333, 2, 168, 335, 2, 169, 337, 2, 170, 339, 2, 171, 341, 2, 172, 343, 2, 173, 345, 2, 174, 347, 2, 175, 349, 2, 176, 351, 2, 177, 353, 2, 178, 355, 2, 179, 357, 2, 180, 359, 2, 181, 361, 2, 182, 363, 2, 183, 365, 2, 184, 367, 2, 185, 369, 2, 186, 371, 2, 187, 373, 2, 188, 375, 2, 189, 377, 2, 190, 379, 2, 191, 381, 2, 192, 383, 2, 193, 385, 2, 194, 387, 2, 195, 389, 2, 196, 391, 2, 197, 393, 2, 198, 395, 2, 199, 397, 2, 200, 399, 2, 201, 401, 2, 202, 403, 2, 203, 405, 2, 204, 407, 2, 205, 409, 2, 206, 411, 2, 207, 413, 2, 208, 415, 2, 209, 417, 2, 210, 419, 2, 211, 421, 2, 212, 423, 2, 213, 425, 2, 214, 427, 2, 215, 429, 2, 216, 431, 2, 217, 433, 2, 218, 435, 2, 219, 437, 2, 220, 439, 2, 221, 441, 2, 222, 443, 2, 223, 445, 2, 224, 447, 2, 225, 449, 2, 226, 451, 2, 227, 453, 2, 228, 455, 2, 229, 457, 2, 230, 459, 2, 231, 461, 2, 232, 463, 2, 233, 465, 2, 234, 467, 2, 235, 469, 2, 236, 471, 2, 237, 473, 2, 238, 475, 2, 239, 477, 2, 240, 479, 2, 241, 481, 2, 242, 483, 2, 243, 485, 2, 244, 487, 2, 245, 489, 2, 246, 491, 2, 247, 493, 2, 248, 495, 2, 249, 497, 2, 250, 499, 2, 251, 501, 2, 252, 503, 2, 253, 505, 2, 254, 507, 2, 255, 509, 2, 256, 511, 2, 257, 513, 2, 258, 515, 2, 259, 517, 2, 260, 519, 2, 261, 521, 2, 262, 523, 2, 263, 525, 2, 264, 527, 2, 265, 529, 2, 266, 531, 2, 267, 533, 2, 268, 535, 2, 269, 537, 2, 270, 539, 2, 271, 541, 2, 272, 543, 2, 273, 545, 2, 274, 547, 2, 275, 549, 2, 276, 551, 2, 277, 553, 2, 278, 555, 2, 279, 557, 2, 280, 559, 2, 281, 561, 2, 282, 563, 2, 283, 565, 2, 284, 567, 2, 285, 569, 2, 286, 571, 2, 287, 573, 2, 288, 575, 2, 289, 577, 2, 290, 579, 2, 291, 581, 2, 292, 583, 2, 293, 585, 2, 294, 587, 2, 295, 589, 2, 296, 591, 2, 297, 593, 2, 298, 595, 2, 299, 597, 2, 300, 599, 2, 301, 601, 2, 302, 603, 2, 303, 605, 2, 304, 607, 2, 2, 609, 2, 2, 611, 2, 305, 613, 2, 306, 615, 2, 307, 617, 2, 308, 619, 2, 2, 621, 2, 309, 3, 2, 10, 3, 2, 47, 48, 4, 2, 44, 44, 50, 59, 4, 2, 44, 44, 66, 92, 7, 2, 44, 44, 47, 47, 50, 59, 67, 92, 97, 97, 4, 2, 36, 36, 94, 94, 4, 2, 41, 41, 94, 94, 4, 2, 94, 94, 98, 98, 3, 2, 50, 59, 2, 3144, 2, 3, 3, 2, 2, 2, 2, 5, 3, 2, 2, 2, 2, 7, 3, 2, 2, 2, 2, 9, 3, 2, 2, 2, 2, 11, 3, 2, 2, 2, 2, 13, 3, 2, 2, 2, 2, 15, 3, 2, 2, 2, 2, 17, 3, 2, 2, 2, 2, 19, 3, 2, 2, 2, 2, 21, 3, 2, 2, 2, 2, 23, 3, 2, 2, 2, 2, 25, 3, 2, 2, 2, 2, 27, 3, 2, 2, 2, 2, 29, 3, 2, 2, 2, 2, 31, 3, 2, 2, 2, 2, 33, 3, 2, 2, 2, 2, 35, 3, 2, 2, 2, 2, 37, 3, 2, 2, 2, 2, 39, 3, 2, 2, 2, 2, 41, 3, 2, 2, 2, 2, 43, 3, 2, 2, 2, 2, 45, 3, 2, 2, 2, 2, 47, 3, 2, 2, 2, 2, 49, 3, 2, 2, 2, 2, 51, 3, 2, 2, 2, 2, 53, 3, 2, 2, 2, 2, 55, 3, 2, 2, 2, 2, 57, 3, 2, 2, 2, 2, 59, 3, 2, 2, 2, 2, 61, 3, 2, 2, 2, 2, 63, 3, 2, 2, 2, 2, 65, 3, 2, 2, 2, 2, 67, 3, 2, 2, 2, 2, 69, 3, 2, 2, 2, 2, 71, 3, 2, 2, 2, 2, 73, 3, 2, 2, 2, 2, 75, 3, 2, 2, 2, 2, 77, 3, 2, 2, 2, 2, 79, 3, 2, 2, 2, 2, 81, 3, 2, 2, 2, 2, 83, 3, 2, 2, 2, 2, 85, 3, 2, 2, 2, 2, 87, 3, 2, 2, 2, 2, 89, 3, 2, 2, 2, 2, 91, 3, 2, 2, 2, 2, 93, 3, 2, 2, 2, 2, 95, 3, 2, 2, 2, 2, 97, 3, 2, 2, 2, 2, 99, 3, 2, 2, 2, 2, 101, 3, 2, 2, 2, 2, 103, 3, 2, 2, 2, 2, 105, 3, 2, 2, 2, 2, 107, 3, 2, 2, 2, 2, 109, 3, 2, 2, 2, 2, 111, 3, 2, 2, 2, 2, 113, 3, 2, 2, 2, 2, 115, 3, 2, 2, 2, 2, 117, 3, 2, 2, 2, 2, 119, 3, 2, 2, 2, 2, 121, 3, 2, 2, 2, 2, 123, 3, 2, 2, 2, 2, 125, 3, 2, 2, 2, 2, 127, 3, 2, 2, 2, 2, 129, 3, 2, 2, 2, 2, 131, 3, 2, 2, 2, 2, 133, 3, 2, 2, 2, 2, 135, 3, 2, 2, 2, 2, 137, 3, 2, 2, 2, 2, 139, 3, 2, 2, 2, 2, 141, 3, 2, 2, 2, 2, 143, 3, 2, 2, 2, 2, 145, 3, 2, 2, 2, 2, 147, 3, 2, 2, 2, 2, 149, 3, 2, 2, 2, 2, 151, 3, 2, 2, 2, 2, 153, 3, 2, 2, 2, 2, 155, 3, 2, 2, 2, 2, 157, 3, 2, 2, 2, 2, 159, 3, 2, 2, 2, 2, 161, 3, 2, 2, 2, 2, 163, 3, 2, 2, 2, 2, 165, 3, 2, 2, 2, 2, 167, 3, 2, 2, 2, 2, 169, 3, 2, 2, 2, 2, 171, 3, 2, 2, 2, 2, 173, 3, 2, 2, 2, 2, 175, 3, 2, 2, 2, 2, 177, 3, 2, 2, 2, 2, 179, 3, 2, 2, 2, 2, 181, 3, 2, 2, 2, 2, 183, 3, 2, 2, 2, 2, 185, 3, 2, 2, 2, 2, 187, 3, 2, 2, 2, 2, 189, 3, 2, 2, 2, 2, 191, 3, 2, 2, 2, 2, 193, 3, 2, 2, 2, 2, 195, 3, 2, 2, 2, 2, 197, 3, 2, 2, 2, 2, 199, 3, 2, 2, 2, 2, 201, 3, 2, 2, 2, 2, 203, 3, 2, 2, 2, 2, 205, 3, 2, 2, 2, 2, 207, 3, 2, 2, 2, 2, 209, 3, 2, 2, 2, 2, 211, 3, 2, 2, 2, 2, 213, 3, 2, 2, 2, 2, 215, 3, 2, 2, 2, 2, 217, 3, 2, 2, 2, 2, 219, 3, 2, 2, 2, 2, 221, 3, 2, 2, 2, 2, 223, 3, 2, 2, 2, 2, 225, 3, 2, 2, 2, 2, 227, 3, 2, 2, 2, 2, 229, 3, 2, 2, 2, 2, 231, 3, 2, 2, 2, 2, 233, 3, 2, 2, 2, 2, 235, 3, 2, 2, 2, 2, 237, 3, 2, 2, 2, 2, 239, 3, 2, 2, 2, 2, 241, 3, 2, 2, 2, 2, 243, 3, 2, 2, 2, 2, 245, 3, 2, 2, 2, 2, 247, 3, 2, 2, 2, 2, 249, 3, 2, 2, 2, 2, 251, 3, 2, 2, 2, 2, 253, 3, 2, 2, 2, 2, 255, 3, 2, 2, 2, 2, 257, 3, 2, 2, 2, 2, 259, 3, 2, 2, 2, 2, 261, 3, 2, 2, 2, 2, 263, 3, 2, 2, 2, 2, 265, 3, 2, 2, 2, 2, 267, 3, 2, 2, 2, 2, 269, 3, 2, 2, 2, 2, 271, 3, 2, 2, 2, 2, 273, 3, 2, 2, 2, 2, 275, 3, 2, 2, 2, 2, 277, 3, 2, 2, 2, 2, 279, 3, 2, 2, 2, 2, 281, 3, 2, 2, 2, 2, 283, 3, 2, 2, 2, 2, 285, 3, 2, 2, 2, 2, 287, 3, 2, 2, 2, 2, 289, 3, 2, 2, 2, 2, 291, 3, 2, 2, 2, 2, 293, 3, 2, 2, 2, 2, 295, 3, 2, 2, 2, 2, 297, 3, 2, 2, 2, 2, 299, 3, 2, 2, 2, 2, 301, 3, 2, 2, 2, 2, 303, 3, 2, 2, 2, 2, 305, 3, 2, 2, 2, 2, 307, 3, 2, 2, 2, 2, 309, 3, 2, 2, 2, 2, 311, 3, 2, 2, 2, 2, 313, 3, 2, 2, 2, 2, 315, 3, 2, 2, 2, 2, 317, 3, 2, 2, 2, 2, 319, 3, 2, 2, 2, 2, 321, 3, 2, 2, 2, 2, 323, 3, 2, 2, 2, 2, 325, 3, 2, 2, 2, 2, 327, 3, 2, 2, 2, 2, 329, 3, 2, 2, 2, 2, 331, 3, 2, 2, 2, 2, 333, 3, 2, 2, 2, 2, 335, 3, 2, 2, 2, 2, 337, 3, 2, 2, 2, 2, 339, 3, 2, 2, 2, 2, 341, 3, 2, 2, 2, 2, 343, 3, 2, 2, 2, 2, 345, 3, 2, 2, 2, 2, 347, 3, 2, 2, 2, 2, 349, 3, 2, 2, 2, 2, 351, 3, 2, 2, 2, 2, 353, 3, 2, 2, 2, 2, 355, 3, 2, 2, 2, 2, 357, 3, 2, 2, 2, 2, 359, 3, 2, 2, 2, 2, 361, 3, 2, 2, 2, 2, 363, 3, 2, 2, 2, 2, 365, 3, 2, 2, 2, 2, 367, 3, 2, 2, 2, 2, 369, 3, 2, 2, 2, 2, 371, 3, 2, 2, 2, 2, 373, 3, 2, 2, 2, 2, 375, 3, 2, 2, 2, 2, 377, 3, 2, 2, 2, 2, 379, 3, 2, 2, 2, 2, 381, 3, 2, 2, 2, 2, 383, 3, 2, 2, 2, 2, 385, 3, 2, 2, 2, 2, 387, 3, 2, 2, 2, 2, 389, 3, 2, 2, 2, 2, 391, 3, 2, 2, 2, 2, 393, 3, 2, 2, 2, 2, 395, 3, 2, 2, 2, 2, 397, 3, 2, 2, 2, 2, 399, 3, 2, 2, 2, 2, 401, 3, 2, 2, 2, 2, 403, 3, 2, 2, 2, 2, 405, 3, 2, 2, 2, 2, 407, 3, 2, 2, 2, 2, 409, 3, 2, 2, 2, 2, 411, 3, 2, 2, 2, 2, 413, 3, 2, 2, 2, 2, 415, 3, 2, 2, 2, 2, 417, 3, 2, 2, 2, 2, 419, 3, 2, 2, 2, 2, 421, 3, 2, 2, 2, 2, 423, 3, 2, 2, 2, 2, 425, 3, 2, 2, 2, 2, 427, 3, 2, 2, 2, 2, 429, 3, 2, 2, 2, 2, 431, 3, 2, 2, 2, 2, 433, 3, 2, 2, 2, 2, 435, 3, 2, 2, 2, 2, 437, 3, 2, 2, 2, 2, 439, 3, 2, 2, 2, 2, 441, 3, 2, 2, 2, 2, 443, 3, 2, 2, 2, 2, 445, 3, 2, 2, 2, 2, 447, 3, 2, 2, 2, 2, 449, 3, 2, 2, 2, 2, 451, 3, 2, 2, 2, 2, 453, 3, 2, 2, 2, 2, 455, 3, 2, 2, 2, 2, 457, 3, 2, 2, 2, 2, 459, 3, 2, 2, 2, 2, 461, 3, 2, 2, 2, 2, 463, 3, 2, 2, 2, 2, 465, 3, 2, 2, 2, 2, 467, 3, 2, 2, 2, 2, 469, 3, 2, 2, 2, 2, 471, 3, 2, 2, 2, 2, 473, 3, 2, 2, 2, 2, 475, 3, 2, 2, 2, 2, 477, 3, 2, 2, 2, 2, 479, 3, 2, 2, 2, 2, 481, 3, 2, 2, 2, 2, 483, 3, 2, 2, 2, 2, 485, 3, 2, 2, 2, 2, 487, 3, 2, 2, 2, 2, 489, 3, 2, 2, 2, 2, 491, 3, 2, 2, 2, 2, 493, 3, 2, 2, 2, 2, 495, 3, 2, 2, 2, 2, 497, 3, 2, 2, 2, 2, 499, 3, 2, 2, 2, 2, 501, 3, 2, 2, 2, 2, 503, 3, 2, 2, 2, 2, 505, 3, 2, 2, 2, 2, 507, 3, 2, 2, 2, 2, 509, 3, 2, 2, 2, 2, 511, 3, 2, 2, 2, 2, 513, 3, 2, 2, 2, 2, 515, 3, 2, 2, 2, 2, 517, 3, 2, 2, 2, 2, 519, 3, 2, 2, 2, 2, 521, 3, 2, 2, 2, 2, 523, 3, 2, 2, 2, 2, 525, 3, 2, 2, 2, 2, 527, 3, 2, 2, 2, 2, 529, 3, 2, 2, 2, 2, 531, 3, 2, 2, 2, 2, 533, 3, 2, 2, 2, 2, 535, 3, 2, 2, 2, 2, 537, 3, 2, 2, 2, 2, 539, 3, 2, 2, 2, 2, 541, 3, 2, 2, 2, 2, 543, 3, 2, 2, 2, 2, 545, 3, 2, 2, 2, 2, 547, 3, 2, 2, 2, 2, 549, 3, 2, 2, 2, 2, 551, 3, 2, 2, 2, 2, 553, 3, 2, 2, 2, 2, 555, 3, 2, 2, 2, 2, 557, 3, 2, 2, 2, 2, 559, 3, 2, 2, 2, 2, 561, 3, 2, 2, 2, 2, 563, 3, 2, 2, 2, 2, 565, 3, 2, 2, 2, 2, 567, 3, 2, 2, 2, 2, 569, 3, 2, 2, 2, 2, 571, 3, 2, 2, 2, 2, 573, 3, 2, 2, 2, 2, 575, 3, 2, 2, 2, 2, 577, 3, 2, 2, 2, 2, 579, 3, 2, 2, 2, 2, 581, 3, 2, 2, 2, 2, 583, 3, 2, 2, 2, 2, 585, 3, 2, 2, 2, 2, 587, 3, 2, 2, 2, 2, 589, 3, 2, 2, 2, 2, 591, 3, 2, 2, 2, 2, 593, 3, 2, 2, 2, 2, 595, 3, 2, 2, 2, 2, 597, 3, 2, 2, 2, 2, 599, 3, 2, 2, 2, 2, 601, 3, 2, 2, 2, 2, 603, 3, 2, 2, 2, 2, 605, 3, 2, 2, 2, 2, 611, 3, 2, 2, 2, 2, 613, 3, 2, 2, 2, 2, 615, 3, 2, 2, 2, 2, 617, 3, 2, 2, 2, 2, 621, 3, 2, 2, 2, 3, 623, 3, 2, 2, 2, 5, 630, 3, 2, 2, 2, 7, 639, 3, 2, 2, 2, 9, 644, 3, 2, 2, 2, 11, 649, 3, 2, 2, 2, 13, 655, 3, 2, 2, 2, 15, 662, 3, 2, 2, 2, 17, 669, 3, 2, 2, 2, 19, 675, 3, 2, 2, 2, 21, 681, 3, 2, 2, 2, 23, 686, 3, 2, 2, 2, 25, 691, 3, 2, 2, 2, 27, 696, 3, 2, 2, 2, 29, 700, 3, 2, 2, 2, 31, 705, 3, 2, 2, 2, 33, 711, 3, 2, 2, 2, 35, 718, 3, 2, 2, 2, 37, 724, 3, 2, 2, 2, 39, 730, 3, 2, 2, 2, 41, 735, 3, 2, 2, 2, 43, 743, 3, 2, 2, 2, 45, 752, 3, 2, 2, 2, 47, 762, 3, 2, 2, 2, 49, 769, 3, 2, 2, 2, 51, 772, 3, 2, 2, 2, 53, 775, 3, 2, 2, 2, 55, 778, 3, 2, 2, 2, 57, 781, 3, 2, 2, 2, 59, 788, 3, 2, 2, 2, 61, 794, 3, 2, 2, 2, 63, 796, 3, 2, 2, 2, 65, 801, 3, 2, 2, 2, 67, 810, 3, 2, 2, 2, 69, 817, 3, 2, 2, 2, 71, 822, 3, 2, 2, 2, 73, 826, 3, 2, 2, 2, 75, 829, 3, 2, 2, 2, 77, 833, 3, 2, 2, 2, 79, 843, 3, 2, 2, 2, 81, 855, 3, 2, 2, 2, 83, 873, 3, 2, 2, 2, 85, 884, 3, 2, 2, 2, 87, 891, 3, 2, 2, 2, 89, 897, 3, 2, 2, 2, 91, 907, 3, 2, 2, 2, 93, 918, 3, 2, 2, 2, 95, 932, 3, 2, 2, 2, 97, 948, 3, 2, 2, 2, 99, 961, 3, 2, 2, 2, 101, 973, 3, 2, 2, 2, 103, 986, 3, 2, 2, 2, 105, 997, 3, 2, 2, 2, 107, 1010, 3, 2, 2, 2, 109, 1025, 3, 2, 2, 2, 111, 1036, 3, 2, 2, 2, 113, 1046, 3, 2, 2, 2, 115, 1065, 3, 2, 2, 2, 117, 1089, 3, 2, 2, 2, 119, 1094, 3, 2, 2, 2, 121, 1097, 3, 2, 2, 2, 123, 1101, 3, 2, 2, 2, 125, 1104, 3, 2, 2, 2, 127, 1108, 3, 2, 2, 2, 129, 1112, 3, 2, 2, 2, 131, 1117, 3, 2, 2, 2, 133, 1123, 3, 2, 2, 2, 135, 1130, 3, 2, 2, 2, 137, 1139, 3, 2, 2, 2, 139, 1148, 3, 2, 2, 2, 141, 1160, 3, 2, 2, 2, 143, 1172, 3, 2, 2, 2, 145, 1179, 3, 2, 2, 2, 147, 1186, 3, 2, 2, 2, 149, 1191, 3, 2, 2, 2, 151, 1195, 3, 2, 2, 2, 153, 1200, 3, 2, 2, 2, 155, 1206, 3, 2, 2, 2, 157, 1214, 3, 2, 2, 2, 159, 1219, 3, 2, 2, 2, 161, 1238, 3, 2, 2, 2, 163, 1257, 3, 2, 2, 2, 165, 1271, 3, 2, 2, 2, 167, 1288, 3, 2, 2, 2, 169, 1300, 3, 2, 2, 2, 171, 1312, 3, 2, 2, 2, 173, 1328, 3, 2, 2, 2, 175, 1339, 3, 2, 2, 2, 177, 1350, 3, 2, 2, 2, 179, 1359, 3, 2, 2, 2, 181, 1370, 3, 2, 2, 2, 183, 1381, 3, 2, 2, 2, 185, 1391, 3, 2, 2, 2, 187, 1398, 3, 2, 2, 2, 189, 1410, 3, 2, 2, 2, 191, 1414, 3, 2, 2, 2, 193, 1422, 3, 2, 2, 2, 195, 1429, 3, 2, 2, 2, 197, 1434, 3, 2, 2, 2, 199, 1440, 3, 2, 2, 2, 201, 1447, 3, 2, 2, 2, 203, 1455, 3, 2, 2, 2, 205, 1457, 3, 2, 2, 2, 207, 1459, 3, 2, 2, 2, 209, 1461, 3, 2, 2, 2, 211, 1463, 3, 2, 2, 2, 213, 1465, 3, 2, 2, 2, 215, 1467, 3, 2, 2, 2, 217, 1470, 3, 2, 2, 2, 219, 1473, 3, 2, 2, 2, 221, 1476, 3, 2, 2, 2, 223, 1478, 3, 2, 2, 2, 225, 1480, 3, 2, 2, 2, 227, 1482, 3, 2, 2, 2, 229, 1484, 3, 2, 2, 2, 231, 1486, 3, 2, 2, 2, 233, 1488, 3, 2, 2, 2, 235, 1490, 3, 2, 2, 2, 237, 1492, 3, 2, 2, 2, 239, 1494, 3, 2, 2, 2, 241, 1496, 3, 2, 2, 2, 243, 1498, 3, 2, 2, 2, 245, 1500, 3, 2, 2, 2, 247, 1502, 3, 2, 2, 2, 249, 1504, 3, 2, 2, 2, 251, 1506, 3, 2, 2, 2, 253, 1508, 3, 2, 2, 2, 255, 1510, 3, 2, 2, 2, 257, 1514, 3, 2, 2, 2, 259, 1520, 3, 2, 2, 2, 261, 1535, 3, 2, 2, 2, 263, 1541, 3, 2, 2, 2, 265, 1553, 3, 2, 2, 2, 267, 1557, 3, 2, 2, 2, 269, 1562, 3, 2, 2, 2, 271, 1569, 3, 2, 2, 2, 273, 1573, 3, 2, 2, 2, 275, 1578, 3, 2, 2, 2, 277, 1584, 3, 2, 2, 2, 279, 1590, 3, 2, 2, 2, 281, 1597, 3, 2, 2, 2, 283, 1601, 3, 2, 2, 2, 285, 1607, 3, 2, 2, 2, 287, 1616, 3, 2, 2, 2, 289, 1624, 3, 2, 2, 2, 291, 1636, 3, 2, 2, 2, 293, 1647, 3, 2, 2, 2, 295, 1658, 3, 2, 2, 2, 297, 1663, 3, 2, 2, 2, 299, 1669, 3, 2, 2, 2, 301, 1674, 3, 2, 2, 2, 303, 1679, 3, 2, 2, 2, 305, 1686, 3, 2, 2, 2, 307, 1695, 3, 2, 2, 2, 309, 1709, 3, 2, 2, 2, 311, 1716, 3, 2, 2, 2, 313, 1728, 3, 2, 2, 2, 315, 1736, 3, 2, 2, 2, 317, 1745, 3, 2, 2, 2, 319, 1756, 3, 2, 2, 2, 321, 1767, 3, 2, 2, 2, 323, 1772, 3, 2, 2, 2, 325, 1782, 3, 2, 2, 2, 327, 1784, 3, 2, 2, 2, 329, 1787, 3, 2, 2, 2, 331, 1791, 3, 2, 2, 2, 333, 1796, 3, 2, 2, 2, 335, 1804, 3, 2, 2, 2, 337, 1809, 3, 2, 2, 2, 339, 1815, 3, 2, 2, 2, 341, 1817, 3, 2, 2, 2, 343, 1821, 3, 2, 2, 2, 345, 1827, 3, 2, 2, 2, 347, 1830, 3, 2, 2, 2, 349, 1834, 3, 2, 2, 2, 351, 1840, 3, 2, 2, 2, 353, 1845, 3, 2, 2, 2, 355, 1849, 3, 2, 2, 2, 357, 1852, 3, 2, 2, 2, 359, 1856, 3, 2, 2, 2, 361, 1862, 3, 2, 2, 2, 363, 1867, 3, 2, 2, 2, 365, 1873, 3, 2, 2, 2, 367, 1878, 3, 2, 2, 2, 369, 1883, 3, 2, 2, 2, 371, 1892, 3, 2, 2, 2, 373, 1897, 3, 2, 2, 2, 375, 1902, 3, 2, 2, 2, 377, 1907, 3, 2, 2, 2, 379, 1913, 3, 2, 2, 2, 381, 1917, 3, 2, 2, 2, 383, 1921, 3, 2, 2, 2, 385, 1929, 3, 2, 2, 2, 387, 1937, 3, 2, 2, 2, 389, 1941, 3, 2, 2, 2, 391, 1945, 3, 2, 2, 2, 393, 1953, 3, 2, 2, 2, 395, 1961, 3, 2, 2, 2, 397, 1974, 3, 2, 2, 2, 399, 1987, 3, 2, 2, 2, 401, 2005, 3, 2, 2, 2, 403, 2013, 3, 2, 2, 2, 405, 2018, 3, 2, 2, 2, 407, 2027, 3, 2, 2, 2, 409, 2039, 3, 2, 2, 2, 411, 2048, 3, 2, 2, 2, 413, 2056, 3, 2, 2, 2, 415, 2067, 3, 2, 2, 2, 417, 2077, 3, 2, 2, 2, 419, 2087, 3, 2, 2, 2, 421, 2097, 3, 2, 2, 2, 423, 2107, 3, 2, 2, 2, 425, 2122, 3, 2, 2, 2, 427, 2136, 3, 2, 2, 2, 429, 2145, 3, 2, 2, 2, 431, 2154, 3, 2, 2, 2, 433, 2164, 3, 2, 2, 2, 435, 2168, 3, 2, 2, 2, 437, 2179, 3, 2, 2, 2, 439, 2191, 3, 2, 2, 2, 441, 2199, 3, 2, 2, 2, 443, 2207, 3, 2, 2, 2, 445, 2212, 3, 2, 2, 2, 447, 2224, 3, 2, 2, 2, 449, 2234, 3, 2, 2, 2, 451, 2242, 3, 2, 2, 2, 453, 2251, 3, 2, 2, 2, 455, 2260, 3, 2, 2, 2, 457, 2274, 3, 2, 2, 2, 459, 2289, 3, 2, 2, 2, 461, 2296, 3, 2, 2, 2, 463, 2306, 3, 2, 2, 2, 465, 2312, 3, 2, 2, 2, 467, 2318, 3, 2, 2, 2, 469, 2323, 3, 2, 2, 2, 471, 2326, 3, 2, 2, 2, 473, 2332, 3, 2, 2, 2, 475, 2338, 3, 2, 2, 2, 477, 2345, 3, 2, 2, 2, 479, 2355, 3, 2, 2, 2, 481, 2362, 3, 2, 2, 2, 483, 2369, 3, 2, 2, 2, 485, 2375, 3, 2, 2, 2, 487, 2380, 3, 2, 2, 2, 489, 2386, 3, 2, 2, 2, 491, 2393, 3, 2, 2, 2, 493, 2401, 3, 2, 2, 2, 495, 2406, 3, 2, 2, 2, 497, 2411, 3, 2, 2, 2, 499, 2418, 3, 2, 2, 2, 501, 2428, 3, 2, 2, 2, 503, 2435, 3, 2, 2, 2, 505, 2442, 3, 2, 2, 2, 507, 2445, 3, 2, 2, 2, 509, 2452, 3, 2, 2, 2, 511, 2458, 3, 2, 2, 2, 513, 2471, 3, 2, 2, 2, 515, 2491, 3, 2, 2, 2, 517, 2509, 3, 2, 2, 2, 519, 2529, 3, 2, 2, 2, 521, 2541, 3, 2, 2, 2, 523, 2554, 3, 2, 2, 2, 525, 2577, 3, 2, 2, 2, 527, 2594, 3, 2, 2, 2, 529, 2603, 3, 2, 2, 2, 531, 2639, 3, 2, 2, 2, 533, 2645, 3, 2, 2, 2, 535, 2662, 3, 2, 2, 2, 537, 2676, 3, 2, 2, 2, 539, 2693, 3, 2, 2, 2, 541, 2720, 3, 2, 2, 2, 543, 2727, 3, 2, 2, 2, 545, 2733, 3, 2, 2, 2, 547, 2754, 3, 2, 2, 2, 549, 2774, 3, 2, 2, 2, 551, 2795, 3, 2, 2, 2, 553, 2809, 3, 2, 2, 2, 555, 2819, 3, 2, 2, 2, 557, 2827, 3, 2, 2, 2, 559, 2845, 3, 2, 2, 2, 561, 2869, 3, 2, 2, 2, 563, 2884, 3, 2, 2, 2, 565, 2905, 3, 2, 2, 2, 567, 2914, 3, 2, 2, 2, 569, 2926, 3, 2, 2, 2, 571, 2940, 3, 2, 2, 2, 573, 2955, 3, 2, 2, 2, 575, 2974, 3, 2, 2, 2, 577, 2982, 3, 2, 2, 2, 579, 2987, 3, 2, 2, 2, 581, 2999, 3, 2, 2, 2, 583, 3004, 3, 2, 2, 2, 585, 3021, 3, 2, 2, 2, 587, 3026, 3, 2, 2, 2, 589, 3029, 3, 2, 2, 2, 591, 3031, 3, 2, 2, 2, 593, 3033, 3, 2, 2, 2, 595, 3035, 3, 2, 2, 2, 597, 3037, 3, 2, 2, 2, 599, 3039, 3, 2, 2, 2, 601, 3041, 3, 2, 2, 2, 603, 3044, 3, 2, 2, 2, 605, 3053, 3, 2, 2, 2, 607, 3069, 3, 2, 2, 2, 609, 3073, 3, 2, 2, 2, 611, 3083, 3, 2, 2, 2, 613, 3086, 3, 2, 2, 2, 615, 3099, 3, 2, 2, 2, 617, 3112, 3, 2, 2, 2, 619, 3125, 3, 2, 2, 2, 621, 3127, 3, 2, 2, 2, 623, 624, 7, 85, 2, 2, 624, 625, 7, 71, 2, 2, 625, 626, 7, 67, 2, 2, 626, 627, 7, 84, 2, 2, 627, 628, 7, 69, 2, 2, 628, 629, 7, 74, 2, 2, 629, 4, 3, 2, 2, 2, 630, 631, 7, 70, 2, 2, 631, 632, 7, 71, 2, 2, 632, 633, 7, 85, 2, 2, 633, 634, 7, 69, 2, 2, 634, 635, 7, 84, 2, 2, 635, 636, 7, 75, 2, 2, 636, 637, 7, 68, 2, 2, 637, 638, 7, 71, 2, 2, 638, 6, 3, 2, 2, 2, 639, 640, 7, 85, 2, 2, 640, 641, 7, 74, 2, 2, 641, 642, 7, 81, 2, 2, 642, 643, 7, 89, 2, 2, 643, 8, 3, 2, 2, 2, 644, 645, 7, 72, 2, 2, 645, 646, 7, 84, 2, 2, 646, 647, 7, 81, 2, 2, 647, 648, 7, 79, 2, 2, 648, 10, 3, 2, 2, 2, 649, 650, 7, 89, 2, 2, 650, 651, 7, 74, 2, 2, 651, 652, 7, 71, 2, 2, 652, 653, 7, 84, 2, 2, 653, 654, 7, 71, 2, 2, 654, 12, 3, 2, 2, 2, 655, 656, 7, 72, 2, 2, 656, 657, 7, 75, 2, 2, 657, 658, 7, 71, 2, 2, 658, 659, 7, 78, 2, 2, 659, 660, 7, 70, 2, 2, 660, 661, 7, 85, 2, 2, 661, 14, 3, 2, 2, 2, 662, 663, 7, 84, 2, 2, 663, 664, 7, 71, 2, 2, 664, 665, 7, 80, 2, 2, 665, 666, 7, 67, 2, 2, 666, 667, 7, 79, 2, 2, 667, 668, 7, 71, 2, 2, 668, 16, 3, 2, 2, 2, 669, 670, 7, 85, 2, 2, 670, 671, 7, 86, 2, 2, 671, 672, 7, 67, 2, 2, 672, 673, 7, 86, 2, 2, 673, 674, 7, 85, 2, 2, 674, 18, 3, 2, 2, 2, 675, 676, 7, 70, 2, 2, 676, 677, 7, 71, 2, 2, 677, 678, 7, 70, 2, 2, 678, 679, 7, 87, 2, 2, 679, 680, 7, 82, 2, 2, 680, 20, 3, 2, 2, 2, 681, 682, 7, 85, 2, 2, 682, 683, 7, 81, 2, 2, 683, 684, 7, 84, 2, 2, 684, 685, 7, 86, 2, 2, 685, 22, 3, 2, 2, 2, 686, 687, 7, 71, 2, 2, 687, 688, 7, 88, 2, 2, 688, 689, 7, 67, 2, 2, 689, 690, 7, 78, 2, 2, 690, 24, 3, 2, 2, 2, 691, 692, 7, 74, 2, 2, 692, 693, 7, 71, 2, 2, 693, 694, 7, 67, 2, 2, 694, 695, 7, 70, 2, 2, 695, 26, 3, 2, 2, 2, 696, 697, 7, 86, 2, 2, 697, 698, 7, 81, 2, 2, 698, 699, 7, 82, 2, 2, 699, 28, 3, 2, 2, 2, 700, 701, 7, 84, 2, 2, 701, 702, 7, 67, 2, 2, 702, 703, 7, 84, 2, 2, 703, 704, 7, 71, 2, 2, 704, 30, 3, 2, 2, 2, 705, 706, 7, 82, 2, 2, 706, 707, 7, 67, 2, 2, 707, 708, 7, 84, 2, 2, 708, 709, 7, 85, 2, 2, 709, 710, 7, 71, 2, 2, 710, 32, 3, 2, 2, 2, 711, 712, 7, 79, 2, 2, 712, 713, 7, 71, 2, 2, 713, 714, 7, 86, 2, 2, 714, 715, 7, 74, 2, 2, 715, 716, 7, 81, 2, 2, 716, 717, 7, 70, 2, 2, 717, 34, 3, 2, 2, 2, 718, 719, 7, 84, 2, 2, 719, 720, 7, 71, 2, 2, 720, 721, 7, 73, 2, 2, 721, 722, 7, 71, 2, 2, 722, 723, 7, 90, 2, 2, 723, 36, 3, 2, 2, 2, 724, 725, 7, 82, 2, 2, 725, 726, 7, 87, 2, 2, 726, 727, 7, 80, 2, 2, 727, 728, 7, 69, 2, 2, 728, 729, 7, 86, 2, 2, 729, 38, 3, 2, 2, 2, 730, 731, 7, 73, 2, 2, 731, 732, 7, 84, 2, 2, 732, 733, 7, 81, 2, 2, 733, 734, 7, 77, 2, 2, 734, 40, 3, 2, 2, 2, 735, 736, 7, 82, 2, 2, 736, 737, 7, 67, 2, 2, 737, 738, 7, 86, 2, 2, 738, 739, 7, 86, 2, 2, 739, 740, 7, 71, 2, 2, 740, 741, 7, 84, 2, 2, 741, 742, 7, 80, 2, 2, 742, 42, 3, 2, 2, 2, 743, 744, 7, 82, 2, 2, 744, 745, 7, 67, 2, 2, 745, 746, 7, 86, 2, 2, 746, 747, 7, 86, 2, 2, 747, 748, 7, 71, 2, 2, 748, 749, 7, 84, 2, 2, 749, 750, 7, 80, 2, 2, 750, 751, 7, 85, 2, 2, 751, 44, 3, 2, 2, 2, 752, 753, 7, 80, 2, 2, 753, 754, 7, 71, 2, 2, 754, 755, 7, 89, 2, 2, 755, 756, 7, 97, 2, 2, 756, 757, 7, 72, 2, 2, 757, 758, 7, 75, 2, 2, 758, 759, 7, 71, 2, 2, 759, 760, 7, 78, 2, 2, 760, 761, 7, 70, 2, 2, 761, 46, 3, 2, 2, 2, 762, 763, 7, 77, 2, 2, 763, 764, 7, 79, 2, 2, 764, 765, 7, 71, 2, 2, 765, 766, 7, 67, 2, 2, 766, 767, 7, 80, 2, 2, 767, 768, 7, 85, 2, 2, 768, 48, 3, 2, 2, 2, 769, 770, 7, 67, 2, 2, 770, 771, 7, 70, 2, 2, 771, 50, 3, 2, 2, 2, 772, 773, 7, 79, 2, 2, 773, 774, 7, 78, 2, 2, 774, 52, 3, 2, 2, 2, 775, 776, 7, 67, 2, 2, 776, 777, 7, 85, 2, 2, 777, 54, 3, 2, 2, 2, 778, 779, 7, 68, 2, 2, 779, 780, 7, 91, 2, 2, 780, 56, 3, 2, 2, 2, 781, 782, 7, 85, 2, 2, 782, 783, 7, 81, 2, 2, 783, 784, 7, 87, 2, 2, 784, 785, 7, 84, 2, 2, 785, 786, 7, 69, 2, 2, 786, 787, 7, 71, 2, 2, 787, 58, 3, 2, 2, 2, 788, 789, 7, 75, 2, 2, 789, 790, 7, 80, 2, 2, 790, 791, 7, 70, 2, 2, 791, 792, 7, 71, 2, 2, 792, 793, 7, 90, 2, 2, 793, 60, 3, 2, 2, 2, 794, 795, 7, 70, 2, 2, 795, 62, 3, 2, 2, 2, 796, 797, 7, 70, 2, 2, 797, 798, 7, 71, 2, 2, 798, 799, 7, 85, 2, 2, 799, 800, 7, 69, 2, 2, 800, 64, 3, 2, 2, 2, 801, 802, 7, 69, 2, 2, 802, 803, 7, 67, 2, 2, 803, 804, 7, 86, 2, 2, 804, 805, 7, 67, 2, 2, 805, 806, 7, 78, 2, 2, 806, 807, 7, 81, 2, 2, 807, 808, 7, 73, 2, 2, 808, 809, 7, 85, 2, 2, 809, 66, 3, 2, 2, 2, 810, 811, 7, 85, 2, 2, 811, 812, 7, 81, 2, 2, 812, 813, 7, 84, 2, 2, 813, 814, 7, 86, 2, 2, 814, 815, 7, 68, 2, 2, 815, 816, 7, 91, 2, 2, 816, 68, 3, 2, 2, 2, 817, 818, 7, 67, 2, 2, 818, 819, 7, 87, 2, 2, 819, 820, 7, 86, 2, 2, 820, 821, 7, 81, 2, 2, 821, 70, 3, 2, 2, 2, 822, 823, 7, 85, 2, 2, 823, 824, 7, 86, 2, 2, 824, 825, 7, 84, 2, 2, 825, 72, 3, 2, 2, 2, 826, 827, 7, 75, 2, 2, 827, 828, 7, 82, 2, 2, 828, 74, 3, 2, 2, 2, 829, 830, 7, 80, 2, 2, 830, 831, 7, 87, 2, 2, 831, 832, 7, 79, 2, 2, 832, 76, 3, 2, 2, 2, 833, 834, 7, 77, 2, 2, 834, 835, 7, 71, 2, 2, 835, 836, 7, 71, 2, 2, 836, 837, 7, 82, 2, 2, 837, 838, 7, 71, 2, 2, 838, 839, 7, 79, 2, 2, 839, 840, 7, 82, 2, 2, 840, 841, 7, 86, 2, 2, 841, 842, 7, 91, 2, 2, 842, 78, 3, 2, 2, 2, 843, 844, 7, 69, 2, 2, 844, 845, 7, 81, 2, 2, 845, 846, 7, 80, 2, 2, 846, 847, 7, 85, 2, 2, 847, 848, 7, 71, 2, 2, 848, 849, 7, 69, 2, 2, 849, 850, 7, 87, 2, 2, 850, 851, 7, 86, 2, 2, 851, 852, 7, 75, 2, 2, 852, 853, 7, 88, 2, 2, 853, 854, 7, 71, 2, 2, 854, 80, 3, 2, 2, 2, 855, 856, 7, 70, 2, 2, 856, 857, 7, 71, 2, 2, 857, 858, 7, 70, 2, 2, 858, 859, 7, 87, 2, 2, 859, 860, 7, 82, 2, 2, 860, 861, 7, 97, 2, 2, 861, 862, 7, 85, 2, 2, 862, 863, 7, 82, 2, 2, 863, 864, 7, 78, 2, 2, 864, 865, 7, 75, 2, 2, 865, 866, 7, 86, 2, 2, 866, 867, 7, 88, 2, 2, 867, 868, 7, 67, 2, 2, 868, 869, 7, 78, 2, 2, 869, 870, 7, 87, 2, 2, 870, 871, 7, 71, 2, 2, 871, 872, 7, 85, 2, 2, 872, 82, 3, 2, 2, 2, 873, 874, 7, 82, 2, 2, 874, 875, 7, 67, 2, 2, 875, 876, 7, 84, 2, 2, 876, 877, 7, 86, 2, 2, 877, 878, 7, 75, 2, 2, 878, 879, 7, 86, 2, 2, 879, 880, 7, 75, 2, 2, 880, 881, 7, 81, 2, 2, 881, 882, 7, 80, 2, 2, 882, 883, 7, 85, 2, 2, 883, 84, 3, 2, 2, 2, 884, 885, 7, 67, 2, 2, 885, 886, 7, 78, 2, 2, 886, 887, 7, 78, 2, 2, 887, 888, 7, 80, 2, 2, 888, 889, 7, 87, 2, 2, 889, 890, 7, 79, 2, 2, 890, 86, 3, 2, 2, 2, 891, 892, 7, 70, 2, 2, 892, 893, 7, 71, 2, 2, 893, 894, 7, 78, 2, 2, 894, 895, 7, 75, 2, 2, 895, 896, 7, 79, 2, 2, 896, 88, 3, 2, 2, 2, 897, 898, 7, 69, 2, 2, 898, 899, 7, 71, 2, 2, 899, 900, 7, 80, 2, 2, 900, 901, 7, 86, 2, 2, 901, 902, 7, 84, 2, 2, 902, 903, 7, 81, 2, 2, 903, 904, 7, 75, 2, 2, 904, 905, 7, 70, 2, 2, 905, 906, 7, 85, 2, 2, 906, 90, 3, 2, 2, 2, 907, 908, 7, 75, 2, 2, 908, 909, 7, 86, 2, 2, 909, 910, 7, 71, 2, 2, 910, 911, 7, 84, 2, 2, 911, 912, 7, 67, 2, 2, 912, 913, 7, 86, 2, 2, 913, 914, 7, 75, 2, 2, 914, 915, 7, 81, 2, 2, 915, 916, 7, 80, 2, 2, 916, 917, 7, 85, 2, 2, 917, 92, 3, 2, 2, 2, 918, 919, 7, 70, 2, 2, 919, 920, 7, 75, 2, 2, 920, 921, 7, 85, 2, 2, 921, 922, 7, 86, 2, 2, 922, 923, 7, 67, 2, 2, 923, 924, 7, 80, 2, 2, 924, 925, 7, 69, 2, 2, 925, 926, 7, 71, 2, 2, 926, 927, 7, 97, 2, 2, 927, 928, 7, 86, 2, 2, 928, 929, 7, 91, 2, 2, 929, 930, 7, 82, 2, 2, 930, 931, 7, 71, 2, 2, 931, 94, 3, 2, 2, 2, 932, 933, 7, 80, 2, 2, 933, 934, 7, 87, 2, 2, 934, 935, 7, 79, 2, 2, 935, 936, 7, 68, 2, 2, 936, 937, 7, 71, 2, 2, 937, 938, 7, 84, 2, 2, 938, 939, 7, 97, 2, 2, 939, 940, 7, 81, 2, 2, 940, 941, 7, 72, 2, 2, 941, 942, 7, 97, 2, 2, 942, 943, 7, 86, 2, 2, 943, 944, 7, 84, 2, 2, 944, 945, 7, 71, 2, 2, 945, 946, 7, 71, 2, 2, 946, 947, 7, 85, 2, 2, 947, 96, 3, 2, 2, 2, 948, 949, 7, 85, 2, 2, 949, 950, 7, 74, 2, 2, 950, 951, 7, 75, 2, 2, 951, 952, 7, 80, 2, 2, 952, 953, 7, 73, 2, 2, 953, 954, 7, 78, 2, 2, 954, 955, 7, 71, 2, 2, 955, 956, 7, 97, 2, 2, 956, 957, 7, 85, 2, 2, 957, 958, 7, 75, 2, 2, 958, 959, 7, 92, 2, 2, 959, 960, 7, 71, 2, 2, 960, 98, 3, 2, 2, 2, 961, 962, 7, 85, 2, 2, 962, 963, 7, 67, 2, 2, 963, 964, 7, 79, 2, 2, 964, 965, 7, 82, 2, 2, 965, 966, 7, 78, 2, 2, 966, 967, 7, 71, 2, 2, 967, 968, 7, 97, 2, 2, 968, 969, 7, 85, 2, 2, 969, 970, 7, 75, 2, 2, 970, 971, 7, 92, 2, 2, 971, 972, 7, 71, 2, 2, 972, 100, 3, 2, 2, 2, 973, 974, 7, 81, 2, 2, 974, 975, 7, 87, 2, 2, 975, 976, 7, 86, 2, 2, 976, 977, 7, 82, 2, 2, 977, 978, 7, 87, 2, 2, 978, 979, 7, 86, 2, 2, 979, 980, 7, 97, 2, 2, 980, 981, 7, 67, 2, 2, 981, 982, 7, 72, 2, 2, 982, 983, 7, 86, 2, 2, 983, 984, 7, 71, 2, 2, 984, 985, 7, 84, 2, 2, 985, 102, 3, 2, 2, 2, 986, 987, 7, 86, 2, 2, 987, 988, 7, 75, 2, 2, 988, 989, 7, 79, 2, 2, 989, 990, 7, 71, 2, 2, 990, 991, 7, 97, 2, 2, 991, 992, 7, 70, 2, 2, 992, 993, 7, 71, 2, 2, 993, 994, 7, 69, 2, 2, 994, 995, 7, 67, 2, 2, 995, 996, 7, 91, 2, 2, 996, 104, 3, 2, 2, 2, 997, 998, 7, 67, 2, 2, 998, 999, 7, 80, 2, 2, 999, 1000, 7, 81, 2, 2, 1000, 1001, 7, 79, 2, 2, 1001, 1002, 7, 67, 2, 2, 1002, 1003, 7, 78, 2, 2, 1003, 1004, 7, 91, 2, 2, 1004, 1005, 7, 97, 2, 2, 1005, 1006, 7, 84, 2, 2, 1006, 1007, 7, 67, 2, 2, 1007, 1008, 7, 86, 2, 2, 1008, 1009, 7, 71, 2, 2, 1009, 106, 3, 2, 2, 2, 1010, 1011, 7, 69, 2, 2, 1011, 1012, 7, 67, 2, 2, 1012, 1013, 7, 86, 2, 2, 1013, 1014, 7, 71, 2, 2, 1014, 1015, 7, 73, 2, 2, 1015, 1016, 7, 81, 2, 2, 1016, 1017, 7, 84, 2, 2, 1017, 1018, 7, 91, 2, 2, 1018, 1019, 7, 97, 2, 2, 1019, 1020, 7, 72, 2, 2, 1020, 1021, 7, 75, 2, 2, 1021, 1022, 7, 71, 2, 2, 1022, 1023, 7, 78, 2, 2, 1023, 1024, 7, 70, 2, 2, 1024, 108, 3, 2, 2, 2, 1025, 1026, 7, 86, 2, 2, 1026, 1027, 7, 75, 2, 2, 1027, 1028, 7, 79, 2, 2, 1028, 1029, 7, 71, 2, 2, 1029, 1030, 7, 97, 2, 2, 1030, 1031, 7, 72, 2, 2, 1031, 1032, 7, 75, 2, 2, 1032, 1033, 7, 71, 2, 2, 1033, 1034, 7, 78, 2, 2, 1034, 1035, 7, 70, 2, 2, 1035, 110, 3, 2, 2, 2, 1036, 1037, 7, 86, 2, 2, 1037, 1038, 7, 75, 2, 2, 1038, 1039, 7, 79, 2, 2, 1039, 1040, 7, 71, 2, 2, 1040, 1041, 7, 97, 2, 2, 1041, 1042, 7, 92, 2, 2, 1042, 1043, 7, 81, 2, 2, 1043, 1044, 7, 80, 2, 2, 1044, 1045, 7, 71, 2, 2, 1045, 112, 3, 2, 2, 2, 1046, 1047, 7, 86, 2, 2, 1047, 1048, 7, 84, 2, 2, 1048, 1049, 7, 67, 2, 2, 1049, 1050, 7, 75, 2, 2, 1050, 1051, 7, 80, 2, 2, 1051, 1052, 7, 75, 2, 2, 1052, 1053, 7, 80, 2, 2, 1053, 1054, 7, 73, 2, 2, 1054, 1055, 7, 97, 2, 2, 1055, 1056, 7, 70, 2, 2, 1056, 1057, 7, 67, 2, 2, 1057, 1058, 7, 86, 2, 2, 1058, 1059, 7, 67, 2, 2, 1059, 1060, 7, 97, 2, 2, 1060, 1061, 7, 85, 2, 2, 1061, 1062, 7, 75, 2, 2, 1062, 1063, 7, 92, 2, 2, 1063, 1064, 7, 71, 2, 2, 1064, 114, 3, 2, 2, 2, 1065, 1066, 7, 67, 2, 2, 1066, 1067, 7, 80, 2, 2, 1067, 1068, 7, 81, 2, 2, 1068, 1069, 7, 79, 2, 2, 1069, 1070, 7, 67, 2, 2, 1070, 1071, 7, 78, 2, 2, 1071, 1072, 7, 91, 2, 2, 1072, 1073, 7, 97, 2, 2, 1073, 1074, 7, 85, 2, 2, 1074, 1075, 7, 69, 2, 2, 1075, 1076, 7, 81, 2, 2, 1076, 1077, 7, 84, 2, 2, 1077, 1078, 7, 71, 2, 2, 1078, 1079, 7, 97, 2, 2, 1079, 1080, 7, 86, 2, 2, 1080, 1081, 7, 74, 2, 2, 1081, 1082, 7, 84, 2, 2, 1082, 1083, 7, 71, 2, 2, 1083, 1084, 7, 85, 2, 2, 1084, 1085, 7, 74, 2, 2, 1085, 1086, 7, 81, 2, 2, 1086, 1087, 7, 78, 2, 2, 1087, 1088, 7, 70, 2, 2, 1088, 116, 3, 2, 2, 2, 1089, 1090, 7, 69, 2, 2, 1090, 1091, 7, 67, 2, 2, 1091, 1092, 7, 85, 2, 2, 1092, 1093, 7, 71, 2, 2, 1093, 118, 3, 2, 2, 2, 1094, 1095, 7, 75, 2, 2, 1095, 1096, 7, 80, 2, 2, 1096, 120, 3, 2, 2, 2, 1097, 1098, 7, 80, 2, 2, 1098, 1099, 7, 81, 2, 2, 1099, 1100, 7, 86, 2, 2, 1100, 122, 3, 2, 2, 2, 1101, 1102, 7, 81, 2, 2, 1102, 1103, 7, 84, 2, 2, 1103, 124, 3, 2, 2, 2, 1104, 1105, 7, 67, 2, 2, 1105, 1106, 7, 80, 2, 2, 1106, 1107, 7, 70, 2, 2, 1107, 126, 3, 2, 2, 2, 1108, 1109, 7, 90, 2, 2, 1109, 1110, 7, 81, 2, 2, 1110, 1111, 7, 84, 2, 2, 1111, 128, 3, 2, 2, 2, 1112, 1113, 7, 86, 2, 2, 1113, 1114, 7, 84, 2, 2, 1114, 1115, 7, 87, 2, 2, 1115, 1116, 7, 71, 2, 2, 1116, 130, 3, 2, 2, 2, 1117, 1118, 7, 72, 2, 2, 1118, 1119, 7, 67, 2, 2, 1119, 1120, 7, 78, 2, 2, 1120, 1121, 7, 85, 2, 2, 1121, 1122, 7, 71, 2, 2, 1122, 132, 3, 2, 2, 2, 1123, 1124, 7, 84, 2, 2, 1124, 1125, 7, 71, 2, 2, 1125, 1126, 7, 73, 2, 2, 1126, 1127, 7, 71, 2, 2, 1127, 1128, 7, 90, 2, 2, 1128, 1129, 7, 82, 2, 2, 1129, 134, 3, 2, 2, 2, 1130, 1131, 7, 70, 2, 2, 1131, 1132, 7, 67, 2, 2, 1132, 1133, 7, 86, 2, 2, 1133, 1134, 7, 71, 2, 2, 1134, 1135, 7, 86, 2, 2, 1135, 1136, 7, 75, 2, 2, 1136, 1137, 7, 79, 2, 2, 1137, 1138, 7, 71, 2, 2, 1138, 136, 3, 2, 2, 2, 1139, 1140, 7, 75, 2, 2, 1140, 1141, 7, 80, 2, 2, 1141, 1142, 7, 86, 2, 2, 1142, 1143, 7, 71, 2, 2, 1143, 1144, 7, 84, 2, 2, 1144, 1145, 7, 88, 2, 2, 1145, 1146, 7, 67, 2, 2, 1146, 1147, 7, 78, 2, 2, 1147, 138, 3, 2, 2, 2, 1148, 1149, 7, 79, 2, 2, 1149, 1150, 7, 75, 2, 2, 1150, 1151, 7, 69, 2, 2, 1151, 1152, 7, 84, 2, 2, 1152, 1153, 7, 81, 2, 2, 1153, 1154, 7, 85, 2, 2, 1154, 1155, 7, 71, 2, 2, 1155, 1156, 7, 69, 2, 2, 1156, 1157, 7, 81, 2, 2, 1157, 1158, 7, 80, 2, 2, 1158, 1159, 7, 70, 2, 2, 1159, 140, 3, 2, 2, 2, 1160, 1161, 7, 79, 2, 2, 1161, 1162, 7, 75, 2, 2, 1162, 1163, 7, 78, 2, 2, 1163, 1164, 7, 78, 2, 2, 1164, 1165, 7, 75, 2, 2, 1165, 1166, 7, 85, 2, 2, 1166, 1167, 7, 71, 2, 2, 1167, 1168, 7, 69, 2, 2, 1168, 1169, 7, 81, 2, 2, 1169, 1170, 7, 80, 2, 2, 1170, 1171, 7, 70, 2, 2, 1171, 142, 3, 2, 2, 2, 1172, 1173, 7, 85, 2, 2, 1173, 1174, 7, 71, 2, 2, 1174, 1175, 7, 69, 2, 2, 1175, 1176, 7, 81, 2, 2, 1176, 1177, 7, 80, 2, 2, 1177, 1178, 7, 70, 2, 2, 1178, 144, 3, 2, 2, 2, 1179, 1180, 7, 79, 2, 2, 1180, 1181, 7, 75, 2, 2, 1181, 1182, 7, 80, 2, 2, 1182, 1183, 7, 87, 2, 2, 1183, 1184, 7, 86, 2, 2, 1184, 1185, 7, 71, 2, 2, 1185, 146, 3, 2, 2, 2, 1186, 1187, 7, 74, 2, 2, 1187, 1188, 7, 81, 2, 2, 1188, 1189, 7, 87, 2, 2, 1189, 1190, 7, 84, 2, 2, 1190, 148, 3, 2, 2, 2, 1191, 1192, 7, 70, 2, 2, 1192, 1193, 7, 67, 2, 2, 1193, 1194, 7, 91, 2, 2, 1194, 150, 3, 2, 2, 2, 1195, 1196, 7, 89, 2, 2, 1196, 1197, 7, 71, 2, 2, 1197, 1198, 7, 71, 2, 2, 1198, 1199, 7, 77, 2, 2, 1199, 152, 3, 2, 2, 2, 1200, 1201, 7, 79, 2, 2, 1201, 1202, 7, 81, 2, 2, 1202, 1203, 7, 80, 2, 2, 1203, 1204, 7, 86, 2, 2, 1204, 1205, 7, 74, 2, 2, 1205, 154, 3, 2, 2, 2, 1206, 1207, 7, 83, 2, 2, 1207, 1208, 7, 87, 2, 2, 1208, 1209, 7, 67, 2, 2, 1209, 1210, 7, 84, 2, 2, 1210, 1211, 7, 86, 2, 2, 1211, 1212, 7, 71, 2, 2, 1212, 1213, 7, 84, 2, 2, 1213, 156, 3, 2, 2, 2, 1214, 1215, 7, 91, 2, 2, 1215, 1216, 7, 71, 2, 2, 1216, 1217, 7, 67, 2, 2, 1217, 1218, 7, 84, 2, 2, 1218, 158, 3, 2, 2, 2, 1219, 1220, 7, 85, 2, 2, 1220, 1221, 7, 71, 2, 2, 1221, 1222, 7, 69, 2, 2, 1222, 1223, 7, 81, 2, 2, 1223, 1224, 7, 80, 2, 2, 1224, 1225, 7, 70, 2, 2, 1225, 1226, 7, 97, 2, 2, 1226, 1227, 7, 79, 2, 2, 1227, 1228, 7, 75, 2, 2, 1228, 1229, 7, 69, 2, 2, 1229, 1230, 7, 84, 2, 2, 1230, 1231, 7, 81, 2, 2, 1231, 1232, 7, 85, 2, 2, 1232, 1233, 7, 71, 2, 2, 1233, 1234, 7, 69, 2, 2, 1234, 1235, 7, 81, 2, 2, 1235, 1236, 7, 80, 2, 2, 1236, 1237, 7, 70, 2, 2, 1237, 160, 3, 2, 2, 2, 1238, 1239, 7, 79, 2, 2, 1239, 1240, 7, 75, 2, 2, 1240, 1241, 7, 80, 2, 2, 1241, 1242, 7, 87, 2, 2, 1242, 1243, 7, 86, 2, 2, 1243, 1244, 7, 71, 2, 2, 1244, 1245, 7, 97, 2, 2, 1245, 1246, 7, 79, 2, 2, 1246, 1247, 7, 75, 2, 2, 1247, 1248, 7, 69, 2, 2, 1248, 1249, 7, 84, 2, 2, 1249, 1250, 7, 81, 2, 2, 1250, 1251, 7, 85, 2, 2, 1251, 1252, 7, 71, 2, 2, 1252, 1253, 7, 69, 2, 2, 1253, 1254, 7, 81, 2, 2, 1254, 1255, 7, 80, 2, 2, 1255, 1256, 7, 70, 2, 2, 1256, 162, 3, 2, 2, 2, 1257, 1258, 7, 79, 2, 2, 1258, 1259, 7, 75, 2, 2, 1259, 1260, 7, 80, 2, 2, 1260, 1261, 7, 87, 2, 2, 1261, 1262, 7, 86, 2, 2, 1262, 1263, 7, 71, 2, 2, 1263, 1264, 7, 97, 2, 2, 1264, 1265, 7, 85, 2, 2, 1265, 1266, 7, 71, 2, 2, 1266, 1267, 7, 69, 2, 2, 1267, 1268, 7, 81, 2, 2, 1268, 1269, 7, 80, 2, 2, 1269, 1270, 7, 70, 2, 2, 1270, 164, 3, 2, 2, 2, 1271, 1272, 7, 74, 2, 2, 1272, 1273, 7, 81, 2, 2, 1273, 1274, 7, 87, 2, 2, 1274, 1275, 7, 84, 2, 2, 1275, 1276, 7, 97, 2, 2, 1276, 1277, 7, 79, 2, 2, 1277, 1278, 7, 75, 2, 2, 1278, 1279, 7, 69, 2, 2, 1279, 1280, 7, 84, 2, 2, 1280, 1281, 7, 81, 2, 2, 1281, 1282, 7, 85, 2, 2, 1282, 1283, 7, 71, 2, 2, 1283, 1284, 7, 69, 2, 2, 1284, 1285, 7, 81, 2, 2, 1285, 1286, 7, 80, 2, 2, 1286, 1287, 7, 70, 2, 2, 1287, 166, 3, 2, 2, 2, 1288, 1289, 7, 74, 2, 2, 1289, 1290, 7, 81, 2, 2, 1290, 1291, 7, 87, 2, 2, 1291, 1292, 7, 84, 2, 2, 1292, 1293, 7, 97, 2, 2, 1293, 1294, 7, 85, 2, 2, 1294, 1295, 7, 71, 2, 2, 1295, 1296, 7, 69, 2, 2, 1296, 1297, 7, 81, 2, 2, 1297, 1298, 7, 80, 2, 2, 1298, 1299, 7, 70, 2, 2, 1299, 168, 3, 2, 2, 2, 1300, 1301, 7, 74, 2, 2, 1301, 1302, 7, 81, 2, 2, 1302, 1303, 7, 87, 2, 2, 1303, 1304, 7, 84, 2, 2, 1304, 1305, 7, 97, 2, 2, 1305, 1306, 7, 79, 2, 2, 1306, 1307, 7, 75, 2, 2, 1307, 1308, 7, 80, 2, 2, 1308, 1309, 7, 87, 2, 2, 1309, 1310, 7, 86, 2, 2, 1310, 1311, 7, 71, 2, 2, 1311, 170, 3, 2, 2, 2, 1312, 1313, 7, 70, 2, 2, 1313, 1314, 7, 67, 2, 2, 1314, 1315, 7, 91, 2, 2, 1315, 1316, 7, 97, 2, 2, 1316, 1317, 7, 79, 2, 2, 1317, 1318, 7, 75, 2, 2, 1318, 1319, 7, 69, 2, 2, 1319, 1320, 7, 84, 2, 2, 1320, 1321, 7, 81, 2, 2, 1321, 1322, 7, 85, 2, 2, 1322, 1323, 7, 71, 2, 2, 1323, 1324, 7, 69, 2, 2, 1324, 1325, 7, 81, 2, 2, 1325, 1326, 7, 80, 2, 2, 1326, 1327, 7, 70, 2, 2, 1327, 172, 3, 2, 2, 2, 1328, 1329, 7, 70, 2, 2, 1329, 1330, 7, 67, 2, 2, 1330, 1331, 7, 91, 2, 2, 1331, 1332, 7, 97, 2, 2, 1332, 1333, 7, 85, 2, 2, 1333, 1334, 7, 71, 2, 2, 1334, 1335, 7, 69, 2, 2, 1335, 1336, 7, 81, 2, 2, 1336, 1337, 7, 80, 2, 2, 1337, 1338, 7, 70, 2, 2, 1338, 174, 3, 2, 2, 2, 1339, 1340, 7, 70, 2, 2, 1340, 1341, 7, 67, 2, 2, 1341, 1342, 7, 91, 2, 2, 1342, 1343, 7, 97, 2, 2, 1343, 1344, 7, 79, 2, 2, 1344, 1345, 7, 75, 2, 2, 1345, 1346, 7, 80, 2, 2, 1346, 1347, 7, 87, 2, 2, 1347, 1348, 7, 86, 2, 2, 1348, 1349, 7, 71, 2, 2, 1349, 176, 3, 2, 2, 2, 1350, 1351, 7, 70, 2, 2, 1351, 1352, 7, 67, 2, 2, 1352, 1353, 7, 91, 2, 2, 1353, 1354, 7, 97, 2, 2, 1354, 1355, 7, 74, 2, 2, 1355, 1356, 7, 81, 2, 2, 1356, 1357, 7, 87, 2, 2, 1357, 1358, 7, 84, 2, 2, 1358, 178, 3, 2, 2, 2, 1359, 1360, 7, 91, 2, 2, 1360, 1361, 7, 71, 2, 2, 1361, 1362, 7, 67, 2, 2, 1362, 1363, 7, 84, 2, 2, 1363, 1364, 7, 97, 2, 2, 1364, 1365, 7, 79, 2, 2, 1365, 1366, 7, 81, 2, 2, 1366, 1367, 7, 80, 2, 2, 1367, 1368, 7, 86, 2, 2, 1368, 1369, 7, 74, 2, 2, 1369, 180, 3, 2, 2, 2, 1370, 1371, 7, 69, 2, 2, 1371, 1372, 7, 81, 2, 2, 1372, 1373, 7, 80, 2, 2, 1373, 1374, 7, 88, 2, 2, 1374, 1375, 7, 71, 2, 2, 1375, 1376, 7, 84, 2, 2, 1376, 1377, 7, 86, 2, 2, 1377, 1378, 7, 97, 2, 2, 1378, 1379, 7, 86, 2, 2, 1379, 1380, 7, 92, 2, 2, 1380, 182, 3, 2, 2, 2, 1381, 1382, 7, 70, 2, 2, 1382, 1383, 7, 67, 2, 2, 1383, 1384, 7, 86, 2, 2, 1384, 1385, 7, 67, 2, 2, 1385, 1386, 7, 79, 2, 2, 1386, 1387, 7, 81, 2, 2, 1387, 1388, 7, 70, 2, 2, 1388, 1389, 7, 71, 2, 2, 1389, 1390, 7, 78, 2, 2, 1390, 184, 3, 2, 2, 2, 1391, 1392, 7, 78, 2, 2, 1392, 1393, 7, 81, 2, 2, 1393, 1394, 7, 81, 2, 2, 1394, 1395, 7, 77, 2, 2, 1395, 1396, 7, 87, 2, 2, 1396, 1397, 7, 82, 2, 2, 1397, 186, 3, 2, 2, 2, 1398, 1399, 7, 85, 2, 2, 1399, 1400, 7, 67, 2, 2, 1400, 1401, 7, 88, 2, 2, 1401, 1402, 7, 71, 2, 2, 1402, 1403, 7, 70, 2, 2, 1403, 1404, 7, 85, 2, 2, 1404, 1405, 7, 71, 2, 2, 1405, 1406, 7, 67, 2, 2, 1406, 1407, 7, 84, 2, 2, 1407, 1408, 7, 69, 2, 2, 1408, 1409, 7, 74, 2, 2, 1409, 188, 3, 2, 2, 2, 1410, 1411, 7, 75, 2, 2, 1411, 1412, 7, 80, 2, 2, 1412, 1413, 7, 86, 2, 2, 1413, 190, 3, 2, 2, 2, 1414, 1415, 7, 75, 2, 2, 1415, 1416, 7, 80, 2, 2, 1416, 1417, 7, 86, 2, 2, 1417, 1418, 7, 71, 2, 2, 1418, 1419, 7, 73, 2, 2, 1419, 1420, 7, 71, 2, 2, 1420, 1421, 7, 84, 2, 2, 1421, 192, 3, 2, 2, 2, 1422, 1423, 7, 70, 2, 2, 1423, 1424, 7, 81, 2, 2, 1424, 1425, 7, 87, 2, 2, 1425, 1426, 7, 68, 2, 2, 1426, 1427, 7, 78, 2, 2, 1427, 1428, 7, 71, 2, 2, 1428, 194, 3, 2, 2, 2, 1429, 1430, 7, 78, 2, 2, 1430, 1431, 7, 81, 2, 2, 1431, 1432, 7, 80, 2, 2, 1432, 1433, 7, 73, 2, 2, 1433, 196, 3, 2, 2, 2, 1434, 1435, 7, 72, 2, 2, 1435, 1436, 7, 78, 2, 2, 1436, 1437, 7, 81, 2, 2, 1437, 1438, 7, 67, 2, 2, 1438, 1439, 7, 86, 2, 2, 1439, 198, 3, 2, 2, 2, 1440, 1441, 7, 85, 2, 2, 1441, 1442, 7, 86, 2, 2, 1442, 1443, 7, 84, 2, 2, 1443, 1444, 7, 75, 2, 2, 1444, 1445, 7, 80, 2, 2, 1445, 1446, 7, 73, 2, 2, 1446, 200, 3, 2, 2, 2, 1447, 1448, 7, 68, 2, 2, 1448, 1449, 7, 81, 2, 2, 1449, 1450, 7, 81, 2, 2, 1450, 1451, 7, 78, 2, 2, 1451, 1452, 7, 71, 2, 2, 1452, 1453, 7, 67, 2, 2, 1453, 1454, 7, 80, 2, 2, 1454, 202, 3, 2, 2, 2, 1455, 1456, 7, 126, 2, 2, 1456, 204, 3, 2, 2, 2, 1457, 1458, 7, 46, 2, 2, 1458, 206, 3, 2, 2, 2, 1459, 1460, 7, 48, 2, 2, 1460, 208, 3, 2, 2, 2, 1461, 1462, 7, 63, 2, 2, 1462, 210, 3, 2, 2, 2, 1463, 1464, 7, 64, 2, 2, 1464, 212, 3, 2, 2, 2, 1465, 1466, 7, 62, 2, 2, 1466, 214, 3, 2, 2, 2, 1467, 1468, 7, 62, 2, 2, 1468, 1469, 7, 63, 2, 2, 1469, 216, 3, 2, 2, 2, 1470, 1471, 7, 64, 2, 2, 1471, 1472, 7, 63, 2, 2, 1472, 218, 3, 2, 2, 2, 1473, 1474, 7, 35, 2, 2, 1474, 1475, 7, 63, 2, 2, 1475, 220, 3, 2, 2, 2, 1476, 1477, 7, 45, 2, 2, 1477, 222, 3, 2, 2, 2, 1478, 1479, 7, 47, 2, 2, 1479, 224, 3, 2, 2, 2, 1480, 1481, 7, 44, 2, 2, 1481, 226, 3, 2, 2, 2, 1482, 1483, 7, 49, 2, 2, 1483, 228, 3, 2, 2, 2, 1484, 1485, 7, 39, 2, 2, 1485, 230, 3, 2, 2, 2, 1486, 1487, 7, 35, 2, 2, 1487, 232, 3, 2, 2, 2, 1488, 1489, 7, 60, 2, 2, 1489, 234, 3, 2, 2, 2, 1490, 1491, 7, 42, 2, 2, 1491, 236, 3, 2, 2, 2, 1492, 1493, 7, 43, 2, 2, 1493, 238, 3, 2, 2, 2, 1494, 1495, 7, 93, 2, 2, 1495, 240, 3, 2, 2, 2, 1496, 1497, 7, 95, 2, 2, 1497, 242, 3, 2, 2, 2, 1498, 1499, 7, 41, 2, 2, 1499, 244, 3, 2, 2, 2, 1500, 1501, 7, 36, 2, 2, 1501, 246, 3, 2, 2, 2, 1502, 1503, 7, 98, 2, 2, 1503, 248, 3, 2, 2, 2, 1504, 1505, 7, 128, 2, 2, 1505, 250, 3, 2, 2, 2, 1506, 1507, 7, 40, 2, 2, 1507, 252, 3, 2, 2, 2, 1508, 1509, 7, 96, 2, 2, 1509, 254, 3, 2, 2, 2, 1510, 1511, 7, 67, 2, 2, 1511, 1512, 7, 88, 2, 2, 1512, 1513, 7, 73, 2, 2, 1513, 256, 3, 2, 2, 2, 1514, 1515, 7, 69, 2, 2, 1515, 1516, 7, 81, 2, 2, 1516, 1517, 7, 87, 2, 2, 1517, 1518, 7, 80, 2, 2, 1518, 1519, 7, 86, 2, 2, 1519, 258, 3, 2, 2, 2, 1520, 1521, 7, 70, 2, 2, 1521, 1522, 7, 75, 2, 2, 1522, 1523, 7, 85, 2, 2, 1523, 1524, 7, 86, 2, 2, 1524, 1525, 7, 75, 2, 2, 1525, 1526, 7, 80, 2, 2, 1526, 1527, 7, 69, 2, 2, 1527, 1528, 7, 86, 2, 2, 1528, 1529, 7, 97, 2, 2, 1529, 1530, 7, 69, 2, 2, 1530, 1531, 7, 81, 2, 2, 1531, 1532, 7, 87, 2, 2, 1532, 1533, 7, 80, 2, 2, 1533, 1534, 7, 86, 2, 2, 1534, 260, 3, 2, 2, 2, 1535, 1536, 7, 71, 2, 2, 1536, 1537, 7, 85, 2, 2, 1537, 1538, 7, 86, 2, 2, 1538, 1539, 7, 70, 2, 2, 1539, 1540, 7, 69, 2, 2, 1540, 262, 3, 2, 2, 2, 1541, 1542, 7, 71, 2, 2, 1542, 1543, 7, 85, 2, 2, 1543, 1544, 7, 86, 2, 2, 1544, 1545, 7, 70, 2, 2, 1545, 1546, 7, 69, 2, 2, 1546, 1547, 7, 97, 2, 2, 1547, 1548, 7, 71, 2, 2, 1548, 1549, 7, 84, 2, 2, 1549, 1550, 7, 84, 2, 2, 1550, 1551, 7, 81, 2, 2, 1551, 1552, 7, 84, 2, 2, 1552, 264, 3, 2, 2, 2, 1553, 1554, 7, 79, 2, 2, 1554, 1555, 7, 67, 2, 2, 1555, 1556, 7, 90, 2, 2, 1556, 266, 3, 2, 2, 2, 1557, 1558, 7, 79, 2, 2, 1558, 1559, 7, 71, 2, 2, 1559, 1560, 7, 67, 2, 2, 1560, 1561, 7, 80, 2, 2, 1561, 268, 3, 2, 2, 2, 1562, 1563, 7, 79, 2, 2, 1563, 1564, 7, 71, 2, 2, 1564, 1565, 7, 70, 2, 2, 1565, 1566, 7, 75, 2, 2, 1566, 1567, 7, 67, 2, 2, 1567, 1568, 7, 80, 2, 2, 1568, 270, 3, 2, 2, 2, 1569, 1570, 7, 79, 2, 2, 1570, 1571, 7, 75, 2, 2, 1571, 1572, 7, 80, 2, 2, 1572, 272, 3, 2, 2, 2, 1573, 1574, 7, 79, 2, 2, 1574, 1575, 7, 81, 2, 2, 1575, 1576, 7, 70, 2, 2, 1576, 1577, 7, 71, 2, 2, 1577, 274, 3, 2, 2, 2, 1578, 1579, 7, 84, 2, 2, 1579, 1580, 7, 67, 2, 2, 1580, 1581, 7, 80, 2, 2, 1581, 1582, 7, 73, 2, 2, 1582, 1583, 7, 71, 2, 2, 1583, 276, 3, 2, 2, 2, 1584, 1585, 7, 85, 2, 2, 1585, 1586, 7, 86, 2, 2, 1586, 1587, 7, 70, 2, 2, 1587, 1588, 7, 71, 2, 2, 1588, 1589, 7, 88, 2, 2, 1589, 278, 3, 2, 2, 2, 1590, 1591, 7, 85, 2, 2, 1591, 1592, 7, 86, 2, 2, 1592, 1593, 7, 70, 2, 2, 1593, 1594, 7, 71, 2, 2, 1594, 1595, 7, 88, 2, 2, 1595, 1596, 7, 82, 2, 2, 1596, 280, 3, 2, 2, 2, 1597, 1598, 7, 85, 2, 2, 1598, 1599, 7, 87, 2, 2, 1599, 1600, 7, 79, 2, 2, 1600, 282, 3, 2, 2, 2, 1601, 1602, 7, 85, 2, 2, 1602, 1603, 7, 87, 2, 2, 1603, 1604, 7, 79, 2, 2, 1604, 1605, 7, 85, 2, 2, 1605, 1606, 7, 83, 2, 2, 1606, 284, 3, 2, 2, 2, 1607, 1608, 7, 88, 2, 2, 1608, 1609, 7, 67, 2, 2, 1609, 1610, 7, 84, 2, 2, 1610, 1611, 7, 97, 2, 2, 1611, 1612, 7, 85, 2, 2, 1612, 1613, 7, 67, 2, 2, 1613, 1614, 7, 79, 2, 2, 1614, 1615, 7, 82, 2, 2, 1615, 286, 3, 2, 2, 2, 1616, 1617, 7, 88, 2, 2, 1617, 1618, 7, 67, 2, 2, 1618, 1619, 7, 84, 2, 2, 1619, 1620, 7, 97, 2, 2, 1620, 1621, 7, 82, 2, 2, 1621, 1622, 7, 81, 2, 2, 1622, 1623, 7, 82, 2, 2, 1623, 288, 3, 2, 2, 2, 1624, 1625, 7, 85, 2, 2, 1625, 1626, 7, 86, 2, 2, 1626, 1627, 7, 70, 2, 2, 1627, 1628, 7, 70, 2, 2, 1628, 1629, 7, 71, 2, 2, 1629, 1630, 7, 88, 2, 2, 1630, 1631, 7, 97, 2, 2, 1631, 1632, 7, 85, 2, 2, 1632, 1633, 7, 67, 2, 2, 1633, 1634, 7, 79, 2, 2, 1634, 1635, 7, 82, 2, 2, 1635, 290, 3, 2, 2, 2, 1636, 1637, 7, 85, 2, 2, 1637, 1638, 7, 86, 2, 2, 1638, 1639, 7, 70, 2, 2, 1639, 1640, 7, 70, 2, 2, 1640, 1641, 7, 71, 2, 2, 1641, 1642, 7, 88, 2, 2, 1642, 1643, 7, 97, 2, 2, 1643, 1644, 7, 82, 2, 2, 1644, 1645, 7, 81, 2, 2, 1645, 1646, 7, 82, 2, 2, 1646, 292, 3, 2, 2, 2, 1647, 1648, 7, 82, 2, 2, 1648, 1649, 7, 71, 2, 2, 1649, 1650, 7, 84, 2, 2, 1650, 1651, 7, 69, 2, 2, 1651, 1652, 7, 71, 2, 2, 1652, 1653, 7, 80, 2, 2, 1653, 1654, 7, 86, 2, 2, 1654, 1655, 7, 75, 2, 2, 1655, 1656, 7, 78, 2, 2, 1656, 1657, 7, 71, 2, 2, 1657, 294, 3, 2, 2, 2, 1658, 1659, 7, 86, 2, 2, 1659, 1660, 7, 67, 2, 2, 1660, 1661, 7, 77, 2, 2, 1661, 1662, 7, 71, 2, 2, 1662, 296, 3, 2, 2, 2, 1663, 1664, 7, 72, 2, 2, 1664, 1665, 7, 75, 2, 2, 1665, 1666, 7, 84, 2, 2, 1666, 1667, 7, 85, 2, 2, 1667, 1668, 7, 86, 2, 2, 1668, 298, 3, 2, 2, 2, 1669, 1670, 7, 78, 2, 2, 1670, 1671, 7, 67, 2, 2, 1671, 1672, 7, 85, 2, 2, 1672, 1673, 7, 86, 2, 2, 1673, 300, 3, 2, 2, 2, 1674, 1675, 7, 78, 2, 2, 1675, 1676, 7, 75, 2, 2, 1676, 1677, 7, 85, 2, 2, 1677, 1678, 7, 86, 2, 2, 1678, 302, 3, 2, 2, 2, 1679, 1680, 7, 88, 2, 2, 1680, 1681, 7, 67, 2, 2, 1681, 1682, 7, 78, 2, 2, 1682, 1683, 7, 87, 2, 2, 1683, 1684, 7, 71, 2, 2, 1684, 1685, 7, 85, 2, 2, 1685, 304, 3, 2, 2, 2, 1686, 1687, 7, 71, 2, 2, 1687, 1688, 7, 67, 2, 2, 1688, 1689, 7, 84, 2, 2, 1689, 1690, 7, 78, 2, 2, 1690, 1691, 7, 75, 2, 2, 1691, 1692, 7, 71, 2, 2, 1692, 1693, 7, 85, 2, 2, 1693, 1694, 7, 86, 2, 2, 1694, 306, 3, 2, 2, 2, 1695, 1696, 7, 71, 2, 2, 1696, 1697, 7, 67, 2, 2, 1697, 1698, 7, 84, 2, 2, 1698, 1699, 7, 78, 2, 2, 1699, 1700, 7, 75, 2, 2, 1700, 1701, 7, 71, 2, 2, 1701, 1702, 7, 85, 2, 2, 1702, 1703, 7, 86, 2, 2, 1703, 1704, 7, 97, 2, 2, 1704, 1705, 7, 86, 2, 2, 1705, 1706, 7, 75, 2, 2, 1706, 1707, 7, 79, 2, 2, 1707, 1708, 7, 71, 2, 2, 1708, 308, 3, 2, 2, 2, 1709, 1710, 7, 78, 2, 2, 1710, 1711, 7, 67, 2, 2, 1711, 1712, 7, 86, 2, 2, 1712, 1713, 7, 71, 2, 2, 1713, 1714, 7, 85, 2, 2, 1714, 1715, 7, 86, 2, 2, 1715, 310, 3, 2, 2, 2, 1716, 1717, 7, 78, 2, 2, 1717, 1718, 7, 67, 2, 2, 1718, 1719, 7, 86, 2, 2, 1719, 1720, 7, 71, 2, 2, 1720, 1721, 7, 85, 2, 2, 1721, 1722, 7, 86, 2, 2, 1722, 1723, 7, 97, 2, 2, 1723, 1724, 7, 86, 2, 2, 1724, 1725, 7, 75, 2, 2, 1725, 1726, 7, 79, 2, 2, 1726, 1727, 7, 71, 2, 2, 1727, 312, 3, 2, 2, 2, 1728, 1729, 7, 82, 2, 2, 1729, 1730, 7, 71, 2, 2, 1730, 1731, 7, 84, 2, 2, 1731, 1732, 7, 97, 2, 2, 1732, 1733, 7, 70, 2, 2, 1733, 1734, 7, 67, 2, 2, 1734, 1735, 7, 91, 2, 2, 1735, 314, 3, 2, 2, 2, 1736, 1737, 7, 82, 2, 2, 1737, 1738, 7, 71, 2, 2, 1738, 1739, 7, 84, 2, 2, 1739, 1740, 7, 97, 2, 2, 1740, 1741, 7, 74, 2, 2, 1741, 1742, 7, 81, 2, 2, 1742, 1743, 7, 87, 2, 2, 1743, 1744, 7, 84, 2, 2, 1744, 316, 3, 2, 2, 2, 1745, 1746, 7, 82, 2, 2, 1746, 1747, 7, 71, 2, 2, 1747, 1748, 7, 84, 2, 2, 1748, 1749, 7, 97, 2, 2, 1749, 1750, 7, 79, 2, 2, 1750, 1751, 7, 75, 2, 2, 1751, 1752, 7, 80, 2, 2, 1752, 1753, 7, 87, 2, 2, 1753, 1754, 7, 86, 2, 2, 1754, 1755, 7, 71, 2, 2, 1755, 318, 3, 2, 2, 2, 1756, 1757, 7, 82, 2, 2, 1757, 1758, 7, 71, 2, 2, 1758, 1759, 7, 84, 2, 2, 1759, 1760, 7, 97, 2, 2, 1760, 1761, 7, 85, 2, 2, 1761, 1762, 7, 71, 2, 2, 1762, 1763, 7, 69, 2, 2, 1763, 1764, 7, 81, 2, 2, 1764, 1765, 7, 80, 2, 2, 1765, 1766, 7, 70, 2, 2, 1766, 320, 3, 2, 2, 2, 1767, 1768, 7, 84, 2, 2, 1768, 1769, 7, 67, 2, 2, 1769, 1770, 7, 86, 2, 2, 1770, 1771, 7, 71, 2, 2, 1771, 322, 3, 2, 2, 2, 1772, 1773, 7, 85, 2, 2, 1773, 1774, 7, 82, 2, 2, 1774, 1775, 7, 67, 2, 2, 1775, 1776, 7, 84, 2, 2, 1776, 1777, 7, 77, 2, 2, 1777, 1778, 7, 78, 2, 2, 1778, 1779, 7, 75, 2, 2, 1779, 1780, 7, 80, 2, 2, 1780, 1781, 7, 71, 2, 2, 1781, 324, 3, 2, 2, 2, 1782, 1783, 7, 69, 2, 2, 1783, 326, 3, 2, 2, 2, 1784, 1785, 7, 70, 2, 2, 1785, 1786, 7, 69, 2, 2, 1786, 328, 3, 2, 2, 2, 1787, 1788, 7, 67, 2, 2, 1788, 1789, 7, 68, 2, 2, 1789, 1790, 7, 85, 2, 2, 1790, 330, 3, 2, 2, 2, 1791, 1792, 7, 69, 2, 2, 1792, 1793, 7, 71, 2, 2, 1793, 1794, 7, 75, 2, 2, 1794, 1795, 7, 78, 2, 2, 1795, 332, 3, 2, 2, 2, 1796, 1797, 7, 69, 2, 2, 1797, 1798, 7, 71, 2, 2, 1798, 1799, 7, 75, 2, 2, 1799, 1800, 7, 78, 2, 2, 1800, 1801, 7, 75, 2, 2, 1801, 1802, 7, 80, 2, 2, 1802, 1803, 7, 73, 2, 2, 1803, 334, 3, 2, 2, 2, 1804, 1805, 7, 69, 2, 2, 1805, 1806, 7, 81, 2, 2, 1806, 1807, 7, 80, 2, 2, 1807, 1808, 7, 88, 2, 2, 1808, 336, 3, 2, 2, 2, 1809, 1810, 7, 69, 2, 2, 1810, 1811, 7, 84, 2, 2, 1811, 1812, 7, 69, 2, 2, 1812, 1813, 7, 53, 2, 2, 1813, 1814, 7, 52, 2, 2, 1814, 338, 3, 2, 2, 2, 1815, 1816, 7, 71, 2, 2, 1816, 340, 3, 2, 2, 2, 1817, 1818, 7, 71, 2, 2, 1818, 1819, 7, 90, 2, 2, 1819, 1820, 7, 82, 2, 2, 1820, 342, 3, 2, 2, 2, 1821, 1822, 7, 72, 2, 2, 1822, 1823, 7, 78, 2, 2, 1823, 1824, 7, 81, 2, 2, 1824, 1825, 7, 81, 2, 2, 1825, 1826, 7, 84, 2, 2, 1826, 344, 3, 2, 2, 2, 1827, 1828, 7, 78, 2, 2, 1828, 1829, 7, 80, 2, 2, 1829, 346, 3, 2, 2, 2, 1830, 1831, 7, 78, 2, 2, 1831, 1832, 7, 81, 2, 2, 1832, 1833, 7, 73, 2, 2, 1833, 348, 3, 2, 2, 2, 1834, 1835, 7, 78, 2, 2, 1835, 1836, 7, 81, 2, 2, 1836, 1837, 7, 73, 2, 2, 1837, 1838, 7, 51, 2, 2, 1838, 1839, 7, 50, 2, 2, 1839, 350, 3, 2, 2, 2, 1840, 1841, 7, 78, 2, 2, 1841, 1842, 7, 81, 2, 2, 1842, 1843, 7, 73, 2, 2, 1843, 1844, 7, 52, 2, 2, 1844, 352, 3, 2, 2, 2, 1845, 1846, 7, 79, 2, 2, 1846, 1847, 7, 81, 2, 2, 1847, 1848, 7, 70, 2, 2, 1848, 354, 3, 2, 2, 2, 1849, 1850, 7, 82, 2, 2, 1850, 1851, 7, 75, 2, 2, 1851, 356, 3, 2, 2, 2, 1852, 1853, 7, 82, 2, 2, 1853, 1854, 7, 81, 2, 2, 1854, 1855, 7, 89, 2, 2, 1855, 358, 3, 2, 2, 2, 1856, 1857, 7, 82, 2, 2, 1857, 1858, 7, 81, 2, 2, 1858, 1859, 7, 89, 2, 2, 1859, 1860, 7, 71, 2, 2, 1860, 1861, 7, 84, 2, 2, 1861, 360, 3, 2, 2, 2, 1862, 1863, 7, 84, 2, 2, 1863, 1864, 7, 67, 2, 2, 1864, 1865, 7, 80, 2, 2, 1865, 1866, 7, 70, 2, 2, 1866, 362, 3, 2, 2, 2, 1867, 1868, 7, 84, 2, 2, 1868, 1869, 7, 81, 2, 2, 1869, 1870, 7, 87, 2, 2, 1870, 1871, 7, 80, 2, 2, 1871, 1872, 7, 70, 2, 2, 1872, 364, 3, 2, 2, 2, 1873, 1874, 7, 85, 2, 2, 1874, 1875, 7, 75, 2, 2, 1875, 1876, 7, 73, 2, 2, 1876, 1877, 7, 80, 2, 2, 1877, 366, 3, 2, 2, 2, 1878, 1879, 7, 85, 2, 2, 1879, 1880, 7, 83, 2, 2, 1880, 1881, 7, 84, 2, 2, 1881, 1882, 7, 86, 2, 2, 1882, 368, 3, 2, 2, 2, 1883, 1884, 7, 86, 2, 2, 1884, 1885, 7, 84, 2, 2, 1885, 1886, 7, 87, 2, 2, 1886, 1887, 7, 80, 2, 2, 1887, 1888, 7, 69, 2, 2, 1888, 1889, 7, 67, 2, 2, 1889, 1890, 7, 86, 2, 2, 1890, 1891, 7, 71, 2, 2, 1891, 370, 3, 2, 2, 2, 1892, 1893, 7, 67, 2, 2, 1893, 1894, 7, 69, 2, 2, 1894, 1895, 7, 81, 2, 2, 1895, 1896, 7, 85, 2, 2, 1896, 372, 3, 2, 2, 2, 1897, 1898, 7, 67, 2, 2, 1898, 1899, 7, 85, 2, 2, 1899, 1900, 7, 75, 2, 2, 1900, 1901, 7, 80, 2, 2, 1901, 374, 3, 2, 2, 2, 1902, 1903, 7, 67, 2, 2, 1903, 1904, 7, 86, 2, 2, 1904, 1905, 7, 67, 2, 2, 1905, 1906, 7, 80, 2, 2, 1906, 376, 3, 2, 2, 2, 1907, 1908, 7, 67, 2, 2, 1908, 1909, 7, 86, 2, 2, 1909, 1910, 7, 67, 2, 2, 1910, 1911, 7, 80, 2, 2, 1911, 1912, 7, 52, 2, 2, 1912, 378, 3, 2, 2, 2, 1913, 1914, 7, 69, 2, 2, 1914, 1915, 7, 81, 2, 2, 1915, 1916, 7, 85, 2, 2, 1916, 380, 3, 2, 2, 2, 1917, 1918, 7, 69, 2, 2, 1918, 1919, 7, 81, 2, 2, 1919, 1920, 7, 86, 2, 2, 1920, 382, 3, 2, 2, 2, 1921, 1922, 7, 70, 2, 2, 1922, 1923, 7, 71, 2, 2, 1923, 1924, 7, 73, 2, 2, 1924, 1925, 7, 84, 2, 2, 1925, 1926, 7, 71, 2, 2, 1926, 1927, 7, 71, 2, 2, 1927, 1928, 7, 85, 2, 2, 1928, 384, 3, 2, 2, 2, 1929, 1930, 7, 84, 2, 2, 1930, 1931, 7, 67, 2, 2, 1931, 1932, 7, 70, 2, 2, 1932, 1933, 7, 75, 2, 2, 1933, 1934, 7, 67, 2, 2, 1934, 1935, 7, 80, 2, 2, 1935, 1936, 7, 85, 2, 2, 1936, 386, 3, 2, 2, 2, 1937, 1938, 7, 85, 2, 2, 1938, 1939, 7, 75, 2, 2, 1939, 1940, 7, 80, 2, 2, 1940, 388, 3, 2, 2, 2, 1941, 1942, 7, 86, 2, 2, 1942, 1943, 7, 67, 2, 2, 1943, 1944, 7, 80, 2, 2, 1944, 390, 3, 2, 2, 2, 1945, 1946, 7, 67, 2, 2, 1946, 1947, 7, 70, 2, 2, 1947, 1948, 7, 70, 2, 2, 1948, 1949, 7, 70, 2, 2, 1949, 1950, 7, 67, 2, 2, 1950, 1951, 7, 86, 2, 2, 1951, 1952, 7, 71, 2, 2, 1952, 392, 3, 2, 2, 2, 1953, 1954, 7, 69, 2, 2, 1954, 1955, 7, 87, 2, 2, 1955, 1956, 7, 84, 2, 2, 1956, 1957, 7, 70, 2, 2, 1957, 1958, 7, 67, 2, 2, 1958, 1959, 7, 86, 2, 2, 1959, 1960, 7, 71, 2, 2, 1960, 394, 3, 2, 2, 2, 1961, 1962, 7, 69, 2, 2, 1962, 1963, 7, 87, 2, 2, 1963, 1964, 7, 84, 2, 2, 1964, 1965, 7, 84, 2, 2, 1965, 1966, 7, 71, 2, 2, 1966, 1967, 7, 80, 2, 2, 1967, 1968, 7, 86, 2, 2, 1968, 1969, 7, 97, 2, 2, 1969, 1970, 7, 70, 2, 2, 1970, 1971, 7, 67, 2, 2, 1971, 1972, 7, 86, 2, 2, 1972, 1973, 7, 71, 2, 2, 1973, 396, 3, 2, 2, 2, 1974, 1975, 7, 69, 2, 2, 1975, 1976, 7, 87, 2, 2, 1976, 1977, 7, 84, 2, 2, 1977, 1978, 7, 84, 2, 2, 1978, 1979, 7, 71, 2, 2, 1979, 1980, 7, 80, 2, 2, 1980, 1981, 7, 86, 2, 2, 1981, 1982, 7, 97, 2, 2, 1982, 1983, 7, 86, 2, 2, 1983, 1984, 7, 75, 2, 2, 1984, 1985, 7, 79, 2, 2, 1985, 1986, 7, 71, 2, 2, 1986, 398, 3, 2, 2, 2, 1987, 1988, 7, 69, 2, 2, 1988, 1989, 7, 87, 2, 2, 1989, 1990, 7, 84, 2, 2, 1990, 1991, 7, 84, 2, 2, 1991, 1992, 7, 71, 2, 2, 1992, 1993, 7, 80, 2, 2, 1993, 1994, 7, 86, 2, 2, 1994, 1995, 7, 97, 2, 2, 1995, 1996, 7, 86, 2, 2, 1996, 1997, 7, 75, 2, 2, 1997, 1998, 7, 79, 2, 2, 1998, 1999, 7, 71, 2, 2, 1999, 2000, 7, 85, 2, 2, 2000, 2001, 7, 86, 2, 2, 2001, 2002, 7, 67, 2, 2, 2002, 2003, 7, 79, 2, 2, 2003, 2004, 7, 82, 2, 2, 2004, 400, 3, 2, 2, 2, 2005, 2006, 7, 69, 2, 2, 2006, 2007, 7, 87, 2, 2, 2007, 2008, 7, 84, 2, 2, 2008, 2009, 7, 86, 2, 2, 2009, 2010, 7, 75, 2, 2, 2010, 2011, 7, 79, 2, 2, 2011, 2012, 7, 71, 2, 2, 2012, 402, 3, 2, 2, 2, 2013, 2014, 7, 70, 2, 2, 2014, 2015, 7, 67, 2, 2, 2015, 2016, 7, 86, 2, 2, 2016, 2017, 7, 71, 2, 2, 2017, 404, 3, 2, 2, 2, 2018, 2019, 7, 70, 2, 2, 2019, 2020, 7, 67, 2, 2, 2020, 2021, 7, 86, 2, 2, 2021, 2022, 7, 71, 2, 2, 2022, 2023, 7, 97, 2, 2, 2023, 2024, 7, 67, 2, 2, 2024, 2025, 7, 70, 2, 2, 2025, 2026, 7, 70, 2, 2, 2026, 406, 3, 2, 2, 2, 2027, 2028, 7, 70, 2, 2, 2028, 2029, 7, 67, 2, 2, 2029, 2030, 7, 86, 2, 2, 2030, 2031, 7, 71, 2, 2, 2031, 2032, 7, 97, 2, 2, 2032, 2033, 7, 72, 2, 2, 2033, 2034, 7, 81, 2, 2, 2034, 2035, 7, 84, 2, 2, 2035, 2036, 7, 79, 2, 2, 2036, 2037, 7, 67, 2, 2, 2037, 2038, 7, 86, 2, 2, 2038, 408, 3, 2, 2, 2, 2039, 2040, 7, 70, 2, 2, 2040, 2041, 7, 67, 2, 2, 2041, 2042, 7, 86, 2, 2, 2042, 2043, 7, 71, 2, 2, 2043, 2044, 7, 97, 2, 2, 2044, 2045, 7, 85, 2, 2, 2045, 2046, 7, 87, 2, 2, 2046, 2047, 7, 68, 2, 2, 2047, 410, 3, 2, 2, 2, 2048, 2049, 7, 70, 2, 2, 2049, 2050, 7, 67, 2, 2, 2050, 2051, 7, 91, 2, 2, 2051, 2052, 7, 80, 2, 2, 2052, 2053, 7, 67, 2, 2, 2053, 2054, 7, 79, 2, 2, 2054, 2055, 7, 71, 2, 2, 2055, 412, 3, 2, 2, 2, 2056, 2057, 7, 70, 2, 2, 2057, 2058, 7, 67, 2, 2, 2058, 2059, 7, 91, 2, 2, 2059, 2060, 7, 81, 2, 2, 2060, 2061, 7, 72, 2, 2, 2061, 2062, 7, 79, 2, 2, 2062, 2063, 7, 81, 2, 2, 2063, 2064, 7, 80, 2, 2, 2064, 2065, 7, 86, 2, 2, 2065, 2066, 7, 74, 2, 2, 2066, 414, 3, 2, 2, 2, 2067, 2068, 7, 70, 2, 2, 2068, 2069, 7, 67, 2, 2, 2069, 2070, 7, 91, 2, 2, 2070, 2071, 7, 81, 2, 2, 2071, 2072, 7, 72, 2, 2, 2072, 2073, 7, 89, 2, 2, 2073, 2074, 7, 71, 2, 2, 2074, 2075, 7, 71, 2, 2, 2075, 2076, 7, 77, 2, 2, 2076, 416, 3, 2, 2, 2, 2077, 2078, 7, 70, 2, 2, 2078, 2079, 7, 67, 2, 2, 2079, 2080, 7, 91, 2, 2, 2080, 2081, 7, 81, 2, 2, 2081, 2082, 7, 72, 2, 2, 2082, 2083, 7, 91, 2, 2, 2083, 2084, 7, 71, 2, 2, 2084, 2085, 7, 67, 2, 2, 2085, 2086, 7, 84, 2, 2, 2086, 418, 3, 2, 2, 2, 2087, 2088, 7, 72, 2, 2, 2088, 2089, 7, 84, 2, 2, 2089, 2090, 7, 81, 2, 2, 2090, 2091, 7, 79, 2, 2, 2091, 2092, 7, 97, 2, 2, 2092, 2093, 7, 70, 2, 2, 2093, 2094, 7, 67, 2, 2, 2094, 2095, 7, 91, 2, 2, 2095, 2096, 7, 85, 2, 2, 2096, 420, 3, 2, 2, 2, 2097, 2098, 7, 78, 2, 2, 2098, 2099, 7, 81, 2, 2, 2099, 2100, 7, 69, 2, 2, 2100, 2101, 7, 67, 2, 2, 2101, 2102, 7, 78, 2, 2, 2102, 2103, 7, 86, 2, 2, 2103, 2104, 7, 75, 2, 2, 2104, 2105, 7, 79, 2, 2, 2105, 2106, 7, 71, 2, 2, 2106, 422, 3, 2, 2, 2, 2107, 2108, 7, 78, 2, 2, 2108, 2109, 7, 81, 2, 2, 2109, 2110, 7, 69, 2, 2, 2110, 2111, 7, 67, 2, 2, 2111, 2112, 7, 78, 2, 2, 2112, 2113, 7, 86, 2, 2, 2113, 2114, 7, 75, 2, 2, 2114, 2115, 7, 79, 2, 2, 2115, 2116, 7, 71, 2, 2, 2116, 2117, 7, 85, 2, 2, 2117, 2118, 7, 86, 2, 2, 2118, 2119, 7, 67, 2, 2, 2119, 2120, 7, 79, 2, 2, 2120, 2121, 7, 82, 2, 2, 2121, 424, 3, 2, 2, 2, 2122, 2123, 7, 72, 2, 2, 2123, 2124, 7, 84, 2, 2, 2124, 2125, 7, 81, 2, 2, 2125, 2126, 7, 79, 2, 2, 2126, 2127, 7, 97, 2, 2, 2127, 2128, 7, 87, 2, 2, 2128, 2129, 7, 80, 2, 2, 2129, 2130, 7, 75, 2, 2, 2130, 2131, 7, 90, 2, 2, 2131, 2132, 7, 86, 2, 2, 2132, 2133, 7, 75, 2, 2, 2133, 2134, 7, 79, 2, 2, 2134, 2135, 7, 71, 2, 2, 2135, 426, 3, 2, 2, 2, 2136, 2137, 7, 79, 2, 2, 2137, 2138, 7, 67, 2, 2, 2138, 2139, 7, 77, 2, 2, 2139, 2140, 7, 71, 2, 2, 2140, 2141, 7, 70, 2, 2, 2141, 2142, 7, 67, 2, 2, 2142, 2143, 7, 86, 2, 2, 2143, 2144, 7, 71, 2, 2, 2144, 428, 3, 2, 2, 2, 2145, 2146, 7, 79, 2, 2, 2146, 2147, 7, 67, 2, 2, 2147, 2148, 7, 77, 2, 2, 2148, 2149, 7, 71, 2, 2, 2149, 2150, 7, 86, 2, 2, 2150, 2151, 7, 75, 2, 2, 2151, 2152, 7, 79, 2, 2, 2152, 2153, 7, 71, 2, 2, 2153, 430, 3, 2, 2, 2, 2154, 2155, 7, 79, 2, 2, 2155, 2156, 7, 81, 2, 2, 2156, 2157, 7, 80, 2, 2, 2157, 2158, 7, 86, 2, 2, 2158, 2159, 7, 74, 2, 2, 2159, 2160, 7, 80, 2, 2, 2160, 2161, 7, 67, 2, 2, 2161, 2162, 7, 79, 2, 2, 2162, 2163, 7, 71, 2, 2, 2163, 432, 3, 2, 2, 2, 2164, 2165, 7, 80, 2, 2, 2165, 2166, 7, 81, 2, 2, 2166, 2167, 7, 89, 2, 2, 2167, 434, 3, 2, 2, 2, 2168, 2169, 7, 82, 2, 2, 2169, 2170, 7, 71, 2, 2, 2170, 2171, 7, 84, 2, 2, 2171, 2172, 7, 75, 2, 2, 2172, 2173, 7, 81, 2, 2, 2173, 2174, 7, 70, 2, 2, 2174, 2175, 7, 97, 2, 2, 2175, 2176, 7, 67, 2, 2, 2176, 2177, 7, 70, 2, 2, 2177, 2178, 7, 70, 2, 2, 2178, 436, 3, 2, 2, 2, 2179, 2180, 7, 82, 2, 2, 2180, 2181, 7, 71, 2, 2, 2181, 2182, 7, 84, 2, 2, 2182, 2183, 7, 75, 2, 2, 2183, 2184, 7, 81, 2, 2, 2184, 2185, 7, 70, 2, 2, 2185, 2186, 7, 97, 2, 2, 2186, 2187, 7, 70, 2, 2, 2187, 2188, 7, 75, 2, 2, 2188, 2189, 7, 72, 2, 2, 2189, 2190, 7, 72, 2, 2, 2190, 438, 3, 2, 2, 2, 2191, 2192, 7, 85, 2, 2, 2192, 2193, 7, 87, 2, 2, 2193, 2194, 7, 68, 2, 2, 2194, 2195, 7, 70, 2, 2, 2195, 2196, 7, 67, 2, 2, 2196, 2197, 7, 86, 2, 2, 2197, 2198, 7, 71, 2, 2, 2198, 440, 3, 2, 2, 2, 2199, 2200, 7, 85, 2, 2, 2200, 2201, 7, 91, 2, 2, 2201, 2202, 7, 85, 2, 2, 2202, 2203, 7, 70, 2, 2, 2203, 2204, 7, 67, 2, 2, 2204, 2205, 7, 86, 2, 2, 2205, 2206, 7, 71, 2, 2, 2206, 442, 3, 2, 2, 2, 2207, 2208, 7, 86, 2, 2, 2208, 2209, 7, 75, 2, 2, 2209, 2210, 7, 79, 2, 2, 2210, 2211, 7, 71, 2, 2, 2211, 444, 3, 2, 2, 2, 2212, 2213, 7, 86, 2, 2, 2213, 2214, 7, 75, 2, 2, 2214, 2215, 7, 79, 2, 2, 2215, 2216, 7, 71, 2, 2, 2216, 2217, 7, 97, 2, 2, 2217, 2218, 7, 86, 2, 2, 2218, 2219, 7, 81, 2, 2, 2219, 2220, 7, 97, 2, 2, 2220, 2221, 7, 85, 2, 2, 2221, 2222, 7, 71, 2, 2, 2222, 2223, 7, 69, 2, 2, 2223, 446, 3, 2, 2, 2, 2224, 2225, 7, 86, 2, 2, 2225, 2226, 7, 75, 2, 2, 2226, 2227, 7, 79, 2, 2, 2227, 2228, 7, 71, 2, 2, 2228, 2229, 7, 85, 2, 2, 2229, 2230, 7, 86, 2, 2, 2230, 2231, 7, 67, 2, 2, 2231, 2232, 7, 79, 2, 2, 2232, 2233, 7, 82, 2, 2, 2233, 448, 3, 2, 2, 2, 2234, 2235, 7, 86, 2, 2, 2235, 2236, 7, 81, 2, 2, 2236, 2237, 7, 97, 2, 2, 2237, 2238, 7, 70, 2, 2, 2238, 2239, 7, 67, 2, 2, 2239, 2240, 7, 91, 2, 2, 2240, 2241, 7, 85, 2, 2, 2241, 450, 3, 2, 2, 2, 2242, 2243, 7, 87, 2, 2, 2243, 2244, 7, 86, 2, 2, 2244, 2245, 7, 69, 2, 2, 2245, 2246, 7, 97, 2, 2, 2246, 2247, 7, 70, 2, 2, 2247, 2248, 7, 67, 2, 2, 2248, 2249, 7, 86, 2, 2, 2249, 2250, 7, 71, 2, 2, 2250, 452, 3, 2, 2, 2, 2251, 2252, 7, 87, 2, 2, 2252, 2253, 7, 86, 2, 2, 2253, 2254, 7, 69, 2, 2, 2254, 2255, 7, 97, 2, 2, 2255, 2256, 7, 86, 2, 2, 2256, 2257, 7, 75, 2, 2, 2257, 2258, 7, 79, 2, 2, 2258, 2259, 7, 71, 2, 2, 2259, 454, 3, 2, 2, 2, 2260, 2261, 7, 87, 2, 2, 2261, 2262, 7, 86, 2, 2, 2262, 2263, 7, 69, 2, 2, 2263, 2264, 7, 97, 2, 2, 2264, 2265, 7, 86, 2, 2, 2265, 2266, 7, 75, 2, 2, 2266, 2267, 7, 79, 2, 2, 2267, 2268, 7, 71, 2, 2, 2268, 2269, 7, 85, 2, 2, 2269, 2270, 7, 86, 2, 2, 2270, 2271, 7, 67, 2, 2, 2271, 2272, 7, 79, 2, 2, 2272, 2273, 7, 82, 2, 2, 2273, 456, 3, 2, 2, 2, 2274, 2275, 7, 87, 2, 2, 2275, 2276, 7, 80, 2, 2, 2276, 2277, 7, 75, 2, 2, 2277, 2278, 7, 90, 2, 2, 2278, 2279, 7, 97, 2, 2, 2279, 2280, 7, 86, 2, 2, 2280, 2281, 7, 75, 2, 2, 2281, 2282, 7, 79, 2, 2, 2282, 2283, 7, 71, 2, 2, 2283, 2284, 7, 85, 2, 2, 2284, 2285, 7, 86, 2, 2, 2285, 2286, 7, 67, 2, 2, 2286, 2287, 7, 79, 2, 2, 2287, 2288, 7, 82, 2, 2, 2288, 458, 3, 2, 2, 2, 2289, 2290, 7, 85, 2, 2, 2290, 2291, 7, 87, 2, 2, 2291, 2292, 7, 68, 2, 2, 2292, 2293, 7, 85, 2, 2, 2293, 2294, 7, 86, 2, 2, 2294, 2295, 7, 84, 2, 2, 2295, 460, 3, 2, 2, 2, 2296, 2297, 7, 85, 2, 2, 2297, 2298, 7, 87, 2, 2, 2298, 2299, 7, 68, 2, 2, 2299, 2300, 7, 85, 2, 2, 2300, 2301, 7, 86, 2, 2, 2301, 2302, 7, 84, 2, 2, 2302, 2303, 7, 75, 2, 2, 2303, 2304, 7, 80, 2, 2, 2304, 2305, 7, 73, 2, 2, 2305, 462, 3, 2, 2, 2, 2306, 2307, 7, 78, 2, 2, 2307, 2308, 7, 86, 2, 2, 2308, 2309, 7, 84, 2, 2, 2309, 2310, 7, 75, 2, 2, 2310, 2311, 7, 79, 2, 2, 2311, 464, 3, 2, 2, 2, 2312, 2313, 7, 84, 2, 2, 2313, 2314, 7, 86, 2, 2, 2314, 2315, 7, 84, 2, 2, 2315, 2316, 7, 75, 2, 2, 2316, 2317, 7, 79, 2, 2, 2317, 466, 3, 2, 2, 2, 2318, 2319, 7, 86, 2, 2, 2319, 2320, 7, 84, 2, 2, 2320, 2321, 7, 75, 2, 2, 2321, 2322, 7, 79, 2, 2, 2322, 468, 3, 2, 2, 2, 2323, 2324, 7, 86, 2, 2, 2324, 2325, 7, 81, 2, 2, 2325, 470, 3, 2, 2, 2, 2326, 2327, 7, 78, 2, 2, 2327, 2328, 7, 81, 2, 2, 2328, 2329, 7, 89, 2, 2, 2329, 2330, 7, 71, 2, 2, 2330, 2331, 7, 84, 2, 2, 2331, 472, 3, 2, 2, 2, 2332, 2333, 7, 87, 2, 2, 2333, 2334, 7, 82, 2, 2, 2334, 2335, 7, 82, 2, 2, 2335, 2336, 7, 71, 2, 2, 2336, 2337, 7, 84, 2, 2, 2337, 474, 3, 2, 2, 2, 2338, 2339, 7, 69, 2, 2, 2339, 2340, 7, 81, 2, 2, 2340, 2341, 7, 80, 2, 2, 2341, 2342, 7, 69, 2, 2, 2342, 2343, 7, 67, 2, 2, 2343, 2344, 7, 86, 2, 2, 2344, 476, 3, 2, 2, 2, 2345, 2346, 7, 69, 2, 2, 2346, 2347, 7, 81, 2, 2, 2347, 2348, 7, 80, 2, 2, 2348, 2349, 7, 69, 2, 2, 2349, 2350, 7, 67, 2, 2, 2350, 2351, 7, 86, 2, 2, 2351, 2352, 7, 97, 2, 2, 2352, 2353, 7, 89, 2, 2, 2353, 2354, 7, 85, 2, 2, 2354, 478, 3, 2, 2, 2, 2355, 2356, 7, 78, 2, 2, 2356, 2357, 7, 71, 2, 2, 2357, 2358, 7, 80, 2, 2, 2358, 2359, 7, 73, 2, 2, 2359, 2360, 7, 86, 2, 2, 2360, 2361, 7, 74, 2, 2, 2361, 480, 3, 2, 2, 2, 2362, 2363, 7, 85, 2, 2, 2363, 2364, 7, 86, 2, 2, 2364, 2365, 7, 84, 2, 2, 2365, 2366, 7, 69, 2, 2, 2366, 2367, 7, 79, 2, 2, 2367, 2368, 7, 82, 2, 2, 2368, 482, 3, 2, 2, 2, 2369, 2370, 7, 84, 2, 2, 2370, 2371, 7, 75, 2, 2, 2371, 2372, 7, 73, 2, 2, 2372, 2373, 7, 74, 2, 2, 2373, 2374, 7, 86, 2, 2, 2374, 484, 3, 2, 2, 2, 2375, 2376, 7, 78, 2, 2, 2376, 2377, 7, 71, 2, 2, 2377, 2378, 7, 72, 2, 2, 2378, 2379, 7, 86, 2, 2, 2379, 486, 3, 2, 2, 2, 2380, 2381, 7, 67, 2, 2, 2381, 2382, 7, 85, 2, 2, 2382, 2383, 7, 69, 2, 2, 2383, 2384, 7, 75, 2, 2, 2384, 2385, 7, 75, 2, 2, 2385, 488, 3, 2, 2, 2, 2386, 2387, 7, 78, 2, 2, 2387, 2388, 7, 81, 2, 2, 2388, 2389, 7, 69, 2, 2, 2389, 2390, 7, 67, 2, 2, 2390, 2391, 7, 86, 2, 2, 2391, 2392, 7, 71, 2, 2, 2392, 490, 3, 2, 2, 2, 2393, 2394, 7, 84, 2, 2, 2394, 2395, 7, 71, 2, 2, 2395, 2396, 7, 82, 2, 2, 2396, 2397, 7, 78, 2, 2, 2397, 2398, 7, 67, 2, 2, 2398, 2399, 7, 69, 2, 2, 2399, 2400, 7, 71, 2, 2, 2400, 492, 3, 2, 2, 2, 2401, 2402, 7, 69, 2, 2, 2402, 2403, 7, 67, 2, 2, 2403, 2404, 7, 85, 2, 2, 2404, 2405, 7, 86, 2, 2, 2405, 494, 3, 2, 2, 2, 2406, 2407, 7, 78, 2, 2, 2407, 2408, 7, 75, 2, 2, 2408, 2409, 7, 77, 2, 2, 2409, 2410, 7, 71, 2, 2, 2410, 496, 3, 2, 2, 2, 2411, 2412, 7, 75, 2, 2, 2412, 2413, 7, 85, 2, 2, 2413, 2414, 7, 80, 2, 2, 2414, 2415, 7, 87, 2, 2, 2415, 2416, 7, 78, 2, 2, 2416, 2417, 7, 78, 2, 2, 2417, 498, 3, 2, 2, 2, 2418, 2419, 7, 75, 2, 2, 2419, 2420, 7, 85, 2, 2, 2420, 2421, 7, 80, 2, 2, 2421, 2422, 7, 81, 2, 2, 2422, 2423, 7, 86, 2, 2, 2423, 2424, 7, 80, 2, 2, 2424, 2425, 7, 87, 2, 2, 2425, 2426, 7, 78, 2, 2, 2426, 2427, 7, 78, 2, 2, 2427, 500, 3, 2, 2, 2, 2428, 2429, 7, 75, 2, 2, 2429, 2430, 7, 72, 2, 2, 2430, 2431, 7, 80, 2, 2, 2431, 2432, 7, 87, 2, 2, 2432, 2433, 7, 78, 2, 2, 2433, 2434, 7, 78, 2, 2, 2434, 502, 3, 2, 2, 2, 2435, 2436, 7, 80, 2, 2, 2436, 2437, 7, 87, 2, 2, 2437, 2438, 7, 78, 2, 2, 2438, 2439, 7, 78, 2, 2, 2439, 2440, 7, 75, 2, 2, 2440, 2441, 7, 72, 2, 2, 2441, 504, 3, 2, 2, 2, 2442, 2443, 7, 75, 2, 2, 2443, 2444, 7, 72, 2, 2, 2444, 506, 3, 2, 2, 2, 2445, 2446, 7, 86, 2, 2, 2446, 2447, 7, 91, 2, 2, 2447, 2448, 7, 82, 2, 2, 2448, 2449, 7, 71, 2, 2, 2449, 2450, 7, 81, 2, 2, 2450, 2451, 7, 72, 2, 2, 2451, 508, 3, 2, 2, 2, 2452, 2453, 7, 79, 2, 2, 2453, 2454, 7, 67, 2, 2, 2454, 2455, 7, 86, 2, 2, 2455, 2456, 7, 69, 2, 2, 2456, 2457, 7, 74, 2, 2, 2457, 510, 3, 2, 2, 2, 2458, 2459, 7, 79, 2, 2, 2459, 2460, 7, 67, 2, 2, 2460, 2461, 7, 86, 2, 2, 2461, 2462, 7, 69, 2, 2, 2462, 2463, 7, 74, 2, 2, 2463, 2464, 7, 97, 2, 2, 2464, 2465, 7, 82, 2, 2, 2465, 2466, 7, 74, 2, 2, 2466, 2467, 7, 84, 2, 2, 2467, 2468, 7, 67, 2, 2, 2468, 2469, 7, 85, 2, 2, 2469, 2470, 7, 71, 2, 2, 2470, 512, 3, 2, 2, 2, 2471, 2472, 7, 79, 2, 2, 2472, 2473, 7, 67, 2, 2, 2473, 2474, 7, 86, 2, 2, 2474, 2475, 7, 69, 2, 2, 2475, 2476, 7, 74, 2, 2, 2476, 2477, 7, 97, 2, 2, 2477, 2478, 7, 82, 2, 2, 2478, 2479, 7, 74, 2, 2, 2479, 2480, 7, 84, 2, 2, 2480, 2481, 7, 67, 2, 2, 2481, 2482, 7, 85, 2, 2, 2482, 2483, 7, 71, 2, 2, 2483, 2484, 7, 97, 2, 2, 2484, 2485, 7, 82, 2, 2, 2485, 2486, 7, 84, 2, 2, 2486, 2487, 7, 71, 2, 2, 2487, 2488, 7, 72, 2, 2, 2488, 2489, 7, 75, 2, 2, 2489, 2490, 7, 90, 2, 2, 2490, 514, 3, 2, 2, 2, 2491, 2492, 7, 79, 2, 2, 2492, 2493, 7, 67, 2, 2, 2493, 2494, 7, 86, 2, 2, 2494, 2495, 7, 69, 2, 2, 2495, 2496, 7, 74, 2, 2, 2496, 2497, 7, 97, 2, 2, 2497, 2498, 7, 68, 2, 2, 2498, 2499, 7, 81, 2, 2, 2499, 2500, 7, 81, 2, 2, 2500, 2501, 7, 78, 2, 2, 2501, 2502, 7, 97, 2, 2, 2502, 2503, 7, 82, 2, 2, 2503, 2504, 7, 84, 2, 2, 2504, 2505, 7, 71, 2, 2, 2505, 2506, 7, 72, 2, 2, 2506, 2507, 7, 75, 2, 2, 2507, 2508, 7, 90, 2, 2, 2508, 516, 3, 2, 2, 2, 2509, 2510, 7, 85, 2, 2, 2510, 2511, 7, 75, 2, 2, 2511, 2512, 7, 79, 2, 2, 2512, 2513, 7, 82, 2, 2, 2513, 2514, 7, 78, 2, 2, 2514, 2515, 7, 71, 2, 2, 2515, 2516, 7, 97, 2, 2, 2516, 2517, 7, 83, 2, 2, 2517, 2518, 7, 87, 2, 2, 2518, 2519, 7, 71, 2, 2, 2519, 2520, 7, 84, 2, 2, 2520, 2521, 7, 91, 2, 2, 2521, 2522, 7, 97, 2, 2, 2522, 2523, 7, 85, 2, 2, 2523, 2524, 7, 86, 2, 2, 2524, 2525, 7, 84, 2, 2, 2525, 2526, 7, 75, 2, 2, 2526, 2527, 7, 80, 2, 2, 2527, 2528, 7, 73, 2, 2, 2528, 518, 3, 2, 2, 2, 2529, 2530, 7, 79, 2, 2, 2530, 2531, 7, 87, 2, 2, 2531, 2532, 7, 78, 2, 2, 2532, 2533, 7, 86, 2, 2, 2533, 2534, 7, 75, 2, 2, 2534, 2535, 7, 97, 2, 2, 2535, 2536, 7, 79, 2, 2, 2536, 2537, 7, 67, 2, 2, 2537, 2538, 7, 86, 2, 2, 2538, 2539, 7, 69, 2, 2, 2539, 2540, 7, 74, 2, 2, 2540, 520, 3, 2, 2, 2, 2541, 2542, 7, 83, 2, 2, 2542, 2543, 7, 87, 2, 2, 2543, 2544, 7, 71, 2, 2, 2544, 2545, 7, 84, 2, 2, 2545, 2546, 7, 91, 2, 2, 2546, 2547, 7, 97, 2, 2, 2547, 2548, 7, 85, 2, 2, 2548, 2549, 7, 86, 2, 2, 2549, 2550, 7, 84, 2, 2, 2550, 2551, 7, 75, 2, 2, 2551, 2552, 7, 80, 2, 2, 2552, 2553, 7, 73, 2, 2, 2553, 522, 3, 2, 2, 2, 2554, 2555, 7, 67, 2, 2, 2555, 2556, 7, 78, 2, 2, 2556, 2557, 7, 78, 2, 2, 2557, 2558, 7, 81, 2, 2, 2558, 2559, 7, 89, 2, 2, 2559, 2560, 7, 97, 2, 2, 2560, 2561, 7, 78, 2, 2, 2561, 2562, 7, 71, 2, 2, 2562, 2563, 7, 67, 2, 2, 2563, 2564, 7, 70, 2, 2, 2564, 2565, 7, 75, 2, 2, 2565, 2566, 7, 80, 2, 2, 2566, 2567, 7, 73, 2, 2, 2567, 2568, 7, 97, 2, 2, 2568, 2569, 7, 89, 2, 2, 2569, 2570, 7, 75, 2, 2, 2570, 2571, 7, 78, 2, 2, 2571, 2572, 7, 70, 2, 2, 2572, 2573, 7, 69, 2, 2, 2573, 2574, 7, 67, 2, 2, 2574, 2575, 7, 84, 2, 2, 2575, 2576, 7, 70, 2, 2, 2576, 524, 3, 2, 2, 2, 2577, 2578, 7, 67, 2, 2, 2578, 2579, 7, 80, 2, 2, 2579, 2580, 7, 67, 2, 2, 2580, 2581, 7, 78, 2, 2, 2581, 2582, 7, 91, 2, 2, 2582, 2583, 7, 92, 2, 2, 2583, 2584, 7, 71, 2, 2, 2584, 2585, 7, 97, 2, 2, 2585, 2586, 7, 89, 2, 2, 2586, 2587, 7, 75, 2, 2, 2587, 2588, 7, 78, 2, 2, 2588, 2589, 7, 70, 2, 2, 2589, 2590, 7, 69, 2, 2, 2590, 2591, 7, 67, 2, 2, 2591, 2592, 7, 84, 2, 2, 2592, 2593, 7, 70, 2, 2, 2593, 526, 3, 2, 2, 2, 2594, 2595, 7, 67, 2, 2, 2595, 2596, 7, 80, 2, 2, 2596, 2597, 7, 67, 2, 2, 2597, 2598, 7, 78, 2, 2, 2598, 2599, 7, 91, 2, 2, 2599, 2600, 7, 92, 2, 2, 2600, 2601, 7, 71, 2, 2, 2601, 2602, 7, 84, 2, 2, 2602, 528, 3, 2, 2, 2, 2603, 2604, 7, 67, 2, 2, 2604, 2605, 7, 87, 2, 2, 2605, 2606, 7, 86, 2, 2, 2606, 2607, 7, 81, 2, 2, 2607, 2608, 7, 97, 2, 2, 2608, 2609, 7, 73, 2, 2, 2609, 2610, 7, 71, 2, 2, 2610, 2611, 7, 80, 2, 2, 2611, 2612, 7, 71, 2, 2, 2612, 2613, 7, 84, 2, 2, 2613, 2614, 7, 67, 2, 2, 2614, 2615, 7, 86, 2, 2, 2615, 2616, 7, 71, 2, 2, 2616, 2617, 7, 97, 2, 2, 2617, 2618, 7, 85, 2, 2, 2618, 2619, 7, 91, 2, 2, 2619, 2620, 7, 80, 2, 2, 2620, 2621, 7, 81, 2, 2, 2621, 2622, 7, 80, 2, 2, 2622, 2623, 7, 91, 2, 2, 2623, 2624, 7, 79, 2, 2, 2624, 2625, 7, 85, 2, 2, 2625, 2626, 7, 97, 2, 2, 2626, 2627, 7, 82, 2, 2, 2627, 2628, 7, 74, 2, 2, 2628, 2629, 7, 84, 2, 2, 2629, 2630, 7, 67, 2, 2, 2630, 2631, 7, 85, 2, 2, 2631, 2632, 7, 71, 2, 2, 2632, 2633, 7, 97, 2, 2, 2633, 2634, 7, 83, 2, 2, 2634, 2635, 7, 87, 2, 2, 2635, 2636, 7, 71, 2, 2, 2636, 2637, 7, 84, 2, 2, 2637, 2638, 7, 91, 2, 2, 2638, 530, 3, 2, 2, 2, 2639, 2640, 7, 68, 2, 2, 2640, 2641, 7, 81, 2, 2, 2641, 2642, 7, 81, 2, 2, 2642, 2643, 7, 85, 2, 2, 2643, 2644, 7, 86, 2, 2, 2644, 532, 3, 2, 2, 2, 2645, 2646, 7, 69, 2, 2, 2646, 2647, 7, 87, 2, 2, 2647, 2648, 7, 86, 2, 2, 2648, 2649, 7, 81, 2, 2, 2649, 2650, 7, 72, 2, 2, 2650, 2651, 7, 72, 2, 2, 2651, 2652, 7, 97, 2, 2, 2652, 2653, 7, 72, 2, 2, 2653, 2654, 7, 84, 2, 2, 2654, 2655, 7, 71, 2, 2, 2655, 2656, 7, 83, 2, 2, 2656, 2657, 7, 87, 2, 2, 2657, 2658, 7, 71, 2, 2, 2658, 2659, 7, 80, 2, 2, 2659, 2660, 7, 69, 2, 2, 2660, 2661, 7, 91, 2, 2, 2661, 534, 3, 2, 2, 2, 2662, 2663, 7, 70, 2, 2, 2663, 2664, 7, 71, 2, 2, 2664, 2665, 7, 72, 2, 2, 2665, 2666, 7, 67, 2, 2, 2666, 2667, 7, 87, 2, 2, 2667, 2668, 7, 78, 2, 2, 2668, 2669, 7, 86, 2, 2, 2669, 2670, 7, 97, 2, 2, 2670, 2671, 7, 72, 2, 2, 2671, 2672, 7, 75, 2, 2, 2672, 2673, 7, 71, 2, 2, 2673, 2674, 7, 78, 2, 2, 2674, 2675, 7, 70, 2, 2, 2675, 536, 3, 2, 2, 2, 2676, 2677, 7, 70, 2, 2, 2677, 2678, 7, 71, 2, 2, 2678, 2679, 7, 72, 2, 2, 2679, 2680, 7, 67, 2, 2, 2680, 2681, 7, 87, 2, 2, 2681, 2682, 7, 78, 2, 2, 2682, 2683, 7, 86, 2, 2, 2683, 2684, 7, 97, 2, 2, 2684, 2685, 7, 81, 2, 2, 2685, 2686, 7, 82, 2, 2, 2686, 2687, 7, 71, 2, 2, 2687, 2688, 7, 84, 2, 2, 2688, 2689, 7, 67, 2, 2, 2689, 2690, 7, 86, 2, 2, 2690, 2691, 7, 81, 2, 2, 2691, 2692, 7, 84, 2, 2, 2692, 538, 3, 2, 2, 2, 2693, 2694, 7, 71, 2, 2, 2694, 2695, 7, 80, 2, 2, 2695, 2696, 7, 67, 2, 2, 2696, 2697, 7, 68, 2, 2, 2697, 2698, 7, 78, 2, 2, 2698, 2699, 7, 71, 2, 2, 2699, 2700, 7, 97, 2, 2, 2700, 2701, 7, 82, 2, 2, 2701, 2702, 7, 81, 2, 2, 2702, 2703, 7, 85, 2, 2, 2703, 2704, 7, 75, 2, 2, 2704, 2705, 7, 86, 2, 2, 2705, 2706, 7, 75, 2, 2, 2706, 2707, 7, 81, 2, 2, 2707, 2708, 7, 80, 2, 2, 2708, 2709, 7, 97, 2, 2, 2709, 2710, 7, 75, 2, 2, 2710, 2711, 7, 80, 2, 2, 2711, 2712, 7, 69, 2, 2, 2712, 2713, 7, 84, 2, 2, 2713, 2714, 7, 71, 2, 2, 2714, 2715, 7, 79, 2, 2, 2715, 2716, 7, 71, 2, 2, 2716, 2717, 7, 80, 2, 2, 2717, 2718, 7, 86, 2, 2, 2718, 2719, 7, 85, 2, 2, 2719, 540, 3, 2, 2, 2, 2720, 2721, 7, 71, 2, 2, 2721, 2722, 7, 85, 2, 2, 2722, 2723, 7, 69, 2, 2, 2723, 2724, 7, 67, 2, 2, 2724, 2725, 7, 82, 2, 2, 2725, 2726, 7, 71, 2, 2, 2726, 542, 3, 2, 2, 2, 2727, 2728, 7, 72, 2, 2, 2728, 2729, 7, 78, 2, 2, 2729, 2730, 7, 67, 2, 2, 2730, 2731, 7, 73, 2, 2, 2731, 2732, 7, 85, 2, 2, 2732, 544, 3, 2, 2, 2, 2733, 2734, 7, 72, 2, 2, 2734, 2735, 7, 87, 2, 2, 2735, 2736, 7, 92, 2, 2, 2736, 2737, 7, 92, 2, 2, 2737, 2738, 7, 91, 2, 2, 2738, 2739, 7, 97, 2, 2, 2739, 2740, 7, 79, 2, 2, 2740, 2741, 7, 67, 2, 2, 2741, 2742, 7, 90, 2, 2, 2742, 2743, 7, 97, 2, 2, 2743, 2744, 7, 71, 2, 2, 2744, 2745, 7, 90, 2, 2, 2745, 2746, 7, 82, 2, 2, 2746, 2747, 7, 67, 2, 2, 2747, 2748, 7, 80, 2, 2, 2748, 2749, 7, 85, 2, 2, 2749, 2750, 7, 75, 2, 2, 2750, 2751, 7, 81, 2, 2, 2751, 2752, 7, 80, 2, 2, 2752, 2753, 7, 85, 2, 2, 2753, 546, 3, 2, 2, 2, 2754, 2755, 7, 72, 2, 2, 2755, 2756, 7, 87, 2, 2, 2756, 2757, 7, 92, 2, 2, 2757, 2758, 7, 92, 2, 2, 2758, 2759, 7, 91, 2, 2, 2759, 2760, 7, 97, 2, 2, 2760, 2761, 7, 82, 2, 2, 2761, 2762, 7, 84, 2, 2, 2762, 2763, 7, 71, 2, 2, 2763, 2764, 7, 72, 2, 2, 2764, 2765, 7, 75, 2, 2, 2765, 2766, 7, 90, 2, 2, 2766, 2767, 7, 97, 2, 2, 2767, 2768, 7, 78, 2, 2, 2768, 2769, 7, 71, 2, 2, 2769, 2770, 7, 80, 2, 2, 2770, 2771, 7, 73, 2, 2, 2771, 2772, 7, 86, 2, 2, 2772, 2773, 7, 74, 2, 2, 2773, 548, 3, 2, 2, 2, 2774, 2775, 7, 72, 2, 2, 2775, 2776, 7, 87, 2, 2, 2776, 2777, 7, 92, 2, 2, 2777, 2778, 7, 92, 2, 2, 2778, 2779, 7, 91, 2, 2, 2779, 2780, 7, 97, 2, 2, 2780, 2781, 7, 86, 2, 2, 2781, 2782, 7, 84, 2, 2, 2782, 2783, 7, 67, 2, 2, 2783, 2784, 7, 80, 2, 2, 2784, 2785, 7, 85, 2, 2, 2785, 2786, 7, 82, 2, 2, 2786, 2787, 7, 81, 2, 2, 2787, 2788, 7, 85, 2, 2, 2788, 2789, 7, 75, 2, 2, 2789, 2790, 7, 86, 2, 2, 2790, 2791, 7, 75, 2, 2, 2791, 2792, 7, 81, 2, 2, 2792, 2793, 7, 80, 2, 2, 2793, 2794, 7, 85, 2, 2, 2794, 550, 3, 2, 2, 2, 2795, 2796, 7, 72, 2, 2, 2796, 2797, 7, 87, 2, 2, 2797, 2798, 7, 92, 2, 2, 2798, 2799, 7, 92, 2, 2, 2799, 2800, 7, 91, 2, 2, 2800, 2801, 7, 97, 2, 2, 2801, 2802, 7, 84, 2, 2, 2802, 2803, 7, 71, 2, 2, 2803, 2804, 7, 89, 2, 2, 2804, 2805, 7, 84, 2, 2, 2805, 2806, 7, 75, 2, 2, 2806, 2807, 7, 86, 2, 2, 2807, 2808, 7, 71, 2, 2, 2808, 552, 3, 2, 2, 2, 2809, 2810, 7, 72, 2, 2, 2810, 2811, 7, 87, 2, 2, 2811, 2812, 7, 92, 2, 2, 2812, 2813, 7, 92, 2, 2, 2813, 2814, 7, 75, 2, 2, 2814, 2815, 7, 80, 2, 2, 2815, 2816, 7, 71, 2, 2, 2816, 2817, 7, 85, 2, 2, 2817, 2818, 7, 85, 2, 2, 2818, 554, 3, 2, 2, 2, 2819, 2820, 7, 78, 2, 2, 2820, 2821, 7, 71, 2, 2, 2821, 2822, 7, 80, 2, 2, 2822, 2823, 7, 75, 2, 2, 2823, 2824, 7, 71, 2, 2, 2824, 2825, 7, 80, 2, 2, 2825, 2826, 7, 86, 2, 2, 2826, 556, 3, 2, 2, 2, 2827, 2828, 7, 78, 2, 2, 2828, 2829, 7, 81, 2, 2, 2829, 2830, 7, 89, 2, 2, 2830, 2831, 7, 97, 2, 2, 2831, 2832, 7, 72, 2, 2, 2832, 2833, 7, 84, 2, 2, 2833, 2834, 7, 71, 2, 2, 2834, 2835, 7, 83, 2, 2, 2835, 2836, 7, 97, 2, 2, 2836, 2837, 7, 81, 2, 2, 2837, 2838, 7, 82, 2, 2, 2838, 2839, 7, 71, 2, 2, 2839, 2840, 7, 84, 2, 2, 2840, 2841, 7, 67, 2, 2, 2841, 2842, 7, 86, 2, 2, 2842, 2843, 7, 81, 2, 2, 2843, 2844, 7, 84, 2, 2, 2844, 558, 3, 2, 2, 2, 2845, 2846, 7, 79, 2, 2, 2846, 2847, 7, 67, 2, 2, 2847, 2848, 7, 90, 2, 2, 2848, 2849, 7, 97, 2, 2, 2849, 2850, 7, 70, 2, 2, 2850, 2851, 7, 71, 2, 2, 2851, 2852, 7, 86, 2, 2, 2852, 2853, 7, 71, 2, 2, 2853, 2854, 7, 84, 2, 2, 2854, 2855, 7, 79, 2, 2, 2855, 2856, 7, 75, 2, 2, 2856, 2857, 7, 80, 2, 2, 2857, 2858, 7, 75, 2, 2, 2858, 2859, 7, 92, 2, 2, 2859, 2860, 7, 71, 2, 2, 2860, 2861, 7, 70, 2, 2, 2861, 2862, 7, 97, 2, 2, 2862, 2863, 7, 85, 2, 2, 2863, 2864, 7, 86, 2, 2, 2864, 2865, 7, 67, 2, 2, 2865, 2866, 7, 86, 2, 2, 2866, 2867, 7, 71, 2, 2, 2867, 2868, 7, 85, 2, 2, 2868, 560, 3, 2, 2, 2, 2869, 2870, 7, 79, 2, 2, 2870, 2871, 7, 67, 2, 2, 2871, 2872, 7, 90, 2, 2, 2872, 2873, 7, 97, 2, 2, 2873, 2874, 7, 71, 2, 2, 2874, 2875, 7, 90, 2, 2, 2875, 2876, 7, 82, 2, 2, 2876, 2877, 7, 67, 2, 2, 2877, 2878, 7, 80, 2, 2, 2878, 2879, 7, 85, 2, 2, 2879, 2880, 7, 75, 2, 2, 2880, 2881, 7, 81, 2, 2, 2881, 2882, 7, 80, 2, 2, 2882, 2883, 7, 85, 2, 2, 2883, 562, 3, 2, 2, 2, 2884, 2885, 7, 79, 2, 2, 2885, 2886, 7, 75, 2, 2, 2886, 2887, 7, 80, 2, 2, 2887, 2888, 7, 75, 2, 2, 2888, 2889, 7, 79, 2, 2, 2889, 2890, 7, 87, 2, 2, 2890, 2891, 7, 79, 2, 2, 2891, 2892, 7, 97, 2, 2, 2892, 2893, 7, 85, 2, 2, 2893, 2894, 7, 74, 2, 2, 2894, 2895, 7, 81, 2, 2, 2895, 2896, 7, 87, 2, 2, 2896, 2897, 7, 78, 2, 2, 2897, 2898, 7, 70, 2, 2, 2898, 2899, 7, 97, 2, 2, 2899, 2900, 7, 79, 2, 2, 2900, 2901, 7, 67, 2, 2, 2901, 2902, 7, 86, 2, 2, 2902, 2903, 7, 69, 2, 2, 2903, 2904, 7, 74, 2, 2, 2904, 564, 3, 2, 2, 2, 2905, 2906, 7, 81, 2, 2, 2906, 2907, 7, 82, 2, 2, 2907, 2908, 7, 71, 2, 2, 2908, 2909, 7, 84, 2, 2, 2909, 2910, 7, 67, 2, 2, 2910, 2911, 7, 86, 2, 2, 2911, 2912, 7, 81, 2, 2, 2912, 2913, 7, 84, 2, 2, 2913, 566, 3, 2, 2, 2, 2914, 2915, 7, 82, 2, 2, 2915, 2916, 7, 74, 2, 2, 2916, 2917, 7, 84, 2, 2, 2917, 2918, 7, 67, 2, 2, 2918, 2919, 7, 85, 2, 2, 2919, 2920, 7, 71, 2, 2, 2920, 2921, 7, 97, 2, 2, 2921, 2922, 7, 85, 2, 2, 2922, 2923, 7, 78, 2, 2, 2923, 2924, 7, 81, 2, 2, 2924, 2925, 7, 82, 2, 2, 2925, 568, 3, 2, 2, 2, 2926, 2927, 7, 82, 2, 2, 2927, 2928, 7, 84, 2, 2, 2928, 2929, 7, 71, 2, 2, 2929, 2930, 7, 72, 2, 2, 2930, 2931, 7, 75, 2, 2, 2931, 2932, 7, 90, 2, 2, 2932, 2933, 7, 97, 2, 2, 2933, 2934, 7, 78, 2, 2, 2934, 2935, 7, 71, 2, 2, 2935, 2936, 7, 80, 2, 2, 2936, 2937, 7, 73, 2, 2, 2937, 2938, 7, 86, 2, 2, 2938, 2939, 7, 74, 2, 2, 2939, 570, 3, 2, 2, 2, 2940, 2941, 7, 83, 2, 2, 2941, 2942, 7, 87, 2, 2, 2942, 2943, 7, 81, 2, 2, 2943, 2944, 7, 86, 2, 2, 2944, 2945, 7, 71, 2, 2, 2945, 2946, 7, 97, 2, 2, 2946, 2947, 7, 67, 2, 2, 2947, 2948, 7, 80, 2, 2, 2948, 2949, 7, 67, 2, 2, 2949, 2950, 7, 78, 2, 2, 2950, 2951, 7, 91, 2, 2, 2951, 2952, 7, 92, 2, 2, 2952, 2953, 7, 71, 2, 2, 2953, 2954, 7, 84, 2, 2, 2954, 572, 3, 2, 2, 2, 2955, 2956, 7, 83, 2, 2, 2956, 2957, 7, 87, 2, 2, 2957, 2958, 7, 81, 2, 2, 2958, 2959, 7, 86, 2, 2, 2959, 2960, 7, 71, 2, 2, 2960, 2961, 7, 97, 2, 2, 2961, 2962, 7, 72, 2, 2, 2962, 2963, 7, 75, 2, 2, 2963, 2964, 7, 71, 2, 2, 2964, 2965, 7, 78, 2, 2, 2965, 2966, 7, 70, 2, 2, 2966, 2967, 7, 97, 2, 2, 2967, 2968, 7, 85, 2, 2, 2968, 2969, 7, 87, 2, 2, 2969, 2970, 7, 72, 2, 2, 2970, 2971, 7, 72, 2, 2, 2971, 2972, 7, 75, 2, 2, 2972, 2973, 7, 90, 2, 2, 2973, 574, 3, 2, 2, 2, 2974, 2975, 7, 84, 2, 2, 2975, 2976, 7, 71, 2, 2, 2976, 2977, 7, 89, 2, 2, 2977, 2978, 7, 84, 2, 2, 2978, 2979, 7, 75, 2, 2, 2979, 2980, 7, 86, 2, 2, 2980, 2981, 7, 71, 2, 2, 2981, 576, 3, 2, 2, 2, 2982, 2983, 7, 85, 2, 2, 2983, 2984, 7, 78, 2, 2, 2984, 2985, 7, 81, 2, 2, 2985, 2986, 7, 82, 2, 2, 2986, 578, 3, 2, 2, 2, 2987, 2988, 7, 86, 2, 2, 2988, 2989, 7, 75, 2, 2, 2989, 2990, 7, 71, 2, 2, 2990, 2991, 7, 97, 2, 2, 2991, 2992, 7, 68, 2, 2, 2992, 2993, 7, 84, 2, 2, 2993, 2994, 7, 71, 2, 2, 2994, 2995, 7, 67, 2, 2, 2995, 2996, 7, 77, 2, 2, 2996, 2997, 7, 71, 2, 2, 2997, 2998, 7, 84, 2, 2, 2998, 580, 3, 2, 2, 2, 2999, 3000, 7, 86, 2, 2, 3000, 3001, 7, 91, 2, 2, 3001, 3002, 7, 82, 2, 2, 3002, 3003, 7, 71, 2, 2, 3003, 582, 3, 2, 2, 2, 3004, 3005, 7, 92, 2, 2, 3005, 3006, 7, 71, 2, 2, 3006, 3007, 7, 84, 2, 2, 3007, 3008, 7, 81, 2, 2, 3008, 3009, 7, 97, 2, 2, 3009, 3010, 7, 86, 2, 2, 3010, 3011, 7, 71, 2, 2, 3011, 3012, 7, 84, 2, 2, 3012, 3013, 7, 79, 2, 2, 3013, 3014, 7, 85, 2, 2, 3014, 3015, 7, 97, 2, 2, 3015, 3016, 7, 83, 2, 2, 3016, 3017, 7, 87, 2, 2, 3017, 3018, 7, 71, 2, 2, 3018, 3019, 7, 84, 2, 2, 3019, 3020, 7, 91, 2, 2, 3020, 584, 3, 2, 2, 2, 3021, 3022, 7, 85, 2, 2, 3022, 3023, 7, 82, 2, 2, 3023, 3024, 7, 67, 2, 2, 3024, 3025, 7, 80, 2, 2, 3025, 586, 3, 2, 2, 2, 3026, 3027, 7, 79, 2, 2, 3027, 3028, 7, 85, 2, 2, 3028, 588, 3, 2, 2, 2, 3029, 3030, 7, 85, 2, 2, 3030, 590, 3, 2, 2, 2, 3031, 3032, 7, 79, 2, 2, 3032, 592, 3, 2, 2, 2, 3033, 3034, 7, 74, 2, 2, 3034, 594, 3, 2, 2, 2, 3035, 3036, 7, 89, 2, 2, 3036, 596, 3, 2, 2, 2, 3037, 3038, 7, 83, 2, 2, 3038, 598, 3, 2, 2, 2, 3039, 3040, 7, 91, 2, 2, 3040, 600, 3, 2, 2, 2, 3041, 3042, 5, 609, 305, 2, 3042, 602, 3, 2, 2, 2, 3043, 3045, 5, 619, 310, 2, 3044, 3043, 3, 2, 2, 2, 3045, 3046, 3, 2, 2, 2, 3046, 3044, 3, 2, 2, 2, 3046, 3047, 3, 2, 2, 2, 3047, 604, 3, 2, 2, 2, 3048, 3050, 5, 619, 310, 2, 3049, 3048, 3, 2, 2, 2, 3050, 3051, 3, 2, 2, 2, 3051, 3049, 3, 2, 2, 2, 3051, 3052, 3, 2, 2, 2, 3052, 3054, 3, 2, 2, 2, 3053, 3049, 3, 2, 2, 2, 3053, 3054, 3, 2, 2, 2, 3054, 3055, 3, 2, 2, 2, 3055, 3057, 7, 48, 2, 2, 3056, 3058, 5, 619, 310, 2, 3057, 3056, 3, 2, 2, 2, 3058, 3059, 3, 2, 2, 2, 3059, 3057, 3, 2, 2, 2, 3059, 3060, 3, 2, 2, 2, 3060, 606, 3, 2, 2, 2, 3061, 3063, 9, 2, 2, 2, 3062, 3064, 9, 3, 2, 2, 3063, 3062, 3, 2, 2, 2, 3064, 3065, 3, 2, 2, 2, 3065, 3063, 3, 2, 2, 2, 3065, 3066, 3, 2, 2, 2, 3066, 3068, 3, 2, 2, 2, 3067, 3061, 3, 2, 2, 2, 3068, 3071, 3, 2, 2, 2, 3069, 3067, 3, 2, 2, 2, 3069, 3070, 3, 2, 2, 2, 3070, 608, 3, 2, 2, 2, 3071, 3069, 3, 2, 2, 2, 3072, 3074, 9, 4, 2, 2, 3073, 3072, 3, 2, 2, 2, 3074, 3075, 3, 2, 2, 2, 3075, 3076, 3, 2, 2, 2, 3075, 3073, 3, 2, 2, 2, 3076, 3080, 3, 2, 2, 2, 3077, 3079, 9, 5, 2, 2, 3078, 3077, 3, 2, 2, 2, 3079, 3082, 3, 2, 2, 2, 3080, 3078, 3, 2, 2, 2, 3080, 3081, 3, 2, 2, 2, 3081, 610, 3, 2, 2, 2, 3082, 3080, 3, 2, 2, 2, 3083, 3084, 5, 609, 305, 2, 3084, 3085, 5, 607, 304, 2, 3085, 612, 3, 2, 2, 2, 3086, 3094, 7, 36, 2, 2, 3087, 3088, 7, 94, 2, 2, 3088, 3093, 11, 2, 2, 2, 3089, 3090, 7, 36, 2, 2, 3090, 3093, 7, 36, 2, 2, 3091, 3093, 10, 6, 2, 2, 3092, 3087, 3, 2, 2, 2, 3092, 3089, 3, 2, 2, 2, 3092, 3091, 3, 2, 2, 2, 3093, 3096, 3, 2, 2, 2, 3094, 3092, 3, 2, 2, 2, 3094, 3095, 3, 2, 2, 2, 3095, 3097, 3, 2, 2, 2, 3096, 3094, 3, 2, 2, 2, 3097, 3098, 7, 36, 2, 2, 3098, 614, 3, 2, 2, 2, 3099, 3107, 7, 41, 2, 2, 3100, 3101, 7, 94, 2, 2, 3101, 3106, 11, 2, 2, 2, 3102, 3103, 7, 41, 2, 2, 3103, 3106, 7, 41, 2, 2, 3104, 3106, 10, 7, 2, 2, 3105, 3100, 3, 2, 2, 2, 3105, 3102, 3, 2, 2, 2, 3105, 3104, 3, 2, 2, 2, 3106, 3109, 3, 2, 2, 2, 3107, 3105, 3, 2, 2, 2, 3107, 3108, 3, 2, 2, 2, 3108, 3110, 3, 2, 2, 2, 3109, 3107, 3, 2, 2, 2, 3110, 3111, 7, 41, 2, 2, 3111, 616, 3, 2, 2, 2, 3112, 3120, 7, 98, 2, 2, 3113, 3114, 7, 94, 2, 2, 3114, 3119, 11, 2, 2, 2, 3115, 3116, 7, 98, 2, 2, 3116, 3119, 7, 98, 2, 2, 3117, 3119, 10, 8, 2, 2, 3118, 3113, 3, 2, 2, 2, 3118, 3115, 3, 2, 2, 2, 3118, 3117, 3, 2, 2, 2, 3119, 3122, 3, 2, 2, 2, 3120, 3118, 3, 2, 2, 2, 3120, 3121, 3, 2, 2, 2, 3121, 3123, 3, 2, 2, 2, 3122, 3120, 3, 2, 2, 2, 3123, 3124, 7, 98, 2, 2, 3124, 618, 3, 2, 2, 2, 3125, 3126, 9, 9, 2, 2, 3126, 620, 3, 2, 2, 2, 3127, 3128, 11, 2, 2, 2, 3128, 3129, 3, 2, 2, 2, 3129, 3130, 8, 311, 2, 2, 3130, 622, 3, 2, 2, 2, 17, 2, 3046, 3051, 3053, 3059, 3065, 3069, 3075, 3080, 3092, 3094, 3105, 3107, 3118, 3120, 3, 2, 5, 2] \ No newline at end of file diff --git a/dashboards-observability/common/query_manager/antlr/output/OpenSearchPPLLexer.tokens b/dashboards-observability/common/query_manager/antlr/output/OpenSearchPPLLexer.tokens new file mode 100644 index 000000000..303e66c7a --- /dev/null +++ b/dashboards-observability/common/query_manager/antlr/output/OpenSearchPPLLexer.tokens @@ -0,0 +1,603 @@ +SEARCH=1 +DESCRIBE=2 +SHOW=3 +FROM=4 +WHERE=5 +FIELDS=6 +RENAME=7 +STATS=8 +DEDUP=9 +SORT=10 +EVAL=11 +HEAD=12 +TOP=13 +RARE=14 +PARSE=15 +METHOD=16 +REGEX=17 +PUNCT=18 +GROK=19 +PATTERN=20 +PATTERNS=21 +NEW_FIELD=22 +KMEANS=23 +AD=24 +ML=25 +AS=26 +BY=27 +SOURCE=28 +INDEX=29 +D=30 +DESC=31 +CATALOGS=32 +SORTBY=33 +AUTO=34 +STR=35 +IP=36 +NUM=37 +KEEPEMPTY=38 +CONSECUTIVE=39 +DEDUP_SPLITVALUES=40 +PARTITIONS=41 +ALLNUM=42 +DELIM=43 +CENTROIDS=44 +ITERATIONS=45 +DISTANCE_TYPE=46 +NUMBER_OF_TREES=47 +SHINGLE_SIZE=48 +SAMPLE_SIZE=49 +OUTPUT_AFTER=50 +TIME_DECAY=51 +ANOMALY_RATE=52 +CATEGORY_FIELD=53 +TIME_FIELD=54 +TIME_ZONE=55 +TRAINING_DATA_SIZE=56 +ANOMALY_SCORE_THRESHOLD=57 +CASE=58 +IN=59 +NOT=60 +OR=61 +AND=62 +XOR=63 +TRUE=64 +FALSE=65 +REGEXP=66 +DATETIME=67 +INTERVAL=68 +MICROSECOND=69 +MILLISECOND=70 +SECOND=71 +MINUTE=72 +HOUR=73 +DAY=74 +WEEK=75 +MONTH=76 +QUARTER=77 +YEAR=78 +SECOND_MICROSECOND=79 +MINUTE_MICROSECOND=80 +MINUTE_SECOND=81 +HOUR_MICROSECOND=82 +HOUR_SECOND=83 +HOUR_MINUTE=84 +DAY_MICROSECOND=85 +DAY_SECOND=86 +DAY_MINUTE=87 +DAY_HOUR=88 +YEAR_MONTH=89 +CONVERT_TZ=90 +DATAMODEL=91 +LOOKUP=92 +SAVEDSEARCH=93 +INT=94 +INTEGER=95 +DOUBLE=96 +LONG=97 +FLOAT=98 +STRING=99 +BOOLEAN=100 +PIPE=101 +COMMA=102 +DOT=103 +EQUAL=104 +GREATER=105 +LESS=106 +NOT_GREATER=107 +NOT_LESS=108 +NOT_EQUAL=109 +PLUS=110 +MINUS=111 +STAR=112 +DIVIDE=113 +MODULE=114 +EXCLAMATION_SYMBOL=115 +COLON=116 +LT_PRTHS=117 +RT_PRTHS=118 +LT_SQR_PRTHS=119 +RT_SQR_PRTHS=120 +SINGLE_QUOTE=121 +DOUBLE_QUOTE=122 +BACKTICK=123 +BIT_NOT_OP=124 +BIT_AND_OP=125 +BIT_XOR_OP=126 +AVG=127 +COUNT=128 +DISTINCT_COUNT=129 +ESTDC=130 +ESTDC_ERROR=131 +MAX=132 +MEAN=133 +MEDIAN=134 +MIN=135 +MODE=136 +RANGE=137 +STDEV=138 +STDEVP=139 +SUM=140 +SUMSQ=141 +VAR_SAMP=142 +VAR_POP=143 +STDDEV_SAMP=144 +STDDEV_POP=145 +PERCENTILE=146 +TAKE=147 +FIRST=148 +LAST=149 +LIST=150 +VALUES=151 +EARLIEST=152 +EARLIEST_TIME=153 +LATEST=154 +LATEST_TIME=155 +PER_DAY=156 +PER_HOUR=157 +PER_MINUTE=158 +PER_SECOND=159 +RATE=160 +SPARKLINE=161 +C=162 +DC=163 +ABS=164 +CEIL=165 +CEILING=166 +CONV=167 +CRC32=168 +E=169 +EXP=170 +FLOOR=171 +LN=172 +LOG=173 +LOG10=174 +LOG2=175 +MOD=176 +PI=177 +POW=178 +POWER=179 +RAND=180 +ROUND=181 +SIGN=182 +SQRT=183 +TRUNCATE=184 +ACOS=185 +ASIN=186 +ATAN=187 +ATAN2=188 +COS=189 +COT=190 +DEGREES=191 +RADIANS=192 +SIN=193 +TAN=194 +ADDDATE=195 +CURDATE=196 +CURRENT_DATE=197 +CURRENT_TIME=198 +CURRENT_TIMESTAMP=199 +CURTIME=200 +DATE=201 +DATE_ADD=202 +DATE_FORMAT=203 +DATE_SUB=204 +DAYNAME=205 +DAYOFMONTH=206 +DAYOFWEEK=207 +DAYOFYEAR=208 +FROM_DAYS=209 +LOCALTIME=210 +LOCALTIMESTAMP=211 +FROM_UNIXTIME=212 +MAKEDATE=213 +MAKETIME=214 +MONTHNAME=215 +NOW=216 +PERIOD_ADD=217 +PERIOD_DIFF=218 +SUBDATE=219 +SYSDATE=220 +TIME=221 +TIME_TO_SEC=222 +TIMESTAMP=223 +TO_DAYS=224 +UTC_DATE=225 +UTC_TIME=226 +UTC_TIMESTAMP=227 +UNIX_TIMESTAMP=228 +SUBSTR=229 +SUBSTRING=230 +LTRIM=231 +RTRIM=232 +TRIM=233 +TO=234 +LOWER=235 +UPPER=236 +CONCAT=237 +CONCAT_WS=238 +LENGTH=239 +STRCMP=240 +RIGHT=241 +LEFT=242 +ASCII=243 +LOCATE=244 +REPLACE=245 +CAST=246 +LIKE=247 +ISNULL=248 +ISNOTNULL=249 +IFNULL=250 +NULLIF=251 +IF=252 +TYPEOF=253 +MATCH=254 +MATCH_PHRASE=255 +MATCH_PHRASE_PREFIX=256 +MATCH_BOOL_PREFIX=257 +SIMPLE_QUERY_STRING=258 +MULTI_MATCH=259 +QUERY_STRING=260 +ALLOW_LEADING_WILDCARD=261 +ANALYZE_WILDCARD=262 +ANALYZER=263 +AUTO_GENERATE_SYNONYMS_PHRASE_QUERY=264 +BOOST=265 +CUTOFF_FREQUENCY=266 +DEFAULT_FIELD=267 +DEFAULT_OPERATOR=268 +ENABLE_POSITION_INCREMENTS=269 +ESCAPE=270 +FLAGS=271 +FUZZY_MAX_EXPANSIONS=272 +FUZZY_PREFIX_LENGTH=273 +FUZZY_TRANSPOSITIONS=274 +FUZZY_REWRITE=275 +FUZZINESS=276 +LENIENT=277 +LOW_FREQ_OPERATOR=278 +MAX_DETERMINIZED_STATES=279 +MAX_EXPANSIONS=280 +MINIMUM_SHOULD_MATCH=281 +OPERATOR=282 +PHRASE_SLOP=283 +PREFIX_LENGTH=284 +QUOTE_ANALYZER=285 +QUOTE_FIELD_SUFFIX=286 +REWRITE=287 +SLOP=288 +TIE_BREAKER=289 +TYPE=290 +ZERO_TERMS_QUERY=291 +SPAN=292 +MS=293 +S=294 +M=295 +H=296 +W=297 +Q=298 +Y=299 +ID=300 +INTEGER_LITERAL=301 +DECIMAL_LITERAL=302 +ID_DATE_SUFFIX=303 +DQUOTA_STRING=304 +SQUOTA_STRING=305 +BQUOTA_STRING=306 +ERROR_RECOGNITION=307 +'SEARCH'=1 +'DESCRIBE'=2 +'SHOW'=3 +'FROM'=4 +'WHERE'=5 +'FIELDS'=6 +'RENAME'=7 +'STATS'=8 +'DEDUP'=9 +'SORT'=10 +'EVAL'=11 +'HEAD'=12 +'TOP'=13 +'RARE'=14 +'PARSE'=15 +'METHOD'=16 +'REGEX'=17 +'PUNCT'=18 +'GROK'=19 +'PATTERN'=20 +'PATTERNS'=21 +'NEW_FIELD'=22 +'KMEANS'=23 +'AD'=24 +'ML'=25 +'AS'=26 +'BY'=27 +'SOURCE'=28 +'INDEX'=29 +'D'=30 +'DESC'=31 +'CATALOGS'=32 +'SORTBY'=33 +'AUTO'=34 +'STR'=35 +'IP'=36 +'NUM'=37 +'KEEPEMPTY'=38 +'CONSECUTIVE'=39 +'DEDUP_SPLITVALUES'=40 +'PARTITIONS'=41 +'ALLNUM'=42 +'DELIM'=43 +'CENTROIDS'=44 +'ITERATIONS'=45 +'DISTANCE_TYPE'=46 +'NUMBER_OF_TREES'=47 +'SHINGLE_SIZE'=48 +'SAMPLE_SIZE'=49 +'OUTPUT_AFTER'=50 +'TIME_DECAY'=51 +'ANOMALY_RATE'=52 +'CATEGORY_FIELD'=53 +'TIME_FIELD'=54 +'TIME_ZONE'=55 +'TRAINING_DATA_SIZE'=56 +'ANOMALY_SCORE_THRESHOLD'=57 +'CASE'=58 +'IN'=59 +'NOT'=60 +'OR'=61 +'AND'=62 +'XOR'=63 +'TRUE'=64 +'FALSE'=65 +'REGEXP'=66 +'DATETIME'=67 +'INTERVAL'=68 +'MICROSECOND'=69 +'MILLISECOND'=70 +'SECOND'=71 +'MINUTE'=72 +'HOUR'=73 +'DAY'=74 +'WEEK'=75 +'MONTH'=76 +'QUARTER'=77 +'YEAR'=78 +'SECOND_MICROSECOND'=79 +'MINUTE_MICROSECOND'=80 +'MINUTE_SECOND'=81 +'HOUR_MICROSECOND'=82 +'HOUR_SECOND'=83 +'HOUR_MINUTE'=84 +'DAY_MICROSECOND'=85 +'DAY_SECOND'=86 +'DAY_MINUTE'=87 +'DAY_HOUR'=88 +'YEAR_MONTH'=89 +'CONVERT_TZ'=90 +'DATAMODEL'=91 +'LOOKUP'=92 +'SAVEDSEARCH'=93 +'INT'=94 +'INTEGER'=95 +'DOUBLE'=96 +'LONG'=97 +'FLOAT'=98 +'STRING'=99 +'BOOLEAN'=100 +'|'=101 +','=102 +'.'=103 +'='=104 +'>'=105 +'<'=106 +'+'=110 +'-'=111 +'*'=112 +'/'=113 +'%'=114 +'!'=115 +':'=116 +'('=117 +')'=118 +'['=119 +']'=120 +'\''=121 +'"'=122 +'`'=123 +'~'=124 +'&'=125 +'^'=126 +'AVG'=127 +'COUNT'=128 +'DISTINCT_COUNT'=129 +'ESTDC'=130 +'ESTDC_ERROR'=131 +'MAX'=132 +'MEAN'=133 +'MEDIAN'=134 +'MIN'=135 +'MODE'=136 +'RANGE'=137 +'STDEV'=138 +'STDEVP'=139 +'SUM'=140 +'SUMSQ'=141 +'VAR_SAMP'=142 +'VAR_POP'=143 +'STDDEV_SAMP'=144 +'STDDEV_POP'=145 +'PERCENTILE'=146 +'TAKE'=147 +'FIRST'=148 +'LAST'=149 +'LIST'=150 +'VALUES'=151 +'EARLIEST'=152 +'EARLIEST_TIME'=153 +'LATEST'=154 +'LATEST_TIME'=155 +'PER_DAY'=156 +'PER_HOUR'=157 +'PER_MINUTE'=158 +'PER_SECOND'=159 +'RATE'=160 +'SPARKLINE'=161 +'C'=162 +'DC'=163 +'ABS'=164 +'CEIL'=165 +'CEILING'=166 +'CONV'=167 +'CRC32'=168 +'E'=169 +'EXP'=170 +'FLOOR'=171 +'LN'=172 +'LOG'=173 +'LOG10'=174 +'LOG2'=175 +'MOD'=176 +'PI'=177 +'POW'=178 +'POWER'=179 +'RAND'=180 +'ROUND'=181 +'SIGN'=182 +'SQRT'=183 +'TRUNCATE'=184 +'ACOS'=185 +'ASIN'=186 +'ATAN'=187 +'ATAN2'=188 +'COS'=189 +'COT'=190 +'DEGREES'=191 +'RADIANS'=192 +'SIN'=193 +'TAN'=194 +'ADDDATE'=195 +'CURDATE'=196 +'CURRENT_DATE'=197 +'CURRENT_TIME'=198 +'CURRENT_TIMESTAMP'=199 +'CURTIME'=200 +'DATE'=201 +'DATE_ADD'=202 +'DATE_FORMAT'=203 +'DATE_SUB'=204 +'DAYNAME'=205 +'DAYOFMONTH'=206 +'DAYOFWEEK'=207 +'DAYOFYEAR'=208 +'FROM_DAYS'=209 +'LOCALTIME'=210 +'LOCALTIMESTAMP'=211 +'FROM_UNIXTIME'=212 +'MAKEDATE'=213 +'MAKETIME'=214 +'MONTHNAME'=215 +'NOW'=216 +'PERIOD_ADD'=217 +'PERIOD_DIFF'=218 +'SUBDATE'=219 +'SYSDATE'=220 +'TIME'=221 +'TIME_TO_SEC'=222 +'TIMESTAMP'=223 +'TO_DAYS'=224 +'UTC_DATE'=225 +'UTC_TIME'=226 +'UTC_TIMESTAMP'=227 +'UNIX_TIMESTAMP'=228 +'SUBSTR'=229 +'SUBSTRING'=230 +'LTRIM'=231 +'RTRIM'=232 +'TRIM'=233 +'TO'=234 +'LOWER'=235 +'UPPER'=236 +'CONCAT'=237 +'CONCAT_WS'=238 +'LENGTH'=239 +'STRCMP'=240 +'RIGHT'=241 +'LEFT'=242 +'ASCII'=243 +'LOCATE'=244 +'REPLACE'=245 +'CAST'=246 +'LIKE'=247 +'ISNULL'=248 +'ISNOTNULL'=249 +'IFNULL'=250 +'NULLIF'=251 +'IF'=252 +'TYPEOF'=253 +'MATCH'=254 +'MATCH_PHRASE'=255 +'MATCH_PHRASE_PREFIX'=256 +'MATCH_BOOL_PREFIX'=257 +'SIMPLE_QUERY_STRING'=258 +'MULTI_MATCH'=259 +'QUERY_STRING'=260 +'ALLOW_LEADING_WILDCARD'=261 +'ANALYZE_WILDCARD'=262 +'ANALYZER'=263 +'AUTO_GENERATE_SYNONYMS_PHRASE_QUERY'=264 +'BOOST'=265 +'CUTOFF_FREQUENCY'=266 +'DEFAULT_FIELD'=267 +'DEFAULT_OPERATOR'=268 +'ENABLE_POSITION_INCREMENTS'=269 +'ESCAPE'=270 +'FLAGS'=271 +'FUZZY_MAX_EXPANSIONS'=272 +'FUZZY_PREFIX_LENGTH'=273 +'FUZZY_TRANSPOSITIONS'=274 +'FUZZY_REWRITE'=275 +'FUZZINESS'=276 +'LENIENT'=277 +'LOW_FREQ_OPERATOR'=278 +'MAX_DETERMINIZED_STATES'=279 +'MAX_EXPANSIONS'=280 +'MINIMUM_SHOULD_MATCH'=281 +'OPERATOR'=282 +'PHRASE_SLOP'=283 +'PREFIX_LENGTH'=284 +'QUOTE_ANALYZER'=285 +'QUOTE_FIELD_SUFFIX'=286 +'REWRITE'=287 +'SLOP'=288 +'TIE_BREAKER'=289 +'TYPE'=290 +'ZERO_TERMS_QUERY'=291 +'SPAN'=292 +'MS'=293 +'S'=294 +'M'=295 +'H'=296 +'W'=297 +'Q'=298 +'Y'=299 diff --git a/dashboards-observability/common/query_manager/antlr/output/OpenSearchPPLLexer.ts b/dashboards-observability/common/query_manager/antlr/output/OpenSearchPPLLexer.ts new file mode 100644 index 000000000..834c1d59e --- /dev/null +++ b/dashboards-observability/common/query_manager/antlr/output/OpenSearchPPLLexer.ts @@ -0,0 +1,2072 @@ +// Generated from ./common/query_manager/antlr/grammar/OpenSearchPPLLexer.g4 by ANTLR 4.9.0-SNAPSHOT + + +import { ATN } from "antlr4ts/atn/ATN"; +import { ATNDeserializer } from "antlr4ts/atn/ATNDeserializer"; +import { CharStream } from "antlr4ts/CharStream"; +import { Lexer } from "antlr4ts/Lexer"; +import { LexerATNSimulator } from "antlr4ts/atn/LexerATNSimulator"; +import { NotNull } from "antlr4ts/Decorators"; +import { Override } from "antlr4ts/Decorators"; +import { RuleContext } from "antlr4ts/RuleContext"; +import { Vocabulary } from "antlr4ts/Vocabulary"; +import { VocabularyImpl } from "antlr4ts/VocabularyImpl"; + +import * as Utils from "antlr4ts/misc/Utils"; + + +export class OpenSearchPPLLexer extends Lexer { + public static readonly SEARCH = 1; + public static readonly DESCRIBE = 2; + public static readonly SHOW = 3; + public static readonly FROM = 4; + public static readonly WHERE = 5; + public static readonly FIELDS = 6; + public static readonly RENAME = 7; + public static readonly STATS = 8; + public static readonly DEDUP = 9; + public static readonly SORT = 10; + public static readonly EVAL = 11; + public static readonly HEAD = 12; + public static readonly TOP = 13; + public static readonly RARE = 14; + public static readonly PARSE = 15; + public static readonly METHOD = 16; + public static readonly REGEX = 17; + public static readonly PUNCT = 18; + public static readonly GROK = 19; + public static readonly PATTERN = 20; + public static readonly PATTERNS = 21; + public static readonly NEW_FIELD = 22; + public static readonly KMEANS = 23; + public static readonly AD = 24; + public static readonly ML = 25; + public static readonly AS = 26; + public static readonly BY = 27; + public static readonly SOURCE = 28; + public static readonly INDEX = 29; + public static readonly D = 30; + public static readonly DESC = 31; + public static readonly CATALOGS = 32; + public static readonly SORTBY = 33; + public static readonly AUTO = 34; + public static readonly STR = 35; + public static readonly IP = 36; + public static readonly NUM = 37; + public static readonly KEEPEMPTY = 38; + public static readonly CONSECUTIVE = 39; + public static readonly DEDUP_SPLITVALUES = 40; + public static readonly PARTITIONS = 41; + public static readonly ALLNUM = 42; + public static readonly DELIM = 43; + public static readonly CENTROIDS = 44; + public static readonly ITERATIONS = 45; + public static readonly DISTANCE_TYPE = 46; + public static readonly NUMBER_OF_TREES = 47; + public static readonly SHINGLE_SIZE = 48; + public static readonly SAMPLE_SIZE = 49; + public static readonly OUTPUT_AFTER = 50; + public static readonly TIME_DECAY = 51; + public static readonly ANOMALY_RATE = 52; + public static readonly CATEGORY_FIELD = 53; + public static readonly TIME_FIELD = 54; + public static readonly TIME_ZONE = 55; + public static readonly TRAINING_DATA_SIZE = 56; + public static readonly ANOMALY_SCORE_THRESHOLD = 57; + public static readonly CASE = 58; + public static readonly IN = 59; + public static readonly NOT = 60; + public static readonly OR = 61; + public static readonly AND = 62; + public static readonly XOR = 63; + public static readonly TRUE = 64; + public static readonly FALSE = 65; + public static readonly REGEXP = 66; + public static readonly DATETIME = 67; + public static readonly INTERVAL = 68; + public static readonly MICROSECOND = 69; + public static readonly MILLISECOND = 70; + public static readonly SECOND = 71; + public static readonly MINUTE = 72; + public static readonly HOUR = 73; + public static readonly DAY = 74; + public static readonly WEEK = 75; + public static readonly MONTH = 76; + public static readonly QUARTER = 77; + public static readonly YEAR = 78; + public static readonly SECOND_MICROSECOND = 79; + public static readonly MINUTE_MICROSECOND = 80; + public static readonly MINUTE_SECOND = 81; + public static readonly HOUR_MICROSECOND = 82; + public static readonly HOUR_SECOND = 83; + public static readonly HOUR_MINUTE = 84; + public static readonly DAY_MICROSECOND = 85; + public static readonly DAY_SECOND = 86; + public static readonly DAY_MINUTE = 87; + public static readonly DAY_HOUR = 88; + public static readonly YEAR_MONTH = 89; + public static readonly CONVERT_TZ = 90; + public static readonly DATAMODEL = 91; + public static readonly LOOKUP = 92; + public static readonly SAVEDSEARCH = 93; + public static readonly INT = 94; + public static readonly INTEGER = 95; + public static readonly DOUBLE = 96; + public static readonly LONG = 97; + public static readonly FLOAT = 98; + public static readonly STRING = 99; + public static readonly BOOLEAN = 100; + public static readonly PIPE = 101; + public static readonly COMMA = 102; + public static readonly DOT = 103; + public static readonly EQUAL = 104; + public static readonly GREATER = 105; + public static readonly LESS = 106; + public static readonly NOT_GREATER = 107; + public static readonly NOT_LESS = 108; + public static readonly NOT_EQUAL = 109; + public static readonly PLUS = 110; + public static readonly MINUS = 111; + public static readonly STAR = 112; + public static readonly DIVIDE = 113; + public static readonly MODULE = 114; + public static readonly EXCLAMATION_SYMBOL = 115; + public static readonly COLON = 116; + public static readonly LT_PRTHS = 117; + public static readonly RT_PRTHS = 118; + public static readonly LT_SQR_PRTHS = 119; + public static readonly RT_SQR_PRTHS = 120; + public static readonly SINGLE_QUOTE = 121; + public static readonly DOUBLE_QUOTE = 122; + public static readonly BACKTICK = 123; + public static readonly BIT_NOT_OP = 124; + public static readonly BIT_AND_OP = 125; + public static readonly BIT_XOR_OP = 126; + public static readonly AVG = 127; + public static readonly COUNT = 128; + public static readonly DISTINCT_COUNT = 129; + public static readonly ESTDC = 130; + public static readonly ESTDC_ERROR = 131; + public static readonly MAX = 132; + public static readonly MEAN = 133; + public static readonly MEDIAN = 134; + public static readonly MIN = 135; + public static readonly MODE = 136; + public static readonly RANGE = 137; + public static readonly STDEV = 138; + public static readonly STDEVP = 139; + public static readonly SUM = 140; + public static readonly SUMSQ = 141; + public static readonly VAR_SAMP = 142; + public static readonly VAR_POP = 143; + public static readonly STDDEV_SAMP = 144; + public static readonly STDDEV_POP = 145; + public static readonly PERCENTILE = 146; + public static readonly TAKE = 147; + public static readonly FIRST = 148; + public static readonly LAST = 149; + public static readonly LIST = 150; + public static readonly VALUES = 151; + public static readonly EARLIEST = 152; + public static readonly EARLIEST_TIME = 153; + public static readonly LATEST = 154; + public static readonly LATEST_TIME = 155; + public static readonly PER_DAY = 156; + public static readonly PER_HOUR = 157; + public static readonly PER_MINUTE = 158; + public static readonly PER_SECOND = 159; + public static readonly RATE = 160; + public static readonly SPARKLINE = 161; + public static readonly C = 162; + public static readonly DC = 163; + public static readonly ABS = 164; + public static readonly CEIL = 165; + public static readonly CEILING = 166; + public static readonly CONV = 167; + public static readonly CRC32 = 168; + public static readonly E = 169; + public static readonly EXP = 170; + public static readonly FLOOR = 171; + public static readonly LN = 172; + public static readonly LOG = 173; + public static readonly LOG10 = 174; + public static readonly LOG2 = 175; + public static readonly MOD = 176; + public static readonly PI = 177; + public static readonly POW = 178; + public static readonly POWER = 179; + public static readonly RAND = 180; + public static readonly ROUND = 181; + public static readonly SIGN = 182; + public static readonly SQRT = 183; + public static readonly TRUNCATE = 184; + public static readonly ACOS = 185; + public static readonly ASIN = 186; + public static readonly ATAN = 187; + public static readonly ATAN2 = 188; + public static readonly COS = 189; + public static readonly COT = 190; + public static readonly DEGREES = 191; + public static readonly RADIANS = 192; + public static readonly SIN = 193; + public static readonly TAN = 194; + public static readonly ADDDATE = 195; + public static readonly CURDATE = 196; + public static readonly CURRENT_DATE = 197; + public static readonly CURRENT_TIME = 198; + public static readonly CURRENT_TIMESTAMP = 199; + public static readonly CURTIME = 200; + public static readonly DATE = 201; + public static readonly DATE_ADD = 202; + public static readonly DATE_FORMAT = 203; + public static readonly DATE_SUB = 204; + public static readonly DAYNAME = 205; + public static readonly DAYOFMONTH = 206; + public static readonly DAYOFWEEK = 207; + public static readonly DAYOFYEAR = 208; + public static readonly FROM_DAYS = 209; + public static readonly LOCALTIME = 210; + public static readonly LOCALTIMESTAMP = 211; + public static readonly FROM_UNIXTIME = 212; + public static readonly MAKEDATE = 213; + public static readonly MAKETIME = 214; + public static readonly MONTHNAME = 215; + public static readonly NOW = 216; + public static readonly PERIOD_ADD = 217; + public static readonly PERIOD_DIFF = 218; + public static readonly SUBDATE = 219; + public static readonly SYSDATE = 220; + public static readonly TIME = 221; + public static readonly TIME_TO_SEC = 222; + public static readonly TIMESTAMP = 223; + public static readonly TO_DAYS = 224; + public static readonly UTC_DATE = 225; + public static readonly UTC_TIME = 226; + public static readonly UTC_TIMESTAMP = 227; + public static readonly UNIX_TIMESTAMP = 228; + public static readonly SUBSTR = 229; + public static readonly SUBSTRING = 230; + public static readonly LTRIM = 231; + public static readonly RTRIM = 232; + public static readonly TRIM = 233; + public static readonly TO = 234; + public static readonly LOWER = 235; + public static readonly UPPER = 236; + public static readonly CONCAT = 237; + public static readonly CONCAT_WS = 238; + public static readonly LENGTH = 239; + public static readonly STRCMP = 240; + public static readonly RIGHT = 241; + public static readonly LEFT = 242; + public static readonly ASCII = 243; + public static readonly LOCATE = 244; + public static readonly REPLACE = 245; + public static readonly CAST = 246; + public static readonly LIKE = 247; + public static readonly ISNULL = 248; + public static readonly ISNOTNULL = 249; + public static readonly IFNULL = 250; + public static readonly NULLIF = 251; + public static readonly IF = 252; + public static readonly TYPEOF = 253; + public static readonly MATCH = 254; + public static readonly MATCH_PHRASE = 255; + public static readonly MATCH_PHRASE_PREFIX = 256; + public static readonly MATCH_BOOL_PREFIX = 257; + public static readonly SIMPLE_QUERY_STRING = 258; + public static readonly MULTI_MATCH = 259; + public static readonly QUERY_STRING = 260; + public static readonly ALLOW_LEADING_WILDCARD = 261; + public static readonly ANALYZE_WILDCARD = 262; + public static readonly ANALYZER = 263; + public static readonly AUTO_GENERATE_SYNONYMS_PHRASE_QUERY = 264; + public static readonly BOOST = 265; + public static readonly CUTOFF_FREQUENCY = 266; + public static readonly DEFAULT_FIELD = 267; + public static readonly DEFAULT_OPERATOR = 268; + public static readonly ENABLE_POSITION_INCREMENTS = 269; + public static readonly ESCAPE = 270; + public static readonly FLAGS = 271; + public static readonly FUZZY_MAX_EXPANSIONS = 272; + public static readonly FUZZY_PREFIX_LENGTH = 273; + public static readonly FUZZY_TRANSPOSITIONS = 274; + public static readonly FUZZY_REWRITE = 275; + public static readonly FUZZINESS = 276; + public static readonly LENIENT = 277; + public static readonly LOW_FREQ_OPERATOR = 278; + public static readonly MAX_DETERMINIZED_STATES = 279; + public static readonly MAX_EXPANSIONS = 280; + public static readonly MINIMUM_SHOULD_MATCH = 281; + public static readonly OPERATOR = 282; + public static readonly PHRASE_SLOP = 283; + public static readonly PREFIX_LENGTH = 284; + public static readonly QUOTE_ANALYZER = 285; + public static readonly QUOTE_FIELD_SUFFIX = 286; + public static readonly REWRITE = 287; + public static readonly SLOP = 288; + public static readonly TIE_BREAKER = 289; + public static readonly TYPE = 290; + public static readonly ZERO_TERMS_QUERY = 291; + public static readonly SPAN = 292; + public static readonly MS = 293; + public static readonly S = 294; + public static readonly M = 295; + public static readonly H = 296; + public static readonly W = 297; + public static readonly Q = 298; + public static readonly Y = 299; + public static readonly ID = 300; + public static readonly INTEGER_LITERAL = 301; + public static readonly DECIMAL_LITERAL = 302; + public static readonly ID_DATE_SUFFIX = 303; + public static readonly DQUOTA_STRING = 304; + public static readonly SQUOTA_STRING = 305; + public static readonly BQUOTA_STRING = 306; + public static readonly ERROR_RECOGNITION = 307; + public static readonly WHITESPACE = 2; + public static readonly ERRORCHANNEL = 3; + + // tslint:disable:no-trailing-whitespace + public static readonly channelNames: string[] = [ + "DEFAULT_TOKEN_CHANNEL", "HIDDEN", "WHITESPACE", "ERRORCHANNEL", + ]; + + // tslint:disable:no-trailing-whitespace + public static readonly modeNames: string[] = [ + "DEFAULT_MODE", + ]; + + public static readonly ruleNames: string[] = [ + "SEARCH", "DESCRIBE", "SHOW", "FROM", "WHERE", "FIELDS", "RENAME", "STATS", + "DEDUP", "SORT", "EVAL", "HEAD", "TOP", "RARE", "PARSE", "METHOD", "REGEX", + "PUNCT", "GROK", "PATTERN", "PATTERNS", "NEW_FIELD", "KMEANS", "AD", "ML", + "AS", "BY", "SOURCE", "INDEX", "D", "DESC", "CATALOGS", "SORTBY", "AUTO", + "STR", "IP", "NUM", "KEEPEMPTY", "CONSECUTIVE", "DEDUP_SPLITVALUES", "PARTITIONS", + "ALLNUM", "DELIM", "CENTROIDS", "ITERATIONS", "DISTANCE_TYPE", "NUMBER_OF_TREES", + "SHINGLE_SIZE", "SAMPLE_SIZE", "OUTPUT_AFTER", "TIME_DECAY", "ANOMALY_RATE", + "CATEGORY_FIELD", "TIME_FIELD", "TIME_ZONE", "TRAINING_DATA_SIZE", "ANOMALY_SCORE_THRESHOLD", + "CASE", "IN", "NOT", "OR", "AND", "XOR", "TRUE", "FALSE", "REGEXP", "DATETIME", + "INTERVAL", "MICROSECOND", "MILLISECOND", "SECOND", "MINUTE", "HOUR", + "DAY", "WEEK", "MONTH", "QUARTER", "YEAR", "SECOND_MICROSECOND", "MINUTE_MICROSECOND", + "MINUTE_SECOND", "HOUR_MICROSECOND", "HOUR_SECOND", "HOUR_MINUTE", "DAY_MICROSECOND", + "DAY_SECOND", "DAY_MINUTE", "DAY_HOUR", "YEAR_MONTH", "CONVERT_TZ", "DATAMODEL", + "LOOKUP", "SAVEDSEARCH", "INT", "INTEGER", "DOUBLE", "LONG", "FLOAT", + "STRING", "BOOLEAN", "PIPE", "COMMA", "DOT", "EQUAL", "GREATER", "LESS", + "NOT_GREATER", "NOT_LESS", "NOT_EQUAL", "PLUS", "MINUS", "STAR", "DIVIDE", + "MODULE", "EXCLAMATION_SYMBOL", "COLON", "LT_PRTHS", "RT_PRTHS", "LT_SQR_PRTHS", + "RT_SQR_PRTHS", "SINGLE_QUOTE", "DOUBLE_QUOTE", "BACKTICK", "BIT_NOT_OP", + "BIT_AND_OP", "BIT_XOR_OP", "AVG", "COUNT", "DISTINCT_COUNT", "ESTDC", + "ESTDC_ERROR", "MAX", "MEAN", "MEDIAN", "MIN", "MODE", "RANGE", "STDEV", + "STDEVP", "SUM", "SUMSQ", "VAR_SAMP", "VAR_POP", "STDDEV_SAMP", "STDDEV_POP", + "PERCENTILE", "TAKE", "FIRST", "LAST", "LIST", "VALUES", "EARLIEST", "EARLIEST_TIME", + "LATEST", "LATEST_TIME", "PER_DAY", "PER_HOUR", "PER_MINUTE", "PER_SECOND", + "RATE", "SPARKLINE", "C", "DC", "ABS", "CEIL", "CEILING", "CONV", "CRC32", + "E", "EXP", "FLOOR", "LN", "LOG", "LOG10", "LOG2", "MOD", "PI", "POW", + "POWER", "RAND", "ROUND", "SIGN", "SQRT", "TRUNCATE", "ACOS", "ASIN", + "ATAN", "ATAN2", "COS", "COT", "DEGREES", "RADIANS", "SIN", "TAN", "ADDDATE", + "CURDATE", "CURRENT_DATE", "CURRENT_TIME", "CURRENT_TIMESTAMP", "CURTIME", + "DATE", "DATE_ADD", "DATE_FORMAT", "DATE_SUB", "DAYNAME", "DAYOFMONTH", + "DAYOFWEEK", "DAYOFYEAR", "FROM_DAYS", "LOCALTIME", "LOCALTIMESTAMP", + "FROM_UNIXTIME", "MAKEDATE", "MAKETIME", "MONTHNAME", "NOW", "PERIOD_ADD", + "PERIOD_DIFF", "SUBDATE", "SYSDATE", "TIME", "TIME_TO_SEC", "TIMESTAMP", + "TO_DAYS", "UTC_DATE", "UTC_TIME", "UTC_TIMESTAMP", "UNIX_TIMESTAMP", + "SUBSTR", "SUBSTRING", "LTRIM", "RTRIM", "TRIM", "TO", "LOWER", "UPPER", + "CONCAT", "CONCAT_WS", "LENGTH", "STRCMP", "RIGHT", "LEFT", "ASCII", "LOCATE", + "REPLACE", "CAST", "LIKE", "ISNULL", "ISNOTNULL", "IFNULL", "NULLIF", + "IF", "TYPEOF", "MATCH", "MATCH_PHRASE", "MATCH_PHRASE_PREFIX", "MATCH_BOOL_PREFIX", + "SIMPLE_QUERY_STRING", "MULTI_MATCH", "QUERY_STRING", "ALLOW_LEADING_WILDCARD", + "ANALYZE_WILDCARD", "ANALYZER", "AUTO_GENERATE_SYNONYMS_PHRASE_QUERY", + "BOOST", "CUTOFF_FREQUENCY", "DEFAULT_FIELD", "DEFAULT_OPERATOR", "ENABLE_POSITION_INCREMENTS", + "ESCAPE", "FLAGS", "FUZZY_MAX_EXPANSIONS", "FUZZY_PREFIX_LENGTH", "FUZZY_TRANSPOSITIONS", + "FUZZY_REWRITE", "FUZZINESS", "LENIENT", "LOW_FREQ_OPERATOR", "MAX_DETERMINIZED_STATES", + "MAX_EXPANSIONS", "MINIMUM_SHOULD_MATCH", "OPERATOR", "PHRASE_SLOP", "PREFIX_LENGTH", + "QUOTE_ANALYZER", "QUOTE_FIELD_SUFFIX", "REWRITE", "SLOP", "TIE_BREAKER", + "TYPE", "ZERO_TERMS_QUERY", "SPAN", "MS", "S", "M", "H", "W", "Q", "Y", + "ID", "INTEGER_LITERAL", "DECIMAL_LITERAL", "DATE_SUFFIX", "ID_LITERAL", + "ID_DATE_SUFFIX", "DQUOTA_STRING", "SQUOTA_STRING", "BQUOTA_STRING", "DEC_DIGIT", + "ERROR_RECOGNITION", + ]; + + private static readonly _LITERAL_NAMES: Array = [ + undefined, "'SEARCH'", "'DESCRIBE'", "'SHOW'", "'FROM'", "'WHERE'", "'FIELDS'", + "'RENAME'", "'STATS'", "'DEDUP'", "'SORT'", "'EVAL'", "'HEAD'", "'TOP'", + "'RARE'", "'PARSE'", "'METHOD'", "'REGEX'", "'PUNCT'", "'GROK'", "'PATTERN'", + "'PATTERNS'", "'NEW_FIELD'", "'KMEANS'", "'AD'", "'ML'", "'AS'", "'BY'", + "'SOURCE'", "'INDEX'", "'D'", "'DESC'", "'CATALOGS'", "'SORTBY'", "'AUTO'", + "'STR'", "'IP'", "'NUM'", "'KEEPEMPTY'", "'CONSECUTIVE'", "'DEDUP_SPLITVALUES'", + "'PARTITIONS'", "'ALLNUM'", "'DELIM'", "'CENTROIDS'", "'ITERATIONS'", + "'DISTANCE_TYPE'", "'NUMBER_OF_TREES'", "'SHINGLE_SIZE'", "'SAMPLE_SIZE'", + "'OUTPUT_AFTER'", "'TIME_DECAY'", "'ANOMALY_RATE'", "'CATEGORY_FIELD'", + "'TIME_FIELD'", "'TIME_ZONE'", "'TRAINING_DATA_SIZE'", "'ANOMALY_SCORE_THRESHOLD'", + "'CASE'", "'IN'", "'NOT'", "'OR'", "'AND'", "'XOR'", "'TRUE'", "'FALSE'", + "'REGEXP'", "'DATETIME'", "'INTERVAL'", "'MICROSECOND'", "'MILLISECOND'", + "'SECOND'", "'MINUTE'", "'HOUR'", "'DAY'", "'WEEK'", "'MONTH'", "'QUARTER'", + "'YEAR'", "'SECOND_MICROSECOND'", "'MINUTE_MICROSECOND'", "'MINUTE_SECOND'", + "'HOUR_MICROSECOND'", "'HOUR_SECOND'", "'HOUR_MINUTE'", "'DAY_MICROSECOND'", + "'DAY_SECOND'", "'DAY_MINUTE'", "'DAY_HOUR'", "'YEAR_MONTH'", "'CONVERT_TZ'", + "'DATAMODEL'", "'LOOKUP'", "'SAVEDSEARCH'", "'INT'", "'INTEGER'", "'DOUBLE'", + "'LONG'", "'FLOAT'", "'STRING'", "'BOOLEAN'", "'|'", "','", "'.'", "'='", + "'>'", "'<'", undefined, undefined, undefined, "'+'", "'-'", "'*'", "'/'", + "'%'", "'!'", "':'", "'('", "')'", "'['", "']'", "'''", "'\"'", "'`'", + "'~'", "'&'", "'^'", "'AVG'", "'COUNT'", "'DISTINCT_COUNT'", "'ESTDC'", + "'ESTDC_ERROR'", "'MAX'", "'MEAN'", "'MEDIAN'", "'MIN'", "'MODE'", "'RANGE'", + "'STDEV'", "'STDEVP'", "'SUM'", "'SUMSQ'", "'VAR_SAMP'", "'VAR_POP'", + "'STDDEV_SAMP'", "'STDDEV_POP'", "'PERCENTILE'", "'TAKE'", "'FIRST'", + "'LAST'", "'LIST'", "'VALUES'", "'EARLIEST'", "'EARLIEST_TIME'", "'LATEST'", + "'LATEST_TIME'", "'PER_DAY'", "'PER_HOUR'", "'PER_MINUTE'", "'PER_SECOND'", + "'RATE'", "'SPARKLINE'", "'C'", "'DC'", "'ABS'", "'CEIL'", "'CEILING'", + "'CONV'", "'CRC32'", "'E'", "'EXP'", "'FLOOR'", "'LN'", "'LOG'", "'LOG10'", + "'LOG2'", "'MOD'", "'PI'", "'POW'", "'POWER'", "'RAND'", "'ROUND'", "'SIGN'", + "'SQRT'", "'TRUNCATE'", "'ACOS'", "'ASIN'", "'ATAN'", "'ATAN2'", "'COS'", + "'COT'", "'DEGREES'", "'RADIANS'", "'SIN'", "'TAN'", "'ADDDATE'", "'CURDATE'", + "'CURRENT_DATE'", "'CURRENT_TIME'", "'CURRENT_TIMESTAMP'", "'CURTIME'", + "'DATE'", "'DATE_ADD'", "'DATE_FORMAT'", "'DATE_SUB'", "'DAYNAME'", "'DAYOFMONTH'", + "'DAYOFWEEK'", "'DAYOFYEAR'", "'FROM_DAYS'", "'LOCALTIME'", "'LOCALTIMESTAMP'", + "'FROM_UNIXTIME'", "'MAKEDATE'", "'MAKETIME'", "'MONTHNAME'", "'NOW'", + "'PERIOD_ADD'", "'PERIOD_DIFF'", "'SUBDATE'", "'SYSDATE'", "'TIME'", "'TIME_TO_SEC'", + "'TIMESTAMP'", "'TO_DAYS'", "'UTC_DATE'", "'UTC_TIME'", "'UTC_TIMESTAMP'", + "'UNIX_TIMESTAMP'", "'SUBSTR'", "'SUBSTRING'", "'LTRIM'", "'RTRIM'", "'TRIM'", + "'TO'", "'LOWER'", "'UPPER'", "'CONCAT'", "'CONCAT_WS'", "'LENGTH'", "'STRCMP'", + "'RIGHT'", "'LEFT'", "'ASCII'", "'LOCATE'", "'REPLACE'", "'CAST'", "'LIKE'", + "'ISNULL'", "'ISNOTNULL'", "'IFNULL'", "'NULLIF'", "'IF'", "'TYPEOF'", + "'MATCH'", "'MATCH_PHRASE'", "'MATCH_PHRASE_PREFIX'", "'MATCH_BOOL_PREFIX'", + "'SIMPLE_QUERY_STRING'", "'MULTI_MATCH'", "'QUERY_STRING'", "'ALLOW_LEADING_WILDCARD'", + "'ANALYZE_WILDCARD'", "'ANALYZER'", "'AUTO_GENERATE_SYNONYMS_PHRASE_QUERY'", + "'BOOST'", "'CUTOFF_FREQUENCY'", "'DEFAULT_FIELD'", "'DEFAULT_OPERATOR'", + "'ENABLE_POSITION_INCREMENTS'", "'ESCAPE'", "'FLAGS'", "'FUZZY_MAX_EXPANSIONS'", + "'FUZZY_PREFIX_LENGTH'", "'FUZZY_TRANSPOSITIONS'", "'FUZZY_REWRITE'", + "'FUZZINESS'", "'LENIENT'", "'LOW_FREQ_OPERATOR'", "'MAX_DETERMINIZED_STATES'", + "'MAX_EXPANSIONS'", "'MINIMUM_SHOULD_MATCH'", "'OPERATOR'", "'PHRASE_SLOP'", + "'PREFIX_LENGTH'", "'QUOTE_ANALYZER'", "'QUOTE_FIELD_SUFFIX'", "'REWRITE'", + "'SLOP'", "'TIE_BREAKER'", "'TYPE'", "'ZERO_TERMS_QUERY'", "'SPAN'", "'MS'", + "'S'", "'M'", "'H'", "'W'", "'Q'", "'Y'", + ]; + private static readonly _SYMBOLIC_NAMES: Array = [ + undefined, "SEARCH", "DESCRIBE", "SHOW", "FROM", "WHERE", "FIELDS", "RENAME", + "STATS", "DEDUP", "SORT", "EVAL", "HEAD", "TOP", "RARE", "PARSE", "METHOD", + "REGEX", "PUNCT", "GROK", "PATTERN", "PATTERNS", "NEW_FIELD", "KMEANS", + "AD", "ML", "AS", "BY", "SOURCE", "INDEX", "D", "DESC", "CATALOGS", "SORTBY", + "AUTO", "STR", "IP", "NUM", "KEEPEMPTY", "CONSECUTIVE", "DEDUP_SPLITVALUES", + "PARTITIONS", "ALLNUM", "DELIM", "CENTROIDS", "ITERATIONS", "DISTANCE_TYPE", + "NUMBER_OF_TREES", "SHINGLE_SIZE", "SAMPLE_SIZE", "OUTPUT_AFTER", "TIME_DECAY", + "ANOMALY_RATE", "CATEGORY_FIELD", "TIME_FIELD", "TIME_ZONE", "TRAINING_DATA_SIZE", + "ANOMALY_SCORE_THRESHOLD", "CASE", "IN", "NOT", "OR", "AND", "XOR", "TRUE", + "FALSE", "REGEXP", "DATETIME", "INTERVAL", "MICROSECOND", "MILLISECOND", + "SECOND", "MINUTE", "HOUR", "DAY", "WEEK", "MONTH", "QUARTER", "YEAR", + "SECOND_MICROSECOND", "MINUTE_MICROSECOND", "MINUTE_SECOND", "HOUR_MICROSECOND", + "HOUR_SECOND", "HOUR_MINUTE", "DAY_MICROSECOND", "DAY_SECOND", "DAY_MINUTE", + "DAY_HOUR", "YEAR_MONTH", "CONVERT_TZ", "DATAMODEL", "LOOKUP", "SAVEDSEARCH", + "INT", "INTEGER", "DOUBLE", "LONG", "FLOAT", "STRING", "BOOLEAN", "PIPE", + "COMMA", "DOT", "EQUAL", "GREATER", "LESS", "NOT_GREATER", "NOT_LESS", + "NOT_EQUAL", "PLUS", "MINUS", "STAR", "DIVIDE", "MODULE", "EXCLAMATION_SYMBOL", + "COLON", "LT_PRTHS", "RT_PRTHS", "LT_SQR_PRTHS", "RT_SQR_PRTHS", "SINGLE_QUOTE", + "DOUBLE_QUOTE", "BACKTICK", "BIT_NOT_OP", "BIT_AND_OP", "BIT_XOR_OP", + "AVG", "COUNT", "DISTINCT_COUNT", "ESTDC", "ESTDC_ERROR", "MAX", "MEAN", + "MEDIAN", "MIN", "MODE", "RANGE", "STDEV", "STDEVP", "SUM", "SUMSQ", "VAR_SAMP", + "VAR_POP", "STDDEV_SAMP", "STDDEV_POP", "PERCENTILE", "TAKE", "FIRST", + "LAST", "LIST", "VALUES", "EARLIEST", "EARLIEST_TIME", "LATEST", "LATEST_TIME", + "PER_DAY", "PER_HOUR", "PER_MINUTE", "PER_SECOND", "RATE", "SPARKLINE", + "C", "DC", "ABS", "CEIL", "CEILING", "CONV", "CRC32", "E", "EXP", "FLOOR", + "LN", "LOG", "LOG10", "LOG2", "MOD", "PI", "POW", "POWER", "RAND", "ROUND", + "SIGN", "SQRT", "TRUNCATE", "ACOS", "ASIN", "ATAN", "ATAN2", "COS", "COT", + "DEGREES", "RADIANS", "SIN", "TAN", "ADDDATE", "CURDATE", "CURRENT_DATE", + "CURRENT_TIME", "CURRENT_TIMESTAMP", "CURTIME", "DATE", "DATE_ADD", "DATE_FORMAT", + "DATE_SUB", "DAYNAME", "DAYOFMONTH", "DAYOFWEEK", "DAYOFYEAR", "FROM_DAYS", + "LOCALTIME", "LOCALTIMESTAMP", "FROM_UNIXTIME", "MAKEDATE", "MAKETIME", + "MONTHNAME", "NOW", "PERIOD_ADD", "PERIOD_DIFF", "SUBDATE", "SYSDATE", + "TIME", "TIME_TO_SEC", "TIMESTAMP", "TO_DAYS", "UTC_DATE", "UTC_TIME", + "UTC_TIMESTAMP", "UNIX_TIMESTAMP", "SUBSTR", "SUBSTRING", "LTRIM", "RTRIM", + "TRIM", "TO", "LOWER", "UPPER", "CONCAT", "CONCAT_WS", "LENGTH", "STRCMP", + "RIGHT", "LEFT", "ASCII", "LOCATE", "REPLACE", "CAST", "LIKE", "ISNULL", + "ISNOTNULL", "IFNULL", "NULLIF", "IF", "TYPEOF", "MATCH", "MATCH_PHRASE", + "MATCH_PHRASE_PREFIX", "MATCH_BOOL_PREFIX", "SIMPLE_QUERY_STRING", "MULTI_MATCH", + "QUERY_STRING", "ALLOW_LEADING_WILDCARD", "ANALYZE_WILDCARD", "ANALYZER", + "AUTO_GENERATE_SYNONYMS_PHRASE_QUERY", "BOOST", "CUTOFF_FREQUENCY", "DEFAULT_FIELD", + "DEFAULT_OPERATOR", "ENABLE_POSITION_INCREMENTS", "ESCAPE", "FLAGS", "FUZZY_MAX_EXPANSIONS", + "FUZZY_PREFIX_LENGTH", "FUZZY_TRANSPOSITIONS", "FUZZY_REWRITE", "FUZZINESS", + "LENIENT", "LOW_FREQ_OPERATOR", "MAX_DETERMINIZED_STATES", "MAX_EXPANSIONS", + "MINIMUM_SHOULD_MATCH", "OPERATOR", "PHRASE_SLOP", "PREFIX_LENGTH", "QUOTE_ANALYZER", + "QUOTE_FIELD_SUFFIX", "REWRITE", "SLOP", "TIE_BREAKER", "TYPE", "ZERO_TERMS_QUERY", + "SPAN", "MS", "S", "M", "H", "W", "Q", "Y", "ID", "INTEGER_LITERAL", "DECIMAL_LITERAL", + "ID_DATE_SUFFIX", "DQUOTA_STRING", "SQUOTA_STRING", "BQUOTA_STRING", "ERROR_RECOGNITION", + ]; + public static readonly VOCABULARY: Vocabulary = new VocabularyImpl(OpenSearchPPLLexer._LITERAL_NAMES, OpenSearchPPLLexer._SYMBOLIC_NAMES, []); + + // @Override + // @NotNull + public get vocabulary(): Vocabulary { + return OpenSearchPPLLexer.VOCABULARY; + } + // tslint:enable:no-trailing-whitespace + + + constructor(input: CharStream) { + super(input); + this._interp = new LexerATNSimulator(OpenSearchPPLLexer._ATN, this); + } + + // @Override + public get grammarFileName(): string { return "OpenSearchPPLLexer.g4"; } + + // @Override + public get ruleNames(): string[] { return OpenSearchPPLLexer.ruleNames; } + + // @Override + public get serializedATN(): string { return OpenSearchPPLLexer._serializedATN; } + + // @Override + public get channelNames(): string[] { return OpenSearchPPLLexer.channelNames; } + + // @Override + public get modeNames(): string[] { return OpenSearchPPLLexer.modeNames; } + + private static readonly _serializedATNSegments: number = 6; + private static readonly _serializedATNSegment0: string = + "\x03\uC91D\uCABA\u058D\uAFBA\u4F53\u0607\uEA8B\uC241\x02\u0135\u0C3B\b" + + "\x01\x04\x02\t\x02\x04\x03\t\x03\x04\x04\t\x04\x04\x05\t\x05\x04\x06\t" + + "\x06\x04\x07\t\x07\x04\b\t\b\x04\t\t\t\x04\n\t\n\x04\v\t\v\x04\f\t\f\x04" + + "\r\t\r\x04\x0E\t\x0E\x04\x0F\t\x0F\x04\x10\t\x10\x04\x11\t\x11\x04\x12" + + "\t\x12\x04\x13\t\x13\x04\x14\t\x14\x04\x15\t\x15\x04\x16\t\x16\x04\x17" + + "\t\x17\x04\x18\t\x18\x04\x19\t\x19\x04\x1A\t\x1A\x04\x1B\t\x1B\x04\x1C" + + "\t\x1C\x04\x1D\t\x1D\x04\x1E\t\x1E\x04\x1F\t\x1F\x04 \t \x04!\t!\x04\"" + + "\t\"\x04#\t#\x04$\t$\x04%\t%\x04&\t&\x04\'\t\'\x04(\t(\x04)\t)\x04*\t" + + "*\x04+\t+\x04,\t,\x04-\t-\x04.\t.\x04/\t/\x040\t0\x041\t1\x042\t2\x04" + + "3\t3\x044\t4\x045\t5\x046\t6\x047\t7\x048\t8\x049\t9\x04:\t:\x04;\t;\x04" + + "<\t<\x04=\t=\x04>\t>\x04?\t?\x04@\t@\x04A\tA\x04B\tB\x04C\tC\x04D\tD\x04" + + "E\tE\x04F\tF\x04G\tG\x04H\tH\x04I\tI\x04J\tJ\x04K\tK\x04L\tL\x04M\tM\x04" + + "N\tN\x04O\tO\x04P\tP\x04Q\tQ\x04R\tR\x04S\tS\x04T\tT\x04U\tU\x04V\tV\x04" + + "W\tW\x04X\tX\x04Y\tY\x04Z\tZ\x04[\t[\x04\\\t\\\x04]\t]\x04^\t^\x04_\t" + + "_\x04`\t`\x04a\ta\x04b\tb\x04c\tc\x04d\td\x04e\te\x04f\tf\x04g\tg\x04" + + "h\th\x04i\ti\x04j\tj\x04k\tk\x04l\tl\x04m\tm\x04n\tn\x04o\to\x04p\tp\x04" + + "q\tq\x04r\tr\x04s\ts\x04t\tt\x04u\tu\x04v\tv\x04w\tw\x04x\tx\x04y\ty\x04" + + "z\tz\x04{\t{\x04|\t|\x04}\t}\x04~\t~\x04\x7F\t\x7F\x04\x80\t\x80\x04\x81" + + "\t\x81\x04\x82\t\x82\x04\x83\t\x83\x04\x84\t\x84\x04\x85\t\x85\x04\x86" + + "\t\x86\x04\x87\t\x87\x04\x88\t\x88\x04\x89\t\x89\x04\x8A\t\x8A\x04\x8B" + + "\t\x8B\x04\x8C\t\x8C\x04\x8D\t\x8D\x04\x8E\t\x8E\x04\x8F\t\x8F\x04\x90" + + "\t\x90\x04\x91\t\x91\x04\x92\t\x92\x04\x93\t\x93\x04\x94\t\x94\x04\x95" + + "\t\x95\x04\x96\t\x96\x04\x97\t\x97\x04\x98\t\x98\x04\x99\t\x99\x04\x9A" + + "\t\x9A\x04\x9B\t\x9B\x04\x9C\t\x9C\x04\x9D\t\x9D\x04\x9E\t\x9E\x04\x9F" + + "\t\x9F\x04\xA0\t\xA0\x04\xA1\t\xA1\x04\xA2\t\xA2\x04\xA3\t\xA3\x04\xA4" + + "\t\xA4\x04\xA5\t\xA5\x04\xA6\t\xA6\x04\xA7\t\xA7\x04\xA8\t\xA8\x04\xA9" + + "\t\xA9\x04\xAA\t\xAA\x04\xAB\t\xAB\x04\xAC\t\xAC\x04\xAD\t\xAD\x04\xAE" + + "\t\xAE\x04\xAF\t\xAF\x04\xB0\t\xB0\x04\xB1\t\xB1\x04\xB2\t\xB2\x04\xB3" + + "\t\xB3\x04\xB4\t\xB4\x04\xB5\t\xB5\x04\xB6\t\xB6\x04\xB7\t\xB7\x04\xB8" + + "\t\xB8\x04\xB9\t\xB9\x04\xBA\t\xBA\x04\xBB\t\xBB\x04\xBC\t\xBC\x04\xBD" + + "\t\xBD\x04\xBE\t\xBE\x04\xBF\t\xBF\x04\xC0\t\xC0\x04\xC1\t\xC1\x04\xC2" + + "\t\xC2\x04\xC3\t\xC3\x04\xC4\t\xC4\x04\xC5\t\xC5\x04\xC6\t\xC6\x04\xC7" + + "\t\xC7\x04\xC8\t\xC8\x04\xC9\t\xC9\x04\xCA\t\xCA\x04\xCB\t\xCB\x04\xCC" + + "\t\xCC\x04\xCD\t\xCD\x04\xCE\t\xCE\x04\xCF\t\xCF\x04\xD0\t\xD0\x04\xD1" + + "\t\xD1\x04\xD2\t\xD2\x04\xD3\t\xD3\x04\xD4\t\xD4\x04\xD5\t\xD5\x04\xD6" + + "\t\xD6\x04\xD7\t\xD7\x04\xD8\t\xD8\x04\xD9\t\xD9\x04\xDA\t\xDA\x04\xDB" + + "\t\xDB\x04\xDC\t\xDC\x04\xDD\t\xDD\x04\xDE\t\xDE\x04\xDF\t\xDF\x04\xE0" + + "\t\xE0\x04\xE1\t\xE1\x04\xE2\t\xE2\x04\xE3\t\xE3\x04\xE4\t\xE4\x04\xE5" + + "\t\xE5\x04\xE6\t\xE6\x04\xE7\t\xE7\x04\xE8\t\xE8\x04\xE9\t\xE9\x04\xEA" + + "\t\xEA\x04\xEB\t\xEB\x04\xEC\t\xEC\x04\xED\t\xED\x04\xEE\t\xEE\x04\xEF" + + "\t\xEF\x04\xF0\t\xF0\x04\xF1\t\xF1\x04\xF2\t\xF2\x04\xF3\t\xF3\x04\xF4" + + "\t\xF4\x04\xF5\t\xF5\x04\xF6\t\xF6\x04\xF7\t\xF7\x04\xF8\t\xF8\x04\xF9" + + "\t\xF9\x04\xFA\t\xFA\x04\xFB\t\xFB\x04\xFC\t\xFC\x04\xFD\t\xFD\x04\xFE" + + "\t\xFE\x04\xFF\t\xFF\x04\u0100\t\u0100\x04\u0101\t\u0101\x04\u0102\t\u0102" + + "\x04\u0103\t\u0103\x04\u0104\t\u0104\x04\u0105\t\u0105\x04\u0106\t\u0106" + + "\x04\u0107\t\u0107\x04\u0108\t\u0108\x04\u0109\t\u0109\x04\u010A\t\u010A" + + "\x04\u010B\t\u010B\x04\u010C\t\u010C\x04\u010D\t\u010D\x04\u010E\t\u010E" + + "\x04\u010F\t\u010F\x04\u0110\t\u0110\x04\u0111\t\u0111\x04\u0112\t\u0112" + + "\x04\u0113\t\u0113\x04\u0114\t\u0114\x04\u0115\t\u0115\x04\u0116\t\u0116" + + "\x04\u0117\t\u0117\x04\u0118\t\u0118\x04\u0119\t\u0119\x04\u011A\t\u011A" + + "\x04\u011B\t\u011B\x04\u011C\t\u011C\x04\u011D\t\u011D\x04\u011E\t\u011E" + + "\x04\u011F\t\u011F\x04\u0120\t\u0120\x04\u0121\t\u0121\x04\u0122\t\u0122" + + "\x04\u0123\t\u0123\x04\u0124\t\u0124\x04\u0125\t\u0125\x04\u0126\t\u0126" + + "\x04\u0127\t\u0127\x04\u0128\t\u0128\x04\u0129\t\u0129\x04\u012A\t\u012A" + + "\x04\u012B\t\u012B\x04\u012C\t\u012C\x04\u012D\t\u012D\x04\u012E\t\u012E" + + "\x04\u012F\t\u012F\x04\u0130\t\u0130\x04\u0131\t\u0131\x04\u0132\t\u0132" + + "\x04\u0133\t\u0133\x04\u0134\t\u0134\x04\u0135\t\u0135\x04\u0136\t\u0136" + + "\x04\u0137\t\u0137\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03" + + "\x02\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03" + + "\x03\x03\x04\x03\x04\x03\x04\x03\x04\x03\x04\x03\x05\x03\x05\x03\x05\x03" + + "\x05\x03\x05\x03\x06\x03\x06\x03\x06\x03\x06\x03\x06\x03\x06\x03\x07\x03" + + "\x07\x03\x07\x03\x07\x03\x07\x03\x07\x03\x07\x03\b\x03\b\x03\b\x03\b\x03" + + "\b\x03\b\x03\b\x03\t\x03\t\x03\t\x03\t\x03\t\x03\t\x03\n\x03\n\x03\n\x03" + + "\n\x03\n\x03\n\x03\v\x03\v\x03\v\x03\v\x03\v\x03\f\x03\f\x03\f\x03\f\x03" + + "\f\x03\r\x03\r\x03\r\x03\r\x03\r\x03\x0E\x03\x0E\x03\x0E\x03\x0E\x03\x0F" + + "\x03\x0F\x03\x0F\x03\x0F\x03\x0F\x03\x10\x03\x10\x03\x10\x03\x10\x03\x10" + + "\x03\x10\x03\x11\x03\x11\x03\x11\x03\x11\x03\x11\x03\x11\x03\x11\x03\x12" + + "\x03\x12\x03\x12\x03\x12\x03\x12\x03\x12\x03\x13\x03\x13\x03\x13\x03\x13" + + "\x03\x13\x03\x13\x03\x14\x03\x14\x03\x14\x03\x14\x03\x14\x03\x15\x03\x15" + + "\x03\x15\x03\x15\x03\x15\x03\x15\x03\x15\x03\x15\x03\x16\x03\x16\x03\x16" + + "\x03\x16\x03\x16\x03\x16\x03\x16\x03\x16\x03\x16\x03\x17\x03\x17\x03\x17" + + "\x03\x17\x03\x17\x03\x17\x03\x17\x03\x17\x03\x17\x03\x17\x03\x18\x03\x18" + + "\x03\x18\x03\x18\x03\x18\x03\x18\x03\x18\x03\x19\x03\x19\x03\x19\x03\x1A" + + "\x03\x1A\x03\x1A\x03\x1B\x03\x1B\x03\x1B\x03\x1C\x03\x1C\x03\x1C\x03\x1D" + + "\x03\x1D\x03\x1D\x03\x1D\x03\x1D\x03\x1D\x03\x1D\x03\x1E\x03\x1E\x03\x1E" + + "\x03\x1E\x03\x1E\x03\x1E\x03\x1F\x03\x1F\x03 \x03 \x03 \x03 \x03 \x03" + + "!\x03!\x03!\x03!\x03!\x03!\x03!\x03!\x03!\x03\"\x03\"\x03\"\x03\"\x03" + + "\"\x03\"\x03\"\x03#\x03#\x03#\x03#\x03#\x03$\x03$\x03$\x03$\x03%\x03%" + + "\x03%\x03&\x03&\x03&\x03&\x03\'\x03\'\x03\'\x03\'\x03\'\x03\'\x03\'\x03" + + "\'\x03\'\x03\'\x03(\x03(\x03(\x03(\x03(\x03(\x03(\x03(\x03(\x03(\x03(" + + "\x03(\x03)\x03)\x03)\x03)\x03)\x03)\x03)\x03)\x03)\x03)\x03)\x03)\x03" + + ")\x03)\x03)\x03)\x03)\x03)\x03*\x03*\x03*\x03*\x03*\x03*\x03*\x03*\x03" + + "*\x03*\x03*\x03+\x03+\x03+\x03+\x03+\x03+\x03+\x03,\x03,\x03,\x03,\x03" + + ",\x03,\x03-\x03-\x03-\x03-\x03-\x03-\x03-\x03-\x03-\x03-\x03.\x03.\x03" + + ".\x03.\x03.\x03.\x03.\x03.\x03.\x03.\x03.\x03/\x03/\x03/\x03/\x03/\x03" + + "/\x03/\x03/\x03/\x03/\x03/\x03/\x03/\x03/\x030\x030\x030\x030\x030\x03" + + "0\x030\x030\x030\x030\x030\x030\x030\x030\x030\x030\x031\x031\x031\x03" + + "1\x031\x031\x031\x031\x031\x031\x031\x031\x031\x032\x032\x032\x032\x03" + + "2\x032\x032\x032\x032\x032\x032\x032\x033\x033\x033\x033\x033\x033\x03" + + "3\x033\x033\x033\x033\x033\x033\x034\x034\x034\x034\x034\x034\x034\x03" + + "4\x034\x034\x034\x035\x035\x035\x035\x035\x035\x035\x035\x035\x035\x03" + + "5\x035\x035\x036\x036\x036\x036\x036\x036\x036\x036\x036\x036\x036\x03" + + "6\x036\x036\x036\x037\x037\x037\x037\x037\x037\x037\x037\x037\x037\x03" + + "7\x038\x038\x038\x038\x038\x038\x038\x038\x038\x038\x039\x039\x039\x03" + + "9\x039\x039\x039\x039\x039\x039\x039\x039\x039\x039\x039\x039\x039\x03" + + "9\x039\x03:\x03:\x03:\x03:\x03:\x03:\x03:\x03:\x03:\x03:\x03:\x03:\x03" + + ":\x03:\x03:\x03:\x03:\x03:\x03:\x03:\x03:\x03:\x03:\x03:\x03;\x03;\x03" + + ";\x03;\x03;\x03<\x03<\x03<\x03=\x03=\x03=\x03=\x03>\x03>\x03>\x03?\x03" + + "?\x03?\x03?\x03@\x03@\x03@\x03@\x03A\x03A\x03A\x03A\x03A\x03B\x03B\x03" + + "B\x03B\x03B\x03B\x03C\x03C\x03C\x03C\x03C\x03C\x03C\x03D\x03D\x03D\x03" + + "D\x03D\x03D\x03D\x03D\x03D\x03E\x03E\x03E\x03E\x03E\x03E\x03E\x03E\x03" + + "E\x03F\x03F\x03F\x03F\x03F\x03F\x03F\x03F\x03F\x03F\x03F\x03F\x03G\x03" + + "G\x03G\x03G\x03G\x03G\x03G\x03G\x03G\x03G\x03G\x03G\x03H\x03H\x03H\x03" + + "H\x03H\x03H\x03H\x03I\x03I\x03I\x03I\x03I\x03I\x03I\x03J\x03J\x03J\x03" + + "J\x03J\x03K\x03K\x03K\x03K\x03L\x03L\x03L\x03L\x03L\x03M\x03M\x03M\x03" + + "M\x03M\x03M\x03N\x03N\x03N\x03N\x03N\x03N\x03N\x03N\x03O\x03O\x03O\x03" + + "O\x03O\x03P\x03P\x03P\x03P\x03P\x03P\x03P\x03P\x03P\x03P\x03P\x03P\x03" + + "P\x03P\x03P\x03P\x03P\x03P\x03P\x03Q\x03Q\x03Q\x03Q\x03Q\x03Q\x03Q\x03" + + "Q\x03Q\x03Q\x03Q\x03Q\x03Q\x03Q\x03Q\x03Q\x03Q\x03Q\x03Q\x03R\x03R\x03" + + "R\x03R\x03R\x03R\x03R\x03R\x03R\x03R\x03R\x03R\x03R\x03R\x03S\x03S\x03" + + "S\x03S\x03S\x03S\x03S\x03S\x03S\x03S\x03S\x03S\x03S\x03S\x03S\x03S\x03" + + "S\x03T\x03T\x03T\x03T\x03T\x03T\x03T\x03T\x03T\x03T\x03T\x03T\x03U\x03" + + "U\x03U\x03U\x03U\x03U\x03U\x03U\x03U\x03U\x03U\x03U\x03V\x03V\x03V\x03" + + "V\x03V\x03V\x03V\x03V\x03V\x03V\x03V\x03V\x03V\x03V\x03V\x03V\x03W\x03" + + "W\x03W\x03W\x03W\x03W\x03W\x03W\x03W\x03W\x03W\x03X\x03X\x03X\x03X\x03" + + "X\x03X\x03X\x03X\x03X\x03X\x03X\x03Y\x03Y\x03Y\x03Y\x03Y\x03Y\x03Y\x03" + + "Y\x03Y\x03Z\x03Z\x03Z\x03Z\x03Z\x03Z\x03Z\x03Z\x03Z\x03Z\x03Z\x03[\x03" + + "[\x03[\x03[\x03[\x03[\x03[\x03[\x03[\x03[\x03[\x03\\\x03\\\x03\\\x03\\" + + "\x03\\\x03\\\x03\\\x03\\\x03\\\x03\\\x03]\x03]\x03]\x03]\x03]\x03]\x03" + + "]\x03^\x03^\x03^\x03^\x03^\x03^\x03^\x03^\x03^\x03^\x03^\x03^\x03_\x03" + + "_\x03_\x03_\x03`\x03`\x03`\x03`\x03`\x03`\x03`\x03`\x03a\x03a\x03a\x03" + + "a\x03a\x03a\x03a\x03b\x03b\x03b\x03b\x03b\x03c\x03c\x03c\x03c\x03c\x03" + + "c\x03d\x03d\x03d\x03d\x03d\x03d\x03d\x03e\x03e\x03e\x03e\x03e\x03e\x03" + + "e\x03e\x03f\x03f\x03g\x03g\x03h\x03h\x03i\x03i\x03j\x03j\x03k\x03k\x03" + + "l\x03l\x03l\x03m\x03m\x03m\x03n\x03n\x03n\x03o\x03o\x03p\x03p\x03q\x03" + + "q\x03r\x03r\x03s\x03s\x03t\x03t\x03u\x03u\x03v\x03v\x03w\x03w\x03x\x03" + + "x\x03y\x03y\x03z\x03z\x03{\x03{\x03|\x03|\x03}\x03}\x03~\x03~\x03\x7F" + + "\x03\x7F\x03\x80\x03\x80\x03\x80\x03\x80\x03\x81\x03\x81\x03\x81\x03\x81" + + "\x03\x81\x03\x81\x03\x82\x03\x82\x03\x82\x03\x82\x03\x82\x03\x82\x03\x82" + + "\x03\x82\x03\x82\x03\x82\x03\x82\x03\x82\x03\x82\x03\x82\x03\x82\x03\x83" + + "\x03\x83\x03\x83\x03\x83\x03\x83\x03\x83\x03\x84\x03\x84\x03\x84\x03\x84" + + "\x03\x84\x03\x84\x03\x84\x03\x84\x03\x84\x03\x84\x03\x84\x03\x84\x03\x85" + + "\x03\x85\x03\x85\x03\x85\x03\x86\x03\x86\x03\x86\x03\x86\x03\x86\x03\x87" + + "\x03\x87\x03\x87\x03\x87\x03\x87\x03\x87\x03\x87\x03\x88\x03\x88\x03\x88" + + "\x03\x88\x03\x89\x03\x89\x03\x89\x03\x89\x03\x89\x03\x8A\x03\x8A\x03\x8A" + + "\x03\x8A\x03\x8A\x03\x8A\x03\x8B\x03\x8B\x03\x8B\x03\x8B\x03\x8B\x03\x8B" + + "\x03\x8C\x03\x8C\x03\x8C\x03\x8C\x03\x8C\x03\x8C\x03\x8C\x03\x8D\x03\x8D" + + "\x03\x8D\x03\x8D\x03\x8E\x03\x8E\x03\x8E\x03\x8E\x03\x8E\x03\x8E\x03\x8F" + + "\x03\x8F\x03\x8F\x03\x8F\x03\x8F\x03\x8F\x03\x8F\x03\x8F\x03\x8F\x03\x90" + + "\x03\x90\x03\x90\x03\x90\x03\x90\x03\x90\x03\x90\x03\x90\x03\x91\x03\x91" + + "\x03\x91\x03\x91\x03\x91\x03\x91\x03\x91\x03\x91\x03\x91\x03\x91\x03\x91" + + "\x03\x91\x03\x92\x03\x92\x03\x92\x03\x92\x03\x92\x03\x92\x03\x92\x03\x92" + + "\x03\x92\x03\x92\x03\x92\x03\x93\x03\x93\x03\x93\x03\x93\x03\x93\x03\x93" + + "\x03\x93\x03\x93\x03\x93\x03\x93\x03\x93\x03\x94\x03\x94\x03\x94\x03\x94" + + "\x03\x94\x03\x95\x03\x95\x03\x95\x03\x95\x03\x95\x03\x95\x03\x96\x03\x96" + + "\x03\x96\x03\x96\x03\x96\x03\x97\x03\x97\x03\x97\x03\x97\x03\x97\x03\x98" + + "\x03\x98\x03\x98\x03\x98\x03\x98\x03\x98\x03\x98\x03\x99\x03\x99\x03\x99" + + "\x03\x99\x03\x99\x03\x99\x03\x99\x03\x99\x03\x99\x03\x9A\x03\x9A\x03\x9A" + + "\x03\x9A\x03\x9A\x03\x9A\x03\x9A\x03\x9A\x03\x9A\x03\x9A\x03\x9A\x03\x9A" + + "\x03\x9A\x03\x9A\x03\x9B\x03\x9B\x03\x9B\x03\x9B\x03\x9B\x03\x9B\x03\x9B" + + "\x03\x9C\x03\x9C\x03\x9C\x03\x9C\x03\x9C\x03\x9C\x03\x9C\x03\x9C\x03\x9C" + + "\x03\x9C\x03\x9C\x03\x9C\x03\x9D\x03\x9D\x03\x9D\x03\x9D\x03\x9D\x03\x9D" + + "\x03\x9D\x03\x9D\x03\x9E\x03\x9E\x03\x9E\x03\x9E\x03\x9E\x03\x9E\x03\x9E" + + "\x03\x9E\x03\x9E\x03\x9F\x03\x9F\x03\x9F\x03\x9F\x03\x9F\x03\x9F\x03\x9F" + + "\x03\x9F\x03\x9F\x03\x9F\x03\x9F\x03\xA0\x03\xA0\x03\xA0\x03\xA0\x03\xA0" + + "\x03\xA0\x03\xA0\x03\xA0\x03\xA0\x03\xA0\x03\xA0\x03\xA1\x03\xA1\x03\xA1" + + "\x03\xA1\x03\xA1\x03\xA2\x03\xA2\x03\xA2\x03\xA2\x03\xA2\x03\xA2\x03\xA2" + + "\x03\xA2\x03\xA2\x03\xA2\x03\xA3\x03\xA3\x03\xA4\x03\xA4\x03\xA4\x03\xA5" + + "\x03\xA5\x03\xA5\x03\xA5\x03\xA6\x03\xA6\x03\xA6\x03\xA6\x03\xA6\x03\xA7" + + "\x03\xA7\x03\xA7\x03\xA7\x03\xA7\x03\xA7\x03\xA7\x03\xA7\x03\xA8\x03\xA8" + + "\x03\xA8\x03\xA8\x03\xA8\x03\xA9\x03\xA9\x03\xA9\x03\xA9\x03\xA9\x03\xA9" + + "\x03\xAA\x03\xAA\x03\xAB\x03\xAB\x03\xAB\x03\xAB\x03\xAC\x03\xAC\x03\xAC" + + "\x03\xAC\x03\xAC\x03\xAC\x03\xAD\x03\xAD\x03\xAD\x03\xAE\x03\xAE\x03\xAE" + + "\x03\xAE\x03\xAF\x03\xAF\x03\xAF\x03\xAF\x03\xAF\x03\xAF\x03\xB0\x03\xB0" + + "\x03\xB0\x03\xB0\x03\xB0\x03\xB1\x03\xB1\x03\xB1\x03\xB1\x03\xB2\x03\xB2" + + "\x03\xB2\x03\xB3\x03\xB3\x03\xB3\x03\xB3\x03\xB4\x03\xB4\x03\xB4\x03\xB4" + + "\x03\xB4\x03\xB4\x03\xB5\x03\xB5\x03\xB5\x03\xB5\x03\xB5\x03\xB6\x03\xB6" + + "\x03\xB6\x03\xB6\x03\xB6\x03\xB6\x03\xB7\x03\xB7\x03\xB7\x03\xB7\x03\xB7" + + "\x03\xB8\x03\xB8\x03\xB8\x03\xB8\x03\xB8\x03\xB9\x03\xB9\x03\xB9\x03\xB9" + + "\x03\xB9\x03\xB9\x03\xB9\x03\xB9\x03\xB9\x03\xBA\x03\xBA\x03\xBA\x03\xBA" + + "\x03\xBA\x03\xBB\x03\xBB\x03\xBB\x03\xBB\x03\xBB\x03\xBC\x03\xBC\x03\xBC" + + "\x03\xBC\x03\xBC\x03\xBD\x03\xBD\x03\xBD\x03\xBD\x03\xBD\x03\xBD\x03\xBE" + + "\x03\xBE\x03\xBE\x03\xBE\x03\xBF\x03\xBF\x03\xBF\x03\xBF\x03\xC0\x03\xC0" + + "\x03\xC0\x03\xC0\x03\xC0\x03\xC0\x03\xC0\x03\xC0\x03\xC1\x03\xC1\x03\xC1" + + "\x03\xC1\x03\xC1\x03\xC1\x03\xC1\x03\xC1\x03\xC2\x03\xC2\x03\xC2\x03\xC2" + + "\x03\xC3\x03\xC3\x03\xC3\x03\xC3\x03\xC4\x03\xC4\x03\xC4\x03\xC4\x03\xC4" + + "\x03\xC4\x03\xC4\x03\xC4\x03\xC5\x03\xC5\x03\xC5\x03\xC5\x03\xC5\x03\xC5" + + "\x03\xC5\x03\xC5\x03\xC6\x03\xC6\x03\xC6\x03\xC6\x03\xC6\x03\xC6\x03\xC6" + + "\x03\xC6\x03\xC6\x03\xC6\x03\xC6\x03\xC6\x03\xC6\x03\xC7\x03\xC7\x03\xC7" + + "\x03\xC7\x03\xC7\x03\xC7\x03\xC7\x03\xC7\x03\xC7\x03\xC7\x03\xC7\x03\xC7" + + "\x03\xC7\x03\xC8\x03\xC8\x03\xC8\x03\xC8\x03\xC8\x03\xC8\x03\xC8\x03\xC8" + + "\x03\xC8\x03\xC8\x03\xC8\x03\xC8\x03\xC8\x03\xC8\x03\xC8\x03\xC8\x03\xC8" + + "\x03\xC8\x03\xC9\x03\xC9\x03\xC9\x03\xC9\x03\xC9\x03\xC9\x03\xC9\x03\xC9" + + "\x03\xCA\x03\xCA\x03\xCA\x03\xCA\x03\xCA\x03\xCB\x03\xCB\x03\xCB\x03\xCB" + + "\x03\xCB\x03\xCB\x03\xCB\x03\xCB\x03\xCB\x03\xCC\x03\xCC\x03\xCC\x03\xCC" + + "\x03\xCC\x03\xCC\x03\xCC\x03\xCC\x03\xCC\x03\xCC\x03\xCC\x03\xCC\x03\xCD" + + "\x03\xCD\x03\xCD\x03\xCD\x03\xCD\x03\xCD\x03\xCD\x03\xCD\x03\xCD\x03\xCE" + + "\x03\xCE\x03\xCE\x03\xCE\x03\xCE\x03\xCE\x03\xCE\x03\xCE\x03\xCF\x03\xCF" + + "\x03\xCF\x03\xCF\x03\xCF\x03\xCF\x03\xCF\x03\xCF\x03\xCF\x03\xCF\x03\xCF" + + "\x03\xD0\x03\xD0\x03\xD0\x03\xD0\x03\xD0\x03\xD0\x03\xD0\x03\xD0\x03\xD0" + + "\x03\xD0\x03\xD1\x03\xD1\x03\xD1\x03\xD1\x03\xD1\x03\xD1\x03\xD1\x03\xD1" + + "\x03\xD1\x03\xD1\x03\xD2\x03\xD2\x03\xD2\x03\xD2\x03\xD2\x03\xD2\x03\xD2" + + "\x03\xD2\x03\xD2\x03\xD2\x03\xD3\x03\xD3\x03\xD3\x03\xD3\x03\xD3\x03\xD3" + + "\x03\xD3\x03\xD3\x03\xD3\x03\xD3\x03\xD4\x03\xD4\x03\xD4\x03\xD4\x03\xD4" + + "\x03\xD4\x03\xD4\x03\xD4\x03\xD4\x03\xD4\x03\xD4\x03\xD4\x03\xD4\x03\xD4" + + "\x03\xD4\x03\xD5\x03\xD5\x03\xD5\x03\xD5\x03\xD5\x03\xD5\x03\xD5\x03\xD5" + + "\x03\xD5\x03\xD5\x03\xD5\x03\xD5\x03\xD5\x03\xD5\x03\xD6\x03\xD6\x03\xD6" + + "\x03\xD6\x03\xD6\x03\xD6\x03\xD6\x03\xD6\x03\xD6\x03\xD7\x03\xD7\x03\xD7" + + "\x03\xD7\x03\xD7\x03\xD7\x03\xD7\x03\xD7\x03\xD7\x03\xD8\x03\xD8\x03\xD8" + + "\x03\xD8\x03\xD8\x03\xD8\x03\xD8\x03\xD8\x03\xD8\x03\xD8\x03\xD9\x03\xD9" + + "\x03\xD9\x03\xD9\x03\xDA\x03\xDA\x03\xDA\x03\xDA\x03\xDA\x03\xDA\x03\xDA" + + "\x03\xDA\x03\xDA\x03\xDA\x03\xDA\x03\xDB\x03\xDB\x03\xDB\x03\xDB\x03\xDB" + + "\x03\xDB\x03\xDB\x03\xDB\x03\xDB\x03\xDB\x03\xDB\x03\xDB\x03\xDC\x03\xDC" + + "\x03\xDC\x03\xDC\x03\xDC\x03\xDC\x03\xDC\x03\xDC\x03\xDD\x03\xDD\x03\xDD" + + "\x03\xDD\x03\xDD\x03\xDD\x03\xDD\x03\xDD\x03\xDE\x03\xDE\x03\xDE\x03\xDE" + + "\x03\xDE\x03\xDF\x03\xDF\x03\xDF\x03\xDF\x03\xDF\x03\xDF\x03\xDF\x03\xDF" + + "\x03\xDF\x03\xDF\x03\xDF\x03\xDF\x03\xE0\x03\xE0\x03\xE0\x03\xE0\x03\xE0" + + "\x03\xE0\x03\xE0\x03\xE0\x03\xE0\x03\xE0\x03\xE1\x03\xE1\x03\xE1\x03\xE1" + + "\x03\xE1\x03\xE1\x03\xE1\x03\xE1\x03\xE2\x03\xE2\x03\xE2\x03\xE2\x03\xE2" + + "\x03\xE2\x03\xE2\x03\xE2\x03\xE2\x03\xE3\x03\xE3\x03\xE3\x03\xE3\x03\xE3" + + "\x03\xE3\x03\xE3\x03\xE3\x03\xE3\x03\xE4\x03\xE4\x03\xE4\x03\xE4\x03\xE4" + + "\x03\xE4\x03\xE4\x03\xE4\x03\xE4\x03\xE4\x03\xE4\x03\xE4\x03\xE4\x03\xE4" + + "\x03\xE5\x03\xE5\x03\xE5\x03\xE5\x03\xE5\x03\xE5\x03\xE5\x03\xE5\x03\xE5" + + "\x03\xE5\x03\xE5\x03\xE5\x03\xE5\x03\xE5\x03\xE5\x03\xE6\x03\xE6\x03\xE6" + + "\x03\xE6\x03\xE6\x03\xE6\x03\xE6\x03\xE7\x03\xE7\x03\xE7\x03\xE7\x03\xE7" + + "\x03\xE7\x03\xE7\x03\xE7\x03\xE7\x03\xE7\x03\xE8\x03\xE8\x03\xE8\x03\xE8" + + "\x03\xE8\x03\xE8\x03\xE9\x03\xE9\x03\xE9\x03\xE9\x03\xE9\x03\xE9\x03\xEA" + + "\x03\xEA\x03\xEA\x03\xEA\x03\xEA\x03\xEB\x03\xEB\x03\xEB\x03\xEC\x03\xEC" + + "\x03\xEC\x03\xEC\x03\xEC\x03\xEC\x03\xED\x03\xED\x03\xED\x03\xED\x03\xED" + + "\x03\xED\x03\xEE\x03\xEE\x03\xEE\x03\xEE\x03\xEE\x03\xEE\x03\xEE\x03\xEF" + + "\x03\xEF\x03\xEF\x03\xEF\x03\xEF\x03\xEF\x03\xEF\x03\xEF\x03\xEF\x03\xEF" + + "\x03\xF0\x03\xF0\x03\xF0\x03\xF0\x03\xF0\x03\xF0\x03\xF0\x03\xF1\x03\xF1" + + "\x03\xF1\x03\xF1\x03\xF1\x03\xF1\x03\xF1\x03\xF2\x03\xF2\x03\xF2\x03\xF2" + + "\x03\xF2\x03\xF2\x03\xF3\x03\xF3\x03\xF3\x03\xF3\x03\xF3\x03\xF4\x03\xF4" + + "\x03\xF4\x03\xF4\x03\xF4\x03\xF4\x03\xF5\x03\xF5\x03\xF5\x03\xF5\x03\xF5" + + "\x03\xF5\x03\xF5\x03\xF6\x03\xF6\x03\xF6\x03\xF6\x03\xF6\x03\xF6\x03\xF6" + + "\x03\xF6\x03\xF7\x03\xF7\x03\xF7\x03\xF7\x03\xF7\x03\xF8\x03\xF8\x03\xF8" + + "\x03\xF8\x03\xF8\x03\xF9\x03\xF9\x03\xF9\x03\xF9\x03\xF9\x03\xF9\x03\xF9" + + "\x03\xFA\x03\xFA\x03\xFA\x03\xFA\x03\xFA\x03\xFA\x03\xFA\x03\xFA\x03\xFA" + + "\x03\xFA\x03\xFB\x03\xFB\x03\xFB\x03\xFB\x03\xFB\x03\xFB\x03\xFB\x03\xFC" + + "\x03\xFC\x03\xFC\x03\xFC\x03\xFC\x03\xFC\x03\xFC\x03\xFD\x03\xFD\x03\xFD" + + "\x03\xFE\x03\xFE\x03\xFE\x03\xFE\x03\xFE\x03\xFE\x03\xFE\x03\xFF\x03\xFF" + + "\x03\xFF\x03\xFF\x03\xFF\x03\xFF\x03\u0100\x03\u0100\x03\u0100\x03\u0100" + + "\x03\u0100\x03\u0100\x03\u0100\x03\u0100\x03\u0100\x03\u0100\x03\u0100" + + "\x03\u0100\x03\u0100\x03\u0101\x03\u0101\x03\u0101\x03\u0101\x03\u0101" + + "\x03\u0101\x03\u0101\x03\u0101\x03\u0101\x03\u0101\x03\u0101\x03\u0101" + + "\x03\u0101\x03\u0101\x03\u0101\x03\u0101\x03\u0101\x03\u0101\x03\u0101" + + "\x03\u0101\x03\u0102\x03\u0102\x03\u0102\x03\u0102\x03\u0102"; + private static readonly _serializedATNSegment1: string = + "\x03\u0102\x03\u0102\x03\u0102\x03\u0102\x03\u0102\x03\u0102\x03\u0102" + + "\x03\u0102\x03\u0102\x03\u0102\x03\u0102\x03\u0102\x03\u0102\x03\u0103" + + "\x03\u0103\x03\u0103\x03\u0103\x03\u0103\x03\u0103\x03\u0103\x03\u0103" + + "\x03\u0103\x03\u0103\x03\u0103\x03\u0103\x03\u0103\x03\u0103\x03\u0103" + + "\x03\u0103\x03\u0103\x03\u0103\x03\u0103\x03\u0103\x03\u0104\x03\u0104" + + "\x03\u0104\x03\u0104\x03\u0104\x03\u0104\x03\u0104\x03\u0104\x03\u0104" + + "\x03\u0104\x03\u0104\x03\u0104\x03\u0105\x03\u0105\x03\u0105\x03\u0105" + + "\x03\u0105\x03\u0105\x03\u0105\x03\u0105\x03\u0105\x03\u0105\x03\u0105" + + "\x03\u0105\x03\u0105\x03\u0106\x03\u0106\x03\u0106\x03\u0106\x03\u0106" + + "\x03\u0106\x03\u0106\x03\u0106\x03\u0106\x03\u0106\x03\u0106\x03\u0106" + + "\x03\u0106\x03\u0106\x03\u0106\x03\u0106\x03\u0106\x03\u0106\x03\u0106" + + "\x03\u0106\x03\u0106\x03\u0106\x03\u0106\x03\u0107\x03\u0107\x03\u0107" + + "\x03\u0107\x03\u0107\x03\u0107\x03\u0107\x03\u0107\x03\u0107\x03\u0107" + + "\x03\u0107\x03\u0107\x03\u0107\x03\u0107\x03\u0107\x03\u0107\x03\u0107" + + "\x03\u0108\x03\u0108\x03\u0108\x03\u0108\x03\u0108\x03\u0108\x03\u0108" + + "\x03\u0108\x03\u0108\x03\u0109\x03\u0109\x03\u0109\x03\u0109\x03\u0109" + + "\x03\u0109\x03\u0109\x03\u0109\x03\u0109\x03\u0109\x03\u0109\x03\u0109" + + "\x03\u0109\x03\u0109\x03\u0109\x03\u0109\x03\u0109\x03\u0109\x03\u0109" + + "\x03\u0109\x03\u0109\x03\u0109\x03\u0109\x03\u0109\x03\u0109\x03\u0109" + + "\x03\u0109\x03\u0109\x03\u0109\x03\u0109\x03\u0109\x03\u0109\x03\u0109" + + "\x03\u0109\x03\u0109\x03\u0109\x03\u010A\x03\u010A\x03\u010A\x03\u010A" + + "\x03\u010A\x03\u010A\x03\u010B\x03\u010B\x03\u010B\x03\u010B\x03\u010B" + + "\x03\u010B\x03\u010B\x03\u010B\x03\u010B\x03\u010B\x03\u010B\x03\u010B" + + "\x03\u010B\x03\u010B\x03\u010B\x03\u010B\x03\u010B\x03\u010C\x03\u010C" + + "\x03\u010C\x03\u010C\x03\u010C\x03\u010C\x03\u010C\x03\u010C\x03\u010C" + + "\x03\u010C\x03\u010C\x03\u010C\x03\u010C\x03\u010C\x03\u010D\x03\u010D" + + "\x03\u010D\x03\u010D\x03\u010D\x03\u010D\x03\u010D\x03\u010D\x03\u010D" + + "\x03\u010D\x03\u010D\x03\u010D\x03\u010D\x03\u010D\x03\u010D\x03\u010D" + + "\x03\u010D\x03\u010E\x03\u010E\x03\u010E\x03\u010E\x03\u010E\x03\u010E" + + "\x03\u010E\x03\u010E\x03\u010E\x03\u010E\x03\u010E\x03\u010E\x03\u010E" + + "\x03\u010E\x03\u010E\x03\u010E\x03\u010E\x03\u010E\x03\u010E\x03\u010E" + + "\x03\u010E\x03\u010E\x03\u010E\x03\u010E\x03\u010E\x03\u010E\x03\u010E" + + "\x03\u010F\x03\u010F\x03\u010F\x03\u010F\x03\u010F\x03\u010F\x03\u010F" + + "\x03\u0110\x03\u0110\x03\u0110\x03\u0110\x03\u0110\x03\u0110\x03\u0111" + + "\x03\u0111\x03\u0111\x03\u0111\x03\u0111\x03\u0111\x03\u0111\x03\u0111" + + "\x03\u0111\x03\u0111\x03\u0111\x03\u0111\x03\u0111\x03\u0111\x03\u0111" + + "\x03\u0111\x03\u0111\x03\u0111\x03\u0111\x03\u0111\x03\u0111\x03\u0112" + + "\x03\u0112\x03\u0112\x03\u0112\x03\u0112\x03\u0112\x03\u0112\x03\u0112" + + "\x03\u0112\x03\u0112\x03\u0112\x03\u0112\x03\u0112\x03\u0112\x03\u0112" + + "\x03\u0112\x03\u0112\x03\u0112\x03\u0112\x03\u0112\x03\u0113\x03\u0113" + + "\x03\u0113\x03\u0113\x03\u0113\x03\u0113\x03\u0113\x03\u0113\x03\u0113" + + "\x03\u0113\x03\u0113\x03\u0113\x03\u0113\x03\u0113\x03\u0113\x03\u0113" + + "\x03\u0113\x03\u0113\x03\u0113\x03\u0113\x03\u0113\x03\u0114\x03\u0114" + + "\x03\u0114\x03\u0114\x03\u0114\x03\u0114\x03\u0114\x03\u0114\x03\u0114" + + "\x03\u0114\x03\u0114\x03\u0114\x03\u0114\x03\u0114\x03\u0115\x03\u0115" + + "\x03\u0115\x03\u0115\x03\u0115\x03\u0115\x03\u0115\x03\u0115\x03\u0115" + + "\x03\u0115\x03\u0116\x03\u0116\x03\u0116\x03\u0116\x03\u0116\x03\u0116" + + "\x03\u0116\x03\u0116\x03\u0117\x03\u0117\x03\u0117\x03\u0117\x03\u0117" + + "\x03\u0117\x03\u0117\x03\u0117\x03\u0117\x03\u0117\x03\u0117\x03\u0117" + + "\x03\u0117\x03\u0117\x03\u0117\x03\u0117\x03\u0117\x03\u0117\x03\u0118" + + "\x03\u0118\x03\u0118\x03\u0118\x03\u0118\x03\u0118\x03\u0118\x03\u0118" + + "\x03\u0118\x03\u0118\x03\u0118\x03\u0118\x03\u0118\x03\u0118\x03\u0118" + + "\x03\u0118\x03\u0118\x03\u0118\x03\u0118\x03\u0118\x03\u0118\x03\u0118" + + "\x03\u0118\x03\u0118\x03\u0119\x03\u0119\x03\u0119\x03\u0119\x03\u0119" + + "\x03\u0119\x03\u0119\x03\u0119\x03\u0119\x03\u0119\x03\u0119\x03\u0119" + + "\x03\u0119\x03\u0119\x03\u0119\x03\u011A\x03\u011A\x03\u011A\x03\u011A" + + "\x03\u011A\x03\u011A\x03\u011A\x03\u011A\x03\u011A\x03\u011A\x03\u011A" + + "\x03\u011A\x03\u011A\x03\u011A\x03\u011A\x03\u011A\x03\u011A\x03\u011A" + + "\x03\u011A\x03\u011A\x03\u011A\x03\u011B\x03\u011B\x03\u011B\x03\u011B" + + "\x03\u011B\x03\u011B\x03\u011B\x03\u011B\x03\u011B\x03\u011C\x03\u011C" + + "\x03\u011C\x03\u011C\x03\u011C\x03\u011C\x03\u011C\x03\u011C\x03\u011C" + + "\x03\u011C\x03\u011C\x03\u011C\x03\u011D\x03\u011D\x03\u011D\x03\u011D" + + "\x03\u011D\x03\u011D\x03\u011D\x03\u011D\x03\u011D\x03\u011D\x03\u011D" + + "\x03\u011D\x03\u011D\x03\u011D\x03\u011E\x03\u011E\x03\u011E\x03\u011E" + + "\x03\u011E\x03\u011E\x03\u011E\x03\u011E\x03\u011E\x03\u011E\x03\u011E" + + "\x03\u011E\x03\u011E\x03\u011E\x03\u011E\x03\u011F\x03\u011F\x03\u011F" + + "\x03\u011F\x03\u011F\x03\u011F\x03\u011F\x03\u011F\x03\u011F\x03\u011F" + + "\x03\u011F\x03\u011F\x03\u011F\x03\u011F\x03\u011F\x03\u011F\x03\u011F" + + "\x03\u011F\x03\u011F\x03\u0120\x03\u0120\x03\u0120\x03\u0120\x03\u0120" + + "\x03\u0120\x03\u0120\x03\u0120\x03\u0121\x03\u0121\x03\u0121\x03\u0121" + + "\x03\u0121\x03\u0122\x03\u0122\x03\u0122\x03\u0122\x03\u0122\x03\u0122" + + "\x03\u0122\x03\u0122\x03\u0122\x03\u0122\x03\u0122\x03\u0122\x03\u0123" + + "\x03\u0123\x03\u0123\x03\u0123\x03\u0123\x03\u0124\x03\u0124\x03\u0124" + + "\x03\u0124\x03\u0124\x03\u0124\x03\u0124\x03\u0124\x03\u0124\x03\u0124" + + "\x03\u0124\x03\u0124\x03\u0124\x03\u0124\x03\u0124\x03\u0124\x03\u0124" + + "\x03\u0125\x03\u0125\x03\u0125\x03\u0125\x03\u0125\x03\u0126\x03\u0126" + + "\x03\u0126\x03\u0127\x03\u0127\x03\u0128\x03\u0128\x03\u0129\x03\u0129" + + "\x03\u012A\x03\u012A\x03\u012B\x03\u012B\x03\u012C\x03\u012C\x03\u012D" + + "\x03\u012D\x03\u012E\x06\u012E\u0BE5\n\u012E\r\u012E\x0E\u012E\u0BE6\x03" + + "\u012F\x06\u012F\u0BEA\n\u012F\r\u012F\x0E\u012F\u0BEB\x05\u012F\u0BEE" + + "\n\u012F\x03\u012F\x03\u012F\x06\u012F\u0BF2\n\u012F\r\u012F\x0E\u012F" + + "\u0BF3\x03\u0130\x03\u0130\x06\u0130\u0BF8\n\u0130\r\u0130\x0E\u0130\u0BF9" + + "\x07\u0130\u0BFC\n\u0130\f\u0130\x0E\u0130\u0BFF\v\u0130\x03\u0131\x06" + + "\u0131\u0C02\n\u0131\r\u0131\x0E\u0131\u0C03\x03\u0131\x07\u0131\u0C07" + + "\n\u0131\f\u0131\x0E\u0131\u0C0A\v\u0131\x03\u0132\x03\u0132\x03\u0132" + + "\x03\u0133\x03\u0133\x03\u0133\x03\u0133\x03\u0133\x03\u0133\x07\u0133" + + "\u0C15\n\u0133\f\u0133\x0E\u0133\u0C18\v\u0133\x03\u0133\x03\u0133\x03" + + "\u0134\x03\u0134\x03\u0134\x03\u0134\x03\u0134\x03\u0134\x07\u0134\u0C22" + + "\n\u0134\f\u0134\x0E\u0134\u0C25\v\u0134\x03\u0134\x03\u0134\x03\u0135" + + "\x03\u0135\x03\u0135\x03\u0135\x03\u0135\x03\u0135\x07\u0135\u0C2F\n\u0135" + + "\f\u0135\x0E\u0135\u0C32\v\u0135\x03\u0135\x03\u0135\x03\u0136\x03\u0136" + + "\x03\u0137\x03\u0137\x03\u0137\x03\u0137\x03\u0C03\x02\x02\u0138\x03\x02" + + "\x03\x05\x02\x04\x07\x02\x05\t\x02\x06\v\x02\x07\r\x02\b\x0F\x02\t\x11" + + "\x02\n\x13\x02\v\x15\x02\f\x17\x02\r\x19\x02\x0E\x1B\x02\x0F\x1D\x02\x10" + + "\x1F\x02\x11!\x02\x12#\x02\x13%\x02\x14\'\x02\x15)\x02\x16+\x02\x17-\x02" + + "\x18/\x02\x191\x02\x1A3\x02\x1B5\x02\x1C7\x02\x1D9\x02\x1E;\x02\x1F=\x02" + + " ?\x02!A\x02\"C\x02#E\x02$G\x02%I\x02&K\x02\'M\x02(O\x02)Q\x02*S\x02+" + + "U\x02,W\x02-Y\x02.[\x02/]\x020_\x021a\x022c\x023e\x024g\x025i\x026k\x02" + + "7m\x028o\x029q\x02:s\x02;u\x02{\x02?}\x02@\x7F\x02A\x81\x02" + + "B\x83\x02C\x85\x02D\x87\x02E\x89\x02F\x8B\x02G\x8D\x02H\x8F\x02I\x91\x02" + + "J\x93\x02K\x95\x02L\x97\x02M\x99\x02N\x9B\x02O\x9D\x02P\x9F\x02Q\xA1\x02" + + "R\xA3\x02S\xA5\x02T\xA7\x02U\xA9\x02V\xAB\x02W\xAD\x02X\xAF\x02Y\xB1\x02" + + "Z\xB3\x02[\xB5\x02\\\xB7\x02]\xB9\x02^\xBB\x02_\xBD\x02`\xBF\x02a\xC1" + + "\x02b\xC3\x02c\xC5\x02d\xC7\x02e\xC9\x02f\xCB\x02g\xCD\x02h\xCF\x02i\xD1" + + "\x02j\xD3\x02k\xD5\x02l\xD7\x02m\xD9\x02n\xDB\x02o\xDD\x02p\xDF\x02q\xE1" + + "\x02r\xE3\x02s\xE5\x02t\xE7\x02u\xE9\x02v\xEB\x02w\xED\x02x\xEF\x02y\xF1" + + "\x02z\xF3\x02{\xF5\x02|\xF7\x02}\xF9\x02~\xFB\x02\x7F\xFD\x02\x80\xFF" + + "\x02\x81\u0101\x02\x82\u0103\x02\x83\u0105\x02\x84\u0107\x02\x85\u0109" + + "\x02\x86\u010B\x02\x87\u010D\x02\x88\u010F\x02\x89\u0111\x02\x8A\u0113" + + "\x02\x8B\u0115\x02\x8C\u0117\x02\x8D\u0119\x02\x8E\u011B\x02\x8F\u011D" + + "\x02\x90\u011F\x02\x91\u0121\x02\x92\u0123\x02\x93\u0125\x02\x94\u0127" + + "\x02\x95\u0129\x02\x96\u012B\x02\x97\u012D\x02\x98\u012F\x02\x99\u0131" + + "\x02\x9A\u0133\x02\x9B\u0135\x02\x9C\u0137\x02\x9D\u0139\x02\x9E\u013B" + + "\x02\x9F\u013D\x02\xA0\u013F\x02\xA1\u0141\x02\xA2\u0143\x02\xA3\u0145" + + "\x02\xA4\u0147\x02\xA5\u0149\x02\xA6\u014B\x02\xA7\u014D\x02\xA8\u014F" + + "\x02\xA9\u0151\x02\xAA\u0153\x02\xAB\u0155\x02\xAC\u0157\x02\xAD\u0159" + + "\x02\xAE\u015B\x02\xAF\u015D\x02\xB0\u015F\x02\xB1\u0161\x02\xB2\u0163" + + "\x02\xB3\u0165\x02\xB4\u0167\x02\xB5\u0169\x02\xB6\u016B\x02\xB7\u016D" + + "\x02\xB8\u016F\x02\xB9\u0171\x02\xBA\u0173\x02\xBB\u0175\x02\xBC\u0177" + + "\x02\xBD\u0179\x02\xBE\u017B\x02\xBF\u017D\x02\xC0\u017F\x02\xC1\u0181" + + "\x02\xC2\u0183\x02\xC3\u0185\x02\xC4\u0187\x02\xC5\u0189\x02\xC6\u018B" + + "\x02\xC7\u018D\x02\xC8\u018F\x02\xC9\u0191\x02\xCA\u0193\x02\xCB\u0195" + + "\x02\xCC\u0197\x02\xCD\u0199\x02\xCE\u019B\x02\xCF\u019D\x02\xD0\u019F" + + "\x02\xD1\u01A1\x02\xD2\u01A3\x02\xD3\u01A5\x02\xD4\u01A7\x02\xD5\u01A9" + + "\x02\xD6\u01AB\x02\xD7\u01AD\x02\xD8\u01AF\x02\xD9\u01B1\x02\xDA\u01B3" + + "\x02\xDB\u01B5\x02\xDC\u01B7\x02\xDD\u01B9\x02\xDE\u01BB\x02\xDF\u01BD" + + "\x02\xE0\u01BF\x02\xE1\u01C1\x02\xE2\u01C3\x02\xE3\u01C5\x02\xE4\u01C7" + + "\x02\xE5\u01C9\x02\xE6\u01CB\x02\xE7\u01CD\x02\xE8\u01CF\x02\xE9\u01D1" + + "\x02\xEA\u01D3\x02\xEB\u01D5\x02\xEC\u01D7\x02\xED\u01D9\x02\xEE\u01DB" + + "\x02\xEF\u01DD\x02\xF0\u01DF\x02\xF1\u01E1\x02\xF2\u01E3\x02\xF3\u01E5" + + "\x02\xF4\u01E7\x02\xF5\u01E9\x02\xF6\u01EB\x02\xF7\u01ED\x02\xF8\u01EF" + + "\x02\xF9\u01F1\x02\xFA\u01F3\x02\xFB\u01F5\x02\xFC\u01F7\x02\xFD\u01F9" + + "\x02\xFE\u01FB\x02\xFF\u01FD\x02\u0100\u01FF\x02\u0101\u0201\x02\u0102" + + "\u0203\x02\u0103\u0205\x02\u0104\u0207\x02\u0105\u0209\x02\u0106\u020B" + + "\x02\u0107\u020D\x02\u0108\u020F\x02\u0109\u0211\x02\u010A\u0213\x02\u010B" + + "\u0215\x02\u010C\u0217\x02\u010D\u0219\x02\u010E\u021B\x02\u010F\u021D" + + "\x02\u0110\u021F\x02\u0111\u0221\x02\u0112\u0223\x02\u0113\u0225\x02\u0114" + + "\u0227\x02\u0115\u0229\x02\u0116\u022B\x02\u0117\u022D\x02\u0118\u022F" + + "\x02\u0119\u0231\x02\u011A\u0233\x02\u011B\u0235\x02\u011C\u0237\x02\u011D" + + "\u0239\x02\u011E\u023B\x02\u011F\u023D\x02\u0120\u023F\x02\u0121\u0241" + + "\x02\u0122\u0243\x02\u0123\u0245\x02\u0124\u0247\x02\u0125\u0249\x02\u0126" + + "\u024B\x02\u0127\u024D\x02\u0128\u024F\x02\u0129\u0251\x02\u012A\u0253" + + "\x02\u012B\u0255\x02\u012C\u0257\x02\u012D\u0259\x02\u012E\u025B\x02\u012F" + + "\u025D\x02\u0130\u025F\x02\x02\u0261\x02\x02\u0263\x02\u0131\u0265\x02" + + "\u0132\u0267\x02\u0133\u0269\x02\u0134\u026B\x02\x02\u026D\x02\u0135\x03" + + "\x02\n\x03\x02/0\x04\x02,,2;\x04\x02,,B\\\x07\x02,,//2;C\\aa\x04\x02$" + + "$^^\x04\x02))^^\x04\x02^^bb\x03\x022;\x02\u0C48\x02\x03\x03\x02\x02\x02" + + "\x02\x05\x03\x02\x02\x02\x02\x07\x03\x02\x02\x02\x02\t\x03\x02\x02\x02" + + "\x02\v\x03\x02\x02\x02\x02\r\x03\x02\x02\x02\x02\x0F\x03\x02\x02\x02\x02" + + "\x11\x03\x02\x02\x02\x02\x13\x03\x02\x02\x02\x02\x15\x03\x02\x02\x02\x02" + + "\x17\x03\x02\x02\x02\x02\x19\x03\x02\x02\x02\x02\x1B\x03\x02\x02\x02\x02" + + "\x1D\x03\x02\x02\x02\x02\x1F\x03\x02\x02\x02\x02!\x03\x02\x02\x02\x02" + + "#\x03\x02\x02\x02\x02%\x03\x02\x02\x02\x02\'\x03\x02\x02\x02\x02)\x03" + + "\x02\x02\x02\x02+\x03\x02\x02\x02\x02-\x03\x02\x02\x02\x02/\x03\x02\x02" + + "\x02\x021\x03\x02\x02\x02\x023\x03\x02\x02\x02\x025\x03\x02\x02\x02\x02" + + "7\x03\x02\x02\x02\x029\x03\x02\x02\x02\x02;\x03\x02\x02\x02\x02=\x03\x02" + + "\x02\x02\x02?\x03\x02\x02\x02\x02A\x03\x02\x02\x02\x02C\x03\x02\x02\x02" + + "\x02E\x03\x02\x02\x02\x02G\x03\x02\x02\x02\x02I\x03\x02\x02\x02\x02K\x03" + + "\x02\x02\x02\x02M\x03\x02\x02\x02\x02O\x03\x02\x02\x02\x02Q\x03\x02\x02" + + "\x02\x02S\x03\x02\x02\x02\x02U\x03\x02\x02\x02\x02W\x03\x02\x02\x02\x02" + + "Y\x03\x02\x02\x02\x02[\x03\x02\x02\x02\x02]\x03\x02\x02\x02\x02_\x03\x02" + + "\x02\x02\x02a\x03\x02\x02\x02\x02c\x03\x02\x02\x02\x02e\x03\x02\x02\x02" + + "\x02g\x03\x02\x02\x02\x02i\x03\x02\x02\x02\x02k\x03\x02\x02\x02\x02m\x03" + + "\x02\x02\x02\x02o\x03\x02\x02\x02\x02q\x03\x02\x02\x02\x02s\x03\x02\x02" + + "\x02\x02u\x03\x02\x02\x02\x02w\x03\x02\x02\x02\x02y\x03\x02\x02\x02\x02" + + "{\x03\x02\x02\x02\x02}\x03\x02\x02\x02\x02\x7F\x03\x02\x02\x02\x02\x81" + + "\x03\x02\x02\x02\x02\x83\x03\x02\x02\x02\x02\x85\x03\x02\x02\x02\x02\x87" + + "\x03\x02\x02\x02\x02\x89\x03\x02\x02\x02\x02\x8B\x03\x02\x02\x02\x02\x8D" + + "\x03\x02\x02\x02\x02\x8F\x03\x02\x02\x02\x02\x91\x03\x02\x02\x02\x02\x93" + + "\x03\x02\x02\x02\x02\x95\x03\x02\x02\x02\x02\x97\x03\x02\x02\x02\x02\x99" + + "\x03\x02\x02\x02\x02\x9B\x03\x02\x02\x02\x02\x9D\x03\x02\x02\x02\x02\x9F" + + "\x03\x02\x02\x02\x02\xA1\x03\x02\x02\x02\x02\xA3\x03\x02\x02\x02\x02\xA5" + + "\x03\x02\x02\x02\x02\xA7\x03\x02\x02\x02\x02\xA9\x03\x02\x02\x02\x02\xAB" + + "\x03\x02\x02\x02\x02\xAD\x03\x02\x02\x02\x02\xAF\x03\x02\x02\x02\x02\xB1" + + "\x03\x02\x02\x02\x02\xB3\x03\x02\x02\x02\x02\xB5\x03\x02\x02\x02\x02\xB7" + + "\x03\x02\x02\x02\x02\xB9\x03\x02\x02\x02\x02\xBB\x03\x02\x02\x02\x02\xBD" + + "\x03\x02\x02\x02\x02\xBF\x03\x02\x02\x02\x02\xC1\x03\x02\x02\x02\x02\xC3" + + "\x03\x02\x02\x02\x02\xC5\x03\x02\x02\x02\x02\xC7\x03\x02\x02\x02\x02\xC9" + + "\x03\x02\x02\x02\x02\xCB\x03\x02\x02\x02\x02\xCD\x03\x02\x02\x02\x02\xCF" + + "\x03\x02\x02\x02\x02\xD1\x03\x02\x02\x02\x02\xD3\x03\x02\x02\x02\x02\xD5" + + "\x03\x02\x02\x02\x02\xD7\x03\x02\x02\x02\x02\xD9\x03\x02\x02\x02\x02\xDB" + + "\x03\x02\x02\x02\x02\xDD\x03\x02\x02\x02\x02\xDF\x03\x02\x02\x02\x02\xE1" + + "\x03\x02\x02\x02\x02\xE3\x03\x02\x02\x02\x02\xE5\x03\x02\x02\x02\x02\xE7" + + "\x03\x02\x02\x02\x02\xE9\x03\x02\x02\x02\x02\xEB\x03\x02\x02\x02\x02\xED" + + "\x03\x02\x02\x02\x02\xEF\x03\x02\x02\x02\x02\xF1\x03\x02\x02\x02\x02\xF3" + + "\x03\x02\x02\x02\x02\xF5\x03\x02\x02\x02\x02\xF7\x03\x02\x02\x02\x02\xF9" + + "\x03\x02\x02\x02\x02\xFB\x03\x02\x02\x02\x02\xFD\x03\x02\x02\x02\x02\xFF" + + "\x03\x02\x02\x02\x02\u0101\x03\x02\x02\x02\x02\u0103\x03\x02\x02\x02\x02" + + "\u0105\x03\x02\x02\x02\x02\u0107\x03\x02\x02\x02\x02\u0109\x03\x02\x02" + + "\x02\x02\u010B\x03\x02\x02\x02\x02\u010D\x03\x02\x02\x02\x02\u010F\x03" + + "\x02\x02\x02\x02\u0111\x03\x02\x02\x02\x02\u0113\x03\x02\x02\x02\x02\u0115" + + "\x03\x02\x02\x02\x02\u0117\x03\x02\x02\x02\x02\u0119\x03\x02\x02\x02\x02" + + "\u011B\x03\x02\x02\x02\x02\u011D\x03\x02\x02\x02\x02\u011F\x03\x02\x02" + + "\x02\x02\u0121\x03\x02\x02\x02\x02\u0123\x03\x02\x02\x02\x02\u0125\x03" + + "\x02\x02\x02\x02\u0127\x03\x02\x02\x02\x02\u0129\x03\x02\x02\x02\x02\u012B" + + "\x03\x02\x02\x02\x02\u012D\x03\x02\x02\x02\x02\u012F\x03\x02\x02\x02\x02" + + "\u0131\x03\x02\x02\x02\x02\u0133\x03\x02\x02\x02\x02\u0135\x03\x02\x02" + + "\x02\x02\u0137\x03\x02\x02\x02\x02\u0139\x03\x02\x02\x02\x02\u013B\x03" + + "\x02\x02\x02\x02\u013D\x03\x02\x02\x02\x02\u013F\x03\x02\x02\x02\x02\u0141" + + "\x03\x02\x02\x02\x02\u0143\x03\x02\x02\x02\x02\u0145\x03\x02\x02\x02\x02" + + "\u0147\x03\x02\x02\x02\x02\u0149\x03\x02\x02\x02\x02\u014B\x03\x02\x02" + + "\x02\x02\u014D\x03\x02\x02\x02\x02\u014F\x03\x02\x02\x02\x02\u0151\x03" + + "\x02\x02\x02\x02\u0153\x03\x02\x02\x02\x02\u0155\x03\x02\x02\x02\x02\u0157" + + "\x03\x02\x02\x02\x02\u0159\x03\x02\x02\x02\x02\u015B\x03\x02\x02\x02\x02" + + "\u015D\x03\x02\x02\x02\x02\u015F\x03\x02\x02\x02\x02\u0161\x03\x02\x02" + + "\x02\x02\u0163\x03\x02\x02\x02\x02\u0165\x03\x02\x02\x02\x02\u0167\x03" + + "\x02\x02\x02\x02\u0169\x03\x02\x02\x02\x02\u016B\x03\x02\x02\x02\x02\u016D" + + "\x03\x02\x02\x02\x02\u016F\x03\x02\x02\x02\x02\u0171\x03\x02\x02\x02\x02" + + "\u0173\x03\x02\x02\x02\x02\u0175\x03\x02\x02\x02\x02\u0177\x03\x02\x02" + + "\x02\x02\u0179\x03\x02\x02\x02\x02\u017B\x03\x02\x02\x02\x02\u017D\x03" + + "\x02\x02\x02\x02\u017F\x03\x02\x02\x02\x02\u0181\x03\x02\x02\x02\x02\u0183" + + "\x03\x02\x02\x02\x02\u0185\x03\x02\x02\x02\x02\u0187\x03\x02\x02\x02\x02" + + "\u0189\x03\x02\x02\x02\x02\u018B\x03\x02\x02\x02\x02\u018D\x03\x02\x02" + + "\x02\x02\u018F\x03\x02\x02\x02\x02\u0191\x03\x02\x02\x02\x02\u0193\x03" + + "\x02\x02\x02\x02\u0195\x03\x02\x02\x02\x02\u0197\x03\x02\x02\x02\x02\u0199" + + "\x03\x02\x02\x02\x02\u019B\x03\x02\x02\x02\x02\u019D\x03\x02\x02\x02\x02" + + "\u019F\x03\x02\x02\x02\x02\u01A1\x03\x02\x02\x02\x02\u01A3\x03\x02\x02" + + "\x02\x02\u01A5\x03\x02\x02\x02\x02\u01A7\x03\x02\x02\x02\x02\u01A9\x03" + + "\x02\x02\x02\x02\u01AB\x03\x02\x02\x02\x02\u01AD\x03\x02\x02\x02\x02\u01AF" + + "\x03\x02\x02\x02\x02\u01B1\x03\x02\x02\x02\x02\u01B3\x03\x02\x02\x02\x02" + + "\u01B5\x03\x02\x02\x02\x02\u01B7\x03\x02\x02\x02\x02\u01B9\x03\x02\x02" + + "\x02\x02\u01BB\x03\x02\x02\x02\x02\u01BD\x03\x02\x02\x02\x02\u01BF\x03" + + "\x02\x02\x02\x02\u01C1\x03\x02\x02\x02\x02\u01C3\x03\x02\x02\x02\x02\u01C5" + + "\x03\x02\x02\x02\x02\u01C7\x03\x02\x02\x02\x02\u01C9\x03\x02\x02\x02\x02" + + "\u01CB\x03\x02\x02\x02\x02\u01CD\x03\x02\x02\x02\x02\u01CF\x03\x02\x02" + + "\x02\x02\u01D1\x03\x02\x02\x02\x02\u01D3\x03\x02\x02\x02\x02\u01D5\x03" + + "\x02\x02\x02\x02\u01D7\x03\x02\x02\x02\x02\u01D9\x03\x02\x02\x02\x02\u01DB" + + "\x03\x02\x02\x02\x02\u01DD\x03\x02\x02\x02\x02\u01DF\x03\x02\x02\x02\x02" + + "\u01E1\x03\x02\x02\x02\x02\u01E3\x03\x02\x02\x02\x02\u01E5\x03\x02\x02" + + "\x02\x02\u01E7\x03\x02\x02\x02\x02\u01E9\x03\x02\x02\x02\x02\u01EB\x03" + + "\x02\x02\x02\x02\u01ED\x03\x02\x02\x02\x02\u01EF\x03\x02\x02\x02\x02\u01F1" + + "\x03\x02\x02\x02\x02\u01F3\x03\x02\x02\x02\x02\u01F5\x03\x02\x02\x02\x02" + + "\u01F7\x03\x02\x02\x02\x02\u01F9\x03\x02\x02\x02\x02\u01FB\x03\x02\x02" + + "\x02\x02\u01FD\x03\x02\x02\x02\x02\u01FF\x03\x02\x02\x02\x02\u0201\x03" + + "\x02\x02\x02\x02\u0203\x03\x02\x02\x02\x02\u0205\x03\x02\x02\x02\x02\u0207" + + "\x03\x02\x02\x02\x02\u0209\x03\x02\x02\x02\x02\u020B\x03\x02\x02\x02\x02" + + "\u020D\x03\x02\x02\x02\x02\u020F\x03\x02\x02\x02\x02\u0211\x03\x02\x02" + + "\x02\x02\u0213\x03\x02\x02\x02\x02\u0215\x03\x02\x02\x02\x02\u0217\x03" + + "\x02\x02\x02\x02\u0219\x03\x02\x02\x02\x02\u021B\x03\x02\x02\x02\x02\u021D" + + "\x03\x02\x02\x02\x02\u021F\x03\x02\x02\x02\x02\u0221\x03\x02\x02\x02\x02" + + "\u0223\x03\x02\x02\x02\x02\u0225\x03\x02\x02\x02\x02\u0227\x03\x02\x02" + + "\x02\x02\u0229\x03\x02\x02\x02\x02\u022B\x03\x02\x02\x02\x02\u022D\x03" + + "\x02\x02\x02\x02\u022F\x03\x02\x02\x02\x02\u0231\x03\x02\x02\x02\x02\u0233" + + "\x03\x02\x02\x02\x02\u0235\x03\x02\x02\x02\x02\u0237\x03\x02\x02\x02\x02" + + "\u0239\x03\x02\x02\x02\x02\u023B\x03\x02\x02\x02\x02\u023D\x03\x02\x02" + + "\x02\x02\u023F\x03\x02\x02\x02\x02\u0241\x03\x02\x02\x02\x02\u0243\x03" + + "\x02\x02\x02\x02\u0245\x03\x02\x02\x02\x02\u0247\x03\x02\x02\x02\x02\u0249" + + "\x03\x02\x02\x02\x02\u024B\x03\x02\x02\x02\x02\u024D\x03\x02\x02\x02\x02" + + "\u024F\x03\x02\x02\x02\x02\u0251\x03\x02\x02\x02\x02\u0253\x03\x02\x02" + + "\x02\x02\u0255\x03\x02\x02\x02\x02\u0257\x03\x02\x02\x02\x02\u0259\x03" + + "\x02\x02\x02\x02\u025B\x03\x02\x02\x02\x02\u025D\x03\x02\x02\x02\x02\u0263" + + "\x03\x02\x02\x02\x02\u0265\x03\x02\x02\x02\x02\u0267\x03\x02\x02\x02\x02" + + "\u0269\x03\x02\x02\x02\x02\u026D\x03\x02\x02\x02\x03\u026F\x03\x02\x02" + + "\x02\x05\u0276\x03\x02\x02\x02\x07\u027F\x03\x02\x02\x02\t\u0284\x03\x02" + + "\x02\x02\v\u0289\x03\x02\x02\x02\r\u028F\x03\x02\x02\x02\x0F\u0296\x03" + + "\x02\x02\x02\x11\u029D\x03\x02\x02\x02\x13\u02A3\x03\x02\x02\x02\x15\u02A9" + + "\x03\x02\x02\x02\x17\u02AE\x03\x02\x02\x02\x19\u02B3\x03\x02\x02\x02\x1B" + + "\u02B8\x03\x02\x02\x02\x1D\u02BC\x03\x02\x02\x02\x1F\u02C1\x03\x02\x02" + + "\x02!\u02C7\x03\x02\x02\x02#\u02CE\x03\x02\x02\x02%\u02D4\x03\x02\x02" + + "\x02\'\u02DA\x03\x02\x02\x02)\u02DF\x03\x02\x02\x02+\u02E7\x03\x02\x02" + + "\x02-\u02F0\x03\x02\x02\x02/\u02FA\x03\x02\x02\x021\u0301\x03\x02\x02" + + "\x023\u0304\x03\x02\x02\x025\u0307\x03\x02\x02\x027\u030A\x03\x02\x02" + + "\x029\u030D\x03\x02\x02\x02;\u0314\x03\x02\x02\x02=\u031A\x03\x02\x02" + + "\x02?\u031C\x03\x02\x02\x02A\u0321\x03\x02\x02\x02C\u032A\x03\x02\x02" + + "\x02E\u0331\x03\x02\x02\x02G\u0336\x03\x02\x02\x02I\u033A\x03\x02\x02" + + "\x02K\u033D\x03\x02\x02\x02M\u0341\x03\x02\x02\x02O\u034B\x03\x02\x02" + + "\x02Q\u0357\x03\x02\x02\x02S\u0369\x03\x02\x02\x02U\u0374\x03\x02\x02" + + "\x02W\u037B\x03\x02\x02\x02Y\u0381\x03\x02\x02\x02[\u038B\x03\x02\x02" + + "\x02]\u0396\x03\x02\x02\x02_\u03A4\x03\x02\x02\x02a\u03B4\x03\x02\x02" + + "\x02c\u03C1\x03\x02\x02\x02e\u03CD\x03\x02\x02\x02g\u03DA\x03\x02\x02" + + "\x02i\u03E5\x03\x02\x02\x02k\u03F2\x03\x02\x02\x02m\u0401\x03\x02\x02" + + "\x02o\u040C\x03\x02\x02\x02q\u0416\x03\x02\x02\x02s\u0429\x03\x02\x02" + + "\x02u\u0441\x03\x02\x02\x02w\u0446\x03\x02\x02\x02y\u0449\x03\x02\x02" + + "\x02{\u044D\x03\x02\x02\x02}\u0450\x03\x02\x02\x02\x7F\u0454\x03\x02\x02" + + "\x02\x81\u0458\x03\x02\x02\x02\x83\u045D\x03\x02\x02\x02\x85\u0463\x03" + + "\x02\x02\x02\x87\u046A\x03\x02\x02\x02\x89\u0473\x03\x02\x02\x02\x8B\u047C" + + "\x03\x02\x02\x02\x8D\u0488\x03\x02\x02\x02\x8F\u0494\x03\x02\x02\x02\x91" + + "\u049B\x03\x02\x02\x02\x93\u04A2\x03\x02\x02\x02\x95\u04A7\x03\x02\x02" + + "\x02\x97\u04AB\x03\x02\x02\x02\x99\u04B0\x03\x02\x02\x02\x9B\u04B6\x03" + + "\x02\x02\x02\x9D\u04BE\x03\x02\x02\x02\x9F\u04C3\x03\x02\x02\x02\xA1\u04D6" + + "\x03\x02\x02\x02\xA3\u04E9\x03\x02\x02\x02\xA5\u04F7\x03\x02\x02\x02\xA7" + + "\u0508\x03\x02\x02\x02\xA9\u0514\x03\x02\x02\x02\xAB\u0520\x03\x02\x02" + + "\x02\xAD\u0530\x03\x02\x02\x02\xAF\u053B\x03\x02\x02\x02\xB1\u0546\x03" + + "\x02\x02\x02\xB3\u054F\x03\x02\x02\x02\xB5\u055A\x03\x02\x02\x02\xB7\u0565" + + "\x03\x02\x02\x02\xB9\u056F\x03\x02\x02\x02\xBB\u0576\x03\x02\x02\x02\xBD" + + "\u0582\x03\x02\x02\x02\xBF\u0586\x03\x02\x02\x02\xC1\u058E\x03\x02\x02" + + "\x02\xC3\u0595\x03\x02\x02\x02\xC5\u059A\x03\x02\x02\x02\xC7\u05A0\x03" + + "\x02\x02\x02\xC9\u05A7\x03\x02\x02\x02\xCB\u05AF\x03\x02\x02\x02\xCD\u05B1" + + "\x03\x02\x02\x02\xCF\u05B3\x03\x02\x02\x02\xD1\u05B5\x03\x02\x02\x02\xD3" + + "\u05B7\x03\x02\x02\x02\xD5\u05B9\x03\x02\x02\x02\xD7\u05BB\x03\x02\x02" + + "\x02\xD9\u05BE\x03\x02\x02\x02\xDB\u05C1\x03\x02\x02\x02\xDD\u05C4\x03" + + "\x02\x02\x02\xDF\u05C6\x03\x02\x02\x02\xE1\u05C8\x03\x02\x02\x02\xE3\u05CA" + + "\x03\x02\x02\x02\xE5\u05CC\x03\x02\x02\x02\xE7\u05CE\x03\x02\x02\x02\xE9" + + "\u05D0\x03\x02\x02\x02\xEB\u05D2\x03\x02\x02\x02\xED\u05D4\x03\x02\x02" + + "\x02\xEF\u05D6\x03\x02\x02\x02\xF1\u05D8\x03\x02\x02\x02\xF3\u05DA\x03" + + "\x02\x02\x02\xF5\u05DC\x03\x02\x02\x02\xF7\u05DE\x03\x02\x02\x02\xF9\u05E0" + + "\x03\x02\x02\x02\xFB\u05E2\x03\x02\x02\x02\xFD\u05E4\x03\x02\x02\x02\xFF" + + "\u05E6\x03\x02\x02\x02\u0101\u05EA\x03\x02\x02\x02\u0103\u05F0\x03\x02" + + "\x02\x02\u0105\u05FF\x03\x02\x02\x02\u0107\u0605\x03\x02\x02\x02\u0109" + + "\u0611\x03\x02\x02\x02\u010B\u0615\x03\x02\x02\x02\u010D\u061A\x03\x02" + + "\x02\x02\u010F\u0621\x03\x02\x02\x02\u0111\u0625\x03\x02\x02\x02\u0113" + + "\u062A\x03\x02\x02\x02\u0115\u0630\x03\x02\x02\x02\u0117\u0636\x03\x02" + + "\x02\x02\u0119\u063D\x03\x02\x02\x02\u011B\u0641\x03\x02\x02\x02\u011D" + + "\u0647\x03\x02\x02\x02\u011F\u0650\x03\x02\x02\x02\u0121\u0658\x03\x02" + + "\x02\x02\u0123\u0664\x03\x02\x02\x02\u0125\u066F\x03\x02\x02\x02\u0127"; + private static readonly _serializedATNSegment2: string = + "\u067A\x03\x02\x02\x02\u0129\u067F\x03\x02\x02\x02\u012B\u0685\x03\x02" + + "\x02\x02\u012D\u068A\x03\x02\x02\x02\u012F\u068F\x03\x02\x02\x02\u0131" + + "\u0696\x03\x02\x02\x02\u0133\u069F\x03\x02\x02\x02\u0135\u06AD\x03\x02" + + "\x02\x02\u0137\u06B4\x03\x02\x02\x02\u0139\u06C0\x03\x02\x02\x02\u013B" + + "\u06C8\x03\x02\x02\x02\u013D\u06D1\x03\x02\x02\x02\u013F\u06DC\x03\x02" + + "\x02\x02\u0141\u06E7\x03\x02\x02\x02\u0143\u06EC\x03\x02\x02\x02\u0145" + + "\u06F6\x03\x02\x02\x02\u0147\u06F8\x03\x02\x02\x02\u0149\u06FB\x03\x02" + + "\x02\x02\u014B\u06FF\x03\x02\x02\x02\u014D\u0704\x03\x02\x02\x02\u014F" + + "\u070C\x03\x02\x02\x02\u0151\u0711\x03\x02\x02\x02\u0153\u0717\x03\x02" + + "\x02\x02\u0155\u0719\x03\x02\x02\x02\u0157\u071D\x03\x02\x02\x02\u0159" + + "\u0723\x03\x02\x02\x02\u015B\u0726\x03\x02\x02\x02\u015D\u072A\x03\x02" + + "\x02\x02\u015F\u0730\x03\x02\x02\x02\u0161\u0735\x03\x02\x02\x02\u0163" + + "\u0739\x03\x02\x02\x02\u0165\u073C\x03\x02\x02\x02\u0167\u0740\x03\x02" + + "\x02\x02\u0169\u0746\x03\x02\x02\x02\u016B\u074B\x03\x02\x02\x02\u016D" + + "\u0751\x03\x02\x02\x02\u016F\u0756\x03\x02\x02\x02\u0171\u075B\x03\x02" + + "\x02\x02\u0173\u0764\x03\x02\x02\x02\u0175\u0769\x03\x02\x02\x02\u0177" + + "\u076E\x03\x02\x02\x02\u0179\u0773\x03\x02\x02\x02\u017B\u0779\x03\x02" + + "\x02\x02\u017D\u077D\x03\x02\x02\x02\u017F\u0781\x03\x02\x02\x02\u0181" + + "\u0789\x03\x02\x02\x02\u0183\u0791\x03\x02\x02\x02\u0185\u0795\x03\x02" + + "\x02\x02\u0187\u0799\x03\x02\x02\x02\u0189\u07A1\x03\x02\x02\x02\u018B" + + "\u07A9\x03\x02\x02\x02\u018D\u07B6\x03\x02\x02\x02\u018F\u07C3\x03\x02" + + "\x02\x02\u0191\u07D5\x03\x02\x02\x02\u0193\u07DD\x03\x02\x02\x02\u0195" + + "\u07E2\x03\x02\x02\x02\u0197\u07EB\x03\x02\x02\x02\u0199\u07F7\x03\x02" + + "\x02\x02\u019B\u0800\x03\x02\x02\x02\u019D\u0808\x03\x02\x02\x02\u019F" + + "\u0813\x03\x02\x02\x02\u01A1\u081D\x03\x02\x02\x02\u01A3\u0827\x03\x02" + + "\x02\x02\u01A5\u0831\x03\x02\x02\x02\u01A7\u083B\x03\x02\x02\x02\u01A9" + + "\u084A\x03\x02\x02\x02\u01AB\u0858\x03\x02\x02\x02\u01AD\u0861\x03\x02" + + "\x02\x02\u01AF\u086A\x03\x02\x02\x02\u01B1\u0874\x03\x02\x02\x02\u01B3" + + "\u0878\x03\x02\x02\x02\u01B5\u0883\x03\x02\x02\x02\u01B7\u088F\x03\x02" + + "\x02\x02\u01B9\u0897\x03\x02\x02\x02\u01BB\u089F\x03\x02\x02\x02\u01BD" + + "\u08A4\x03\x02\x02\x02\u01BF\u08B0\x03\x02\x02\x02\u01C1\u08BA\x03\x02" + + "\x02\x02\u01C3\u08C2\x03\x02\x02\x02\u01C5\u08CB\x03\x02\x02\x02\u01C7" + + "\u08D4\x03\x02\x02\x02\u01C9\u08E2\x03\x02\x02\x02\u01CB\u08F1\x03\x02" + + "\x02\x02\u01CD\u08F8\x03\x02\x02\x02\u01CF\u0902\x03\x02\x02\x02\u01D1" + + "\u0908\x03\x02\x02\x02\u01D3\u090E\x03\x02\x02\x02\u01D5\u0913\x03\x02" + + "\x02\x02\u01D7\u0916\x03\x02\x02\x02\u01D9\u091C\x03\x02\x02\x02\u01DB" + + "\u0922\x03\x02\x02\x02\u01DD\u0929\x03\x02\x02\x02\u01DF\u0933\x03\x02" + + "\x02\x02\u01E1\u093A\x03\x02\x02\x02\u01E3\u0941\x03\x02\x02\x02\u01E5" + + "\u0947\x03\x02\x02\x02\u01E7\u094C\x03\x02\x02\x02\u01E9\u0952\x03\x02" + + "\x02\x02\u01EB\u0959\x03\x02\x02\x02\u01ED\u0961\x03\x02\x02\x02\u01EF" + + "\u0966\x03\x02\x02\x02\u01F1\u096B\x03\x02\x02\x02\u01F3\u0972\x03\x02" + + "\x02\x02\u01F5\u097C\x03\x02\x02\x02\u01F7\u0983\x03\x02\x02\x02\u01F9" + + "\u098A\x03\x02\x02\x02\u01FB\u098D\x03\x02\x02\x02\u01FD\u0994\x03\x02" + + "\x02\x02\u01FF\u099A\x03\x02\x02\x02\u0201\u09A7\x03\x02\x02\x02\u0203" + + "\u09BB\x03\x02\x02\x02\u0205\u09CD\x03\x02\x02\x02\u0207\u09E1\x03\x02" + + "\x02\x02\u0209\u09ED\x03\x02\x02\x02\u020B\u09FA\x03\x02\x02\x02\u020D" + + "\u0A11\x03\x02\x02\x02\u020F\u0A22\x03\x02\x02\x02\u0211\u0A2B\x03\x02" + + "\x02\x02\u0213\u0A4F\x03\x02\x02\x02\u0215\u0A55\x03\x02\x02\x02\u0217" + + "\u0A66\x03\x02\x02\x02\u0219\u0A74\x03\x02\x02\x02\u021B\u0A85\x03\x02" + + "\x02\x02\u021D\u0AA0\x03\x02\x02\x02\u021F\u0AA7\x03\x02\x02\x02\u0221" + + "\u0AAD\x03\x02\x02\x02\u0223\u0AC2\x03\x02\x02\x02\u0225\u0AD6\x03\x02" + + "\x02\x02\u0227\u0AEB\x03\x02\x02\x02\u0229\u0AF9\x03\x02\x02\x02\u022B" + + "\u0B03\x03\x02\x02\x02\u022D\u0B0B\x03\x02\x02\x02\u022F\u0B1D\x03\x02" + + "\x02\x02\u0231\u0B35\x03\x02\x02\x02\u0233\u0B44\x03\x02\x02\x02\u0235" + + "\u0B59\x03\x02\x02\x02\u0237\u0B62\x03\x02\x02\x02\u0239\u0B6E\x03\x02" + + "\x02\x02\u023B\u0B7C\x03\x02\x02\x02\u023D\u0B8B\x03\x02\x02\x02\u023F" + + "\u0B9E\x03\x02\x02\x02\u0241\u0BA6\x03\x02\x02\x02\u0243\u0BAB\x03\x02" + + "\x02\x02\u0245\u0BB7\x03\x02\x02\x02\u0247\u0BBC\x03\x02\x02\x02\u0249" + + "\u0BCD\x03\x02\x02\x02\u024B\u0BD2\x03\x02\x02\x02\u024D\u0BD5\x03\x02" + + "\x02\x02\u024F\u0BD7\x03\x02\x02\x02\u0251\u0BD9\x03\x02\x02\x02\u0253" + + "\u0BDB\x03\x02\x02\x02\u0255\u0BDD\x03\x02\x02\x02\u0257\u0BDF\x03\x02" + + "\x02\x02\u0259\u0BE1\x03\x02\x02\x02\u025B\u0BE4\x03\x02\x02\x02\u025D" + + "\u0BED\x03\x02\x02\x02\u025F\u0BFD\x03\x02\x02\x02\u0261\u0C01\x03\x02" + + "\x02\x02\u0263\u0C0B\x03\x02\x02\x02\u0265\u0C0E\x03\x02\x02\x02\u0267" + + "\u0C1B\x03\x02\x02\x02\u0269\u0C28\x03\x02\x02\x02\u026B\u0C35\x03\x02" + + "\x02\x02\u026D\u0C37\x03\x02\x02\x02\u026F\u0270\x07U\x02\x02\u0270\u0271" + + "\x07G\x02\x02\u0271\u0272\x07C\x02\x02\u0272\u0273\x07T\x02\x02\u0273" + + "\u0274\x07E\x02\x02\u0274\u0275\x07J\x02\x02\u0275\x04\x03\x02\x02\x02" + + "\u0276\u0277\x07F\x02\x02\u0277\u0278\x07G\x02\x02\u0278\u0279\x07U\x02" + + "\x02\u0279\u027A\x07E\x02\x02\u027A\u027B\x07T\x02\x02\u027B\u027C\x07" + + "K\x02\x02\u027C\u027D\x07D\x02\x02\u027D\u027E\x07G\x02\x02\u027E\x06" + + "\x03\x02\x02\x02\u027F\u0280\x07U\x02\x02\u0280\u0281\x07J\x02\x02\u0281" + + "\u0282\x07Q\x02\x02\u0282\u0283\x07Y\x02\x02\u0283\b\x03\x02\x02\x02\u0284" + + "\u0285\x07H\x02\x02\u0285\u0286\x07T\x02\x02\u0286\u0287\x07Q\x02\x02" + + "\u0287\u0288\x07O\x02\x02\u0288\n\x03\x02\x02\x02\u0289\u028A\x07Y\x02" + + "\x02\u028A\u028B\x07J\x02\x02\u028B\u028C\x07G\x02\x02\u028C\u028D\x07" + + "T\x02\x02\u028D\u028E\x07G\x02\x02\u028E\f\x03\x02\x02\x02\u028F\u0290" + + "\x07H\x02\x02\u0290\u0291\x07K\x02\x02\u0291\u0292\x07G\x02\x02\u0292" + + "\u0293\x07N\x02\x02\u0293\u0294\x07F\x02\x02\u0294\u0295\x07U\x02\x02" + + "\u0295\x0E\x03\x02\x02\x02\u0296\u0297\x07T\x02\x02\u0297\u0298\x07G\x02" + + "\x02\u0298\u0299\x07P\x02\x02\u0299\u029A\x07C\x02\x02\u029A\u029B\x07" + + "O\x02\x02\u029B\u029C\x07G\x02\x02\u029C\x10\x03\x02\x02\x02\u029D\u029E" + + "\x07U\x02\x02\u029E\u029F\x07V\x02\x02\u029F\u02A0\x07C\x02\x02\u02A0" + + "\u02A1\x07V\x02\x02\u02A1\u02A2\x07U\x02\x02\u02A2\x12\x03\x02\x02\x02" + + "\u02A3\u02A4\x07F\x02\x02\u02A4\u02A5\x07G\x02\x02\u02A5\u02A6\x07F\x02" + + "\x02\u02A6\u02A7\x07W\x02\x02\u02A7\u02A8\x07R\x02\x02\u02A8\x14\x03\x02" + + "\x02\x02\u02A9\u02AA\x07U\x02\x02\u02AA\u02AB\x07Q\x02\x02\u02AB\u02AC" + + "\x07T\x02\x02\u02AC\u02AD\x07V\x02\x02\u02AD\x16\x03\x02\x02\x02\u02AE" + + "\u02AF\x07G\x02\x02\u02AF\u02B0\x07X\x02\x02\u02B0\u02B1\x07C\x02\x02" + + "\u02B1\u02B2\x07N\x02\x02\u02B2\x18\x03\x02\x02\x02\u02B3\u02B4\x07J\x02" + + "\x02\u02B4\u02B5\x07G\x02\x02\u02B5\u02B6\x07C\x02\x02\u02B6\u02B7\x07" + + "F\x02\x02\u02B7\x1A\x03\x02\x02\x02\u02B8\u02B9\x07V\x02\x02\u02B9\u02BA" + + "\x07Q\x02\x02\u02BA\u02BB\x07R\x02\x02\u02BB\x1C\x03\x02\x02\x02\u02BC" + + "\u02BD\x07T\x02\x02\u02BD\u02BE\x07C\x02\x02\u02BE\u02BF\x07T\x02\x02" + + "\u02BF\u02C0\x07G\x02\x02\u02C0\x1E\x03\x02\x02\x02\u02C1\u02C2\x07R\x02" + + "\x02\u02C2\u02C3\x07C\x02\x02\u02C3\u02C4\x07T\x02\x02\u02C4\u02C5\x07" + + "U\x02\x02\u02C5\u02C6\x07G\x02\x02\u02C6 \x03\x02\x02\x02\u02C7\u02C8" + + "\x07O\x02\x02\u02C8\u02C9\x07G\x02\x02\u02C9\u02CA\x07V\x02\x02\u02CA" + + "\u02CB\x07J\x02\x02\u02CB\u02CC\x07Q\x02\x02\u02CC\u02CD\x07F\x02\x02" + + "\u02CD\"\x03\x02\x02\x02\u02CE\u02CF\x07T\x02\x02\u02CF\u02D0\x07G\x02" + + "\x02\u02D0\u02D1\x07I\x02\x02\u02D1\u02D2\x07G\x02\x02\u02D2\u02D3\x07" + + "Z\x02\x02\u02D3$\x03\x02\x02\x02\u02D4\u02D5\x07R\x02\x02\u02D5\u02D6" + + "\x07W\x02\x02\u02D6\u02D7\x07P\x02\x02\u02D7\u02D8\x07E\x02\x02\u02D8" + + "\u02D9\x07V\x02\x02\u02D9&\x03\x02\x02\x02\u02DA\u02DB\x07I\x02\x02\u02DB" + + "\u02DC\x07T\x02\x02\u02DC\u02DD\x07Q\x02\x02\u02DD\u02DE\x07M\x02\x02" + + "\u02DE(\x03\x02\x02\x02\u02DF\u02E0\x07R\x02\x02\u02E0\u02E1\x07C\x02" + + "\x02\u02E1\u02E2\x07V\x02\x02\u02E2\u02E3\x07V\x02\x02\u02E3\u02E4\x07" + + "G\x02\x02\u02E4\u02E5\x07T\x02\x02\u02E5\u02E6\x07P\x02\x02\u02E6*\x03" + + "\x02\x02\x02\u02E7\u02E8\x07R\x02\x02\u02E8\u02E9\x07C\x02\x02\u02E9\u02EA" + + "\x07V\x02\x02\u02EA\u02EB\x07V\x02\x02\u02EB\u02EC\x07G\x02\x02\u02EC" + + "\u02ED\x07T\x02\x02\u02ED\u02EE\x07P\x02\x02\u02EE\u02EF\x07U\x02\x02" + + "\u02EF,\x03\x02\x02\x02\u02F0\u02F1\x07P\x02\x02\u02F1\u02F2\x07G\x02" + + "\x02\u02F2\u02F3\x07Y\x02\x02\u02F3\u02F4\x07a\x02\x02\u02F4\u02F5\x07" + + "H\x02\x02\u02F5\u02F6\x07K\x02\x02\u02F6\u02F7\x07G\x02\x02\u02F7\u02F8" + + "\x07N\x02\x02\u02F8\u02F9\x07F\x02\x02\u02F9.\x03\x02\x02\x02\u02FA\u02FB" + + "\x07M\x02\x02\u02FB\u02FC\x07O\x02\x02\u02FC\u02FD\x07G\x02\x02\u02FD" + + "\u02FE\x07C\x02\x02\u02FE\u02FF\x07P\x02\x02\u02FF\u0300\x07U\x02\x02" + + "\u03000\x03\x02\x02\x02\u0301\u0302\x07C\x02\x02\u0302\u0303\x07F\x02" + + "\x02\u03032\x03\x02\x02\x02\u0304\u0305\x07O\x02\x02\u0305\u0306\x07N" + + "\x02\x02\u03064\x03\x02\x02\x02\u0307\u0308\x07C\x02\x02\u0308\u0309\x07" + + "U\x02\x02\u03096\x03\x02\x02\x02\u030A\u030B\x07D\x02\x02\u030B\u030C" + + "\x07[\x02\x02\u030C8\x03\x02\x02\x02\u030D\u030E\x07U\x02\x02\u030E\u030F" + + "\x07Q\x02\x02\u030F\u0310\x07W\x02\x02\u0310\u0311\x07T\x02\x02\u0311" + + "\u0312\x07E\x02\x02\u0312\u0313\x07G\x02\x02\u0313:\x03\x02\x02\x02\u0314" + + "\u0315\x07K\x02\x02\u0315\u0316\x07P\x02\x02\u0316\u0317\x07F\x02\x02" + + "\u0317\u0318\x07G\x02\x02\u0318\u0319\x07Z\x02\x02\u0319<\x03\x02\x02" + + "\x02\u031A\u031B\x07F\x02\x02\u031B>\x03\x02\x02\x02\u031C\u031D\x07F" + + "\x02\x02\u031D\u031E\x07G\x02\x02\u031E\u031F\x07U\x02\x02\u031F\u0320" + + "\x07E\x02\x02\u0320@\x03\x02\x02\x02\u0321\u0322\x07E\x02\x02\u0322\u0323" + + "\x07C\x02\x02\u0323\u0324\x07V\x02\x02\u0324\u0325\x07C\x02\x02\u0325" + + "\u0326\x07N\x02\x02\u0326\u0327\x07Q\x02\x02\u0327\u0328\x07I\x02\x02" + + "\u0328\u0329\x07U\x02\x02\u0329B\x03\x02\x02\x02\u032A\u032B\x07U\x02" + + "\x02\u032B\u032C\x07Q\x02\x02\u032C\u032D\x07T\x02\x02\u032D\u032E\x07" + + "V\x02\x02\u032E\u032F\x07D\x02\x02\u032F\u0330\x07[\x02\x02\u0330D\x03" + + "\x02\x02\x02\u0331\u0332\x07C\x02\x02\u0332\u0333\x07W\x02\x02\u0333\u0334" + + "\x07V\x02\x02\u0334\u0335\x07Q\x02\x02\u0335F\x03\x02\x02\x02\u0336\u0337" + + "\x07U\x02\x02\u0337\u0338\x07V\x02\x02\u0338\u0339\x07T\x02\x02\u0339" + + "H\x03\x02\x02\x02\u033A\u033B\x07K\x02\x02\u033B\u033C\x07R\x02\x02\u033C" + + "J\x03\x02\x02\x02\u033D\u033E\x07P\x02\x02\u033E\u033F\x07W\x02\x02\u033F" + + "\u0340\x07O\x02\x02\u0340L\x03\x02\x02\x02\u0341\u0342\x07M\x02\x02\u0342" + + "\u0343\x07G\x02\x02\u0343\u0344\x07G\x02\x02\u0344\u0345\x07R\x02\x02" + + "\u0345\u0346\x07G\x02\x02\u0346\u0347\x07O\x02\x02\u0347\u0348\x07R\x02" + + "\x02\u0348\u0349\x07V\x02\x02\u0349\u034A\x07[\x02\x02\u034AN\x03\x02" + + "\x02\x02\u034B\u034C\x07E\x02\x02\u034C\u034D\x07Q\x02\x02\u034D\u034E" + + "\x07P\x02\x02\u034E\u034F\x07U\x02\x02\u034F\u0350\x07G\x02\x02\u0350" + + "\u0351\x07E\x02\x02\u0351\u0352\x07W\x02\x02\u0352\u0353\x07V\x02\x02" + + "\u0353\u0354\x07K\x02\x02\u0354\u0355\x07X\x02\x02\u0355\u0356\x07G\x02" + + "\x02\u0356P\x03\x02\x02\x02\u0357\u0358\x07F\x02\x02\u0358\u0359\x07G" + + "\x02\x02\u0359\u035A\x07F\x02\x02\u035A\u035B\x07W\x02\x02\u035B\u035C" + + "\x07R\x02\x02\u035C\u035D\x07a\x02\x02\u035D\u035E\x07U\x02\x02\u035E" + + "\u035F\x07R\x02\x02\u035F\u0360\x07N\x02\x02\u0360\u0361\x07K\x02\x02" + + "\u0361\u0362\x07V\x02\x02\u0362\u0363\x07X\x02\x02\u0363\u0364\x07C\x02" + + "\x02\u0364\u0365\x07N\x02\x02\u0365\u0366\x07W\x02\x02\u0366\u0367\x07" + + "G\x02\x02\u0367\u0368\x07U\x02\x02\u0368R\x03\x02\x02\x02\u0369\u036A" + + "\x07R\x02\x02\u036A\u036B\x07C\x02\x02\u036B\u036C\x07T\x02\x02\u036C" + + "\u036D\x07V\x02\x02\u036D\u036E\x07K\x02\x02\u036E\u036F\x07V\x02\x02" + + "\u036F\u0370\x07K\x02\x02\u0370\u0371\x07Q\x02\x02\u0371\u0372\x07P\x02" + + "\x02\u0372\u0373\x07U\x02\x02\u0373T\x03\x02\x02\x02\u0374\u0375\x07C" + + "\x02\x02\u0375\u0376\x07N\x02\x02\u0376\u0377\x07N\x02\x02\u0377\u0378" + + "\x07P\x02\x02\u0378\u0379\x07W\x02\x02\u0379\u037A\x07O\x02\x02\u037A" + + "V\x03\x02\x02\x02\u037B\u037C\x07F\x02\x02\u037C\u037D\x07G\x02\x02\u037D" + + "\u037E\x07N\x02\x02\u037E\u037F\x07K\x02\x02\u037F\u0380\x07O\x02\x02" + + "\u0380X\x03\x02\x02\x02\u0381\u0382\x07E\x02\x02\u0382\u0383\x07G\x02" + + "\x02\u0383\u0384\x07P\x02\x02\u0384\u0385\x07V\x02\x02\u0385\u0386\x07" + + "T\x02\x02\u0386\u0387\x07Q\x02\x02\u0387\u0388\x07K\x02\x02\u0388\u0389" + + "\x07F\x02\x02\u0389\u038A\x07U\x02\x02\u038AZ\x03\x02\x02\x02\u038B\u038C" + + "\x07K\x02\x02\u038C\u038D\x07V\x02\x02\u038D\u038E\x07G\x02\x02\u038E" + + "\u038F\x07T\x02\x02\u038F\u0390\x07C\x02\x02\u0390\u0391\x07V\x02\x02" + + "\u0391\u0392\x07K\x02\x02\u0392\u0393\x07Q\x02\x02\u0393\u0394\x07P\x02" + + "\x02\u0394\u0395\x07U\x02\x02\u0395\\\x03\x02\x02\x02\u0396\u0397\x07" + + "F\x02\x02\u0397\u0398\x07K\x02\x02\u0398\u0399\x07U\x02\x02\u0399\u039A" + + "\x07V\x02\x02\u039A\u039B\x07C\x02\x02\u039B\u039C\x07P\x02\x02\u039C" + + "\u039D\x07E\x02\x02\u039D\u039E\x07G\x02\x02\u039E\u039F\x07a\x02\x02" + + "\u039F\u03A0\x07V\x02\x02\u03A0\u03A1\x07[\x02\x02\u03A1\u03A2\x07R\x02" + + "\x02\u03A2\u03A3\x07G\x02\x02\u03A3^\x03\x02\x02\x02\u03A4\u03A5\x07P" + + "\x02\x02\u03A5\u03A6\x07W\x02\x02\u03A6\u03A7\x07O\x02\x02\u03A7\u03A8" + + "\x07D\x02\x02\u03A8\u03A9\x07G\x02\x02\u03A9\u03AA\x07T\x02\x02\u03AA" + + "\u03AB\x07a\x02\x02\u03AB\u03AC\x07Q\x02\x02\u03AC\u03AD\x07H\x02\x02" + + "\u03AD\u03AE\x07a\x02\x02\u03AE\u03AF\x07V\x02\x02\u03AF\u03B0\x07T\x02" + + "\x02\u03B0\u03B1\x07G\x02\x02\u03B1\u03B2\x07G\x02\x02\u03B2\u03B3\x07" + + "U\x02\x02\u03B3`\x03\x02\x02\x02\u03B4\u03B5\x07U\x02\x02\u03B5\u03B6" + + "\x07J\x02\x02\u03B6\u03B7\x07K\x02\x02\u03B7\u03B8\x07P\x02\x02\u03B8" + + "\u03B9\x07I\x02\x02\u03B9\u03BA\x07N\x02\x02\u03BA\u03BB\x07G\x02\x02" + + "\u03BB\u03BC\x07a\x02\x02\u03BC\u03BD\x07U\x02\x02\u03BD\u03BE\x07K\x02" + + "\x02\u03BE\u03BF\x07\\\x02\x02\u03BF\u03C0\x07G\x02\x02\u03C0b\x03\x02" + + "\x02\x02\u03C1\u03C2\x07U\x02\x02\u03C2\u03C3\x07C\x02\x02\u03C3\u03C4" + + "\x07O\x02\x02\u03C4\u03C5\x07R\x02\x02\u03C5\u03C6\x07N\x02\x02\u03C6" + + "\u03C7\x07G\x02\x02\u03C7\u03C8\x07a\x02\x02\u03C8\u03C9\x07U\x02\x02" + + "\u03C9\u03CA\x07K\x02\x02\u03CA\u03CB\x07\\\x02\x02\u03CB\u03CC\x07G\x02" + + "\x02\u03CCd\x03\x02\x02\x02\u03CD\u03CE\x07Q\x02\x02\u03CE\u03CF\x07W" + + "\x02\x02\u03CF\u03D0\x07V\x02\x02\u03D0\u03D1\x07R\x02\x02\u03D1\u03D2" + + "\x07W\x02\x02\u03D2\u03D3\x07V\x02\x02\u03D3\u03D4\x07a\x02\x02\u03D4" + + "\u03D5\x07C\x02\x02\u03D5\u03D6\x07H\x02\x02\u03D6\u03D7\x07V\x02\x02" + + "\u03D7\u03D8\x07G\x02\x02\u03D8\u03D9\x07T\x02\x02\u03D9f\x03\x02\x02" + + "\x02\u03DA\u03DB\x07V\x02\x02\u03DB\u03DC\x07K\x02\x02\u03DC\u03DD\x07" + + "O\x02\x02\u03DD\u03DE\x07G\x02\x02\u03DE\u03DF\x07a\x02\x02\u03DF\u03E0" + + "\x07F\x02\x02\u03E0\u03E1\x07G\x02\x02\u03E1\u03E2\x07E\x02\x02\u03E2" + + "\u03E3\x07C\x02\x02\u03E3\u03E4\x07[\x02\x02\u03E4h\x03\x02\x02\x02\u03E5" + + "\u03E6\x07C\x02\x02\u03E6\u03E7\x07P\x02\x02\u03E7\u03E8\x07Q\x02\x02" + + "\u03E8\u03E9\x07O\x02\x02\u03E9\u03EA\x07C\x02\x02\u03EA\u03EB\x07N\x02" + + "\x02\u03EB\u03EC\x07[\x02\x02\u03EC\u03ED\x07a\x02\x02\u03ED\u03EE\x07" + + "T\x02\x02\u03EE\u03EF\x07C\x02\x02\u03EF\u03F0\x07V\x02\x02\u03F0\u03F1" + + "\x07G\x02\x02\u03F1j\x03\x02\x02\x02\u03F2\u03F3\x07E\x02\x02\u03F3\u03F4" + + "\x07C\x02\x02\u03F4\u03F5\x07V\x02\x02\u03F5\u03F6\x07G\x02\x02\u03F6" + + "\u03F7\x07I\x02\x02\u03F7\u03F8\x07Q\x02\x02\u03F8\u03F9\x07T\x02\x02" + + "\u03F9\u03FA\x07[\x02\x02\u03FA\u03FB\x07a\x02\x02\u03FB\u03FC\x07H\x02" + + "\x02\u03FC\u03FD\x07K\x02\x02\u03FD\u03FE\x07G\x02\x02\u03FE\u03FF\x07" + + "N\x02\x02\u03FF\u0400\x07F\x02\x02\u0400l\x03\x02\x02\x02\u0401\u0402" + + "\x07V\x02\x02\u0402\u0403\x07K\x02\x02\u0403\u0404\x07O\x02\x02\u0404" + + "\u0405\x07G\x02\x02\u0405\u0406\x07a\x02\x02\u0406\u0407\x07H\x02\x02" + + "\u0407\u0408\x07K\x02\x02\u0408\u0409\x07G\x02\x02\u0409\u040A\x07N\x02" + + "\x02\u040A\u040B\x07F\x02\x02\u040Bn\x03\x02\x02\x02\u040C\u040D\x07V" + + "\x02\x02\u040D\u040E\x07K\x02\x02\u040E\u040F\x07O\x02\x02\u040F\u0410" + + "\x07G\x02\x02\u0410\u0411\x07a\x02\x02\u0411\u0412\x07\\\x02\x02\u0412" + + "\u0413\x07Q\x02\x02\u0413\u0414\x07P\x02\x02\u0414\u0415\x07G\x02\x02" + + "\u0415p\x03\x02\x02\x02\u0416\u0417\x07V\x02\x02\u0417\u0418\x07T\x02" + + "\x02\u0418\u0419\x07C\x02\x02\u0419\u041A\x07K\x02\x02\u041A\u041B\x07" + + "P\x02\x02\u041B\u041C\x07K\x02\x02\u041C\u041D\x07P\x02\x02\u041D\u041E" + + "\x07I\x02\x02\u041E\u041F\x07a\x02\x02\u041F\u0420\x07F\x02\x02\u0420" + + "\u0421\x07C\x02\x02\u0421\u0422\x07V\x02\x02\u0422\u0423\x07C\x02\x02" + + "\u0423\u0424\x07a\x02\x02\u0424\u0425\x07U\x02\x02\u0425\u0426\x07K\x02" + + "\x02\u0426\u0427\x07\\\x02\x02\u0427\u0428\x07G\x02\x02\u0428r\x03\x02" + + "\x02\x02\u0429\u042A\x07C\x02\x02\u042A\u042B\x07P\x02\x02\u042B\u042C" + + "\x07Q\x02\x02\u042C\u042D\x07O\x02\x02\u042D\u042E\x07C\x02\x02\u042E" + + "\u042F\x07N\x02\x02\u042F\u0430\x07[\x02\x02\u0430\u0431\x07a\x02\x02" + + "\u0431\u0432\x07U\x02\x02\u0432\u0433\x07E\x02\x02\u0433\u0434\x07Q\x02" + + "\x02\u0434\u0435\x07T\x02\x02\u0435\u0436\x07G\x02\x02\u0436\u0437\x07" + + "a\x02\x02\u0437\u0438\x07V\x02\x02\u0438\u0439\x07J\x02\x02\u0439\u043A" + + "\x07T\x02\x02\u043A\u043B\x07G\x02\x02\u043B\u043C\x07U\x02\x02\u043C" + + "\u043D\x07J\x02\x02\u043D\u043E\x07Q\x02\x02\u043E\u043F\x07N\x02\x02" + + "\u043F\u0440\x07F\x02\x02\u0440t\x03\x02\x02\x02\u0441\u0442\x07E\x02" + + "\x02\u0442\u0443\x07C\x02\x02\u0443\u0444\x07U\x02\x02\u0444\u0445\x07" + + "G\x02\x02\u0445v\x03\x02\x02\x02\u0446\u0447\x07K\x02\x02\u0447\u0448" + + "\x07P\x02\x02\u0448x\x03\x02\x02\x02\u0449\u044A\x07P\x02\x02\u044A\u044B" + + "\x07Q\x02\x02\u044B\u044C\x07V\x02\x02\u044Cz\x03\x02\x02\x02\u044D\u044E" + + "\x07Q\x02\x02\u044E\u044F\x07T\x02\x02\u044F|\x03\x02\x02\x02\u0450\u0451" + + "\x07C\x02\x02\u0451\u0452\x07P\x02\x02\u0452\u0453\x07F\x02\x02\u0453" + + "~\x03\x02\x02\x02\u0454\u0455\x07Z\x02\x02\u0455\u0456\x07Q\x02\x02\u0456" + + "\u0457\x07T\x02\x02\u0457\x80\x03\x02\x02\x02\u0458\u0459\x07V\x02\x02" + + "\u0459\u045A\x07T\x02\x02\u045A\u045B\x07W\x02\x02\u045B\u045C\x07G\x02" + + "\x02\u045C\x82\x03\x02\x02\x02\u045D\u045E\x07H\x02\x02\u045E\u045F\x07" + + "C\x02\x02\u045F\u0460\x07N\x02\x02\u0460\u0461\x07U\x02\x02\u0461\u0462" + + "\x07G\x02\x02\u0462\x84\x03\x02\x02\x02\u0463\u0464\x07T\x02\x02\u0464" + + "\u0465\x07G\x02\x02\u0465\u0466\x07I\x02\x02\u0466\u0467\x07G\x02\x02" + + "\u0467\u0468\x07Z\x02\x02\u0468\u0469\x07R\x02\x02\u0469\x86\x03\x02\x02" + + "\x02\u046A\u046B\x07F\x02\x02\u046B\u046C\x07C\x02\x02\u046C\u046D\x07" + + "V\x02\x02\u046D\u046E\x07G\x02\x02\u046E\u046F\x07V\x02\x02\u046F\u0470" + + "\x07K\x02\x02\u0470\u0471\x07O\x02\x02\u0471\u0472\x07G\x02\x02\u0472" + + "\x88\x03\x02\x02\x02\u0473\u0474\x07K\x02\x02\u0474\u0475\x07P\x02\x02" + + "\u0475\u0476\x07V\x02\x02\u0476\u0477\x07G\x02\x02\u0477\u0478\x07T\x02" + + "\x02\u0478\u0479\x07X\x02\x02\u0479\u047A\x07C\x02\x02\u047A\u047B\x07" + + "N\x02\x02\u047B\x8A\x03\x02\x02\x02\u047C\u047D\x07O\x02\x02\u047D\u047E" + + "\x07K\x02\x02\u047E\u047F\x07E\x02\x02\u047F\u0480\x07T\x02\x02\u0480" + + "\u0481\x07Q\x02\x02\u0481\u0482\x07U\x02\x02\u0482\u0483\x07G\x02\x02" + + "\u0483\u0484\x07E\x02\x02\u0484\u0485\x07Q\x02\x02\u0485\u0486\x07P\x02" + + "\x02\u0486\u0487\x07F\x02\x02\u0487\x8C\x03\x02\x02\x02\u0488\u0489\x07" + + "O\x02\x02\u0489\u048A\x07K\x02\x02\u048A\u048B\x07N\x02\x02\u048B\u048C" + + "\x07N\x02\x02\u048C\u048D\x07K\x02\x02\u048D\u048E\x07U\x02\x02\u048E" + + "\u048F\x07G\x02\x02\u048F\u0490\x07E\x02\x02\u0490\u0491\x07Q\x02\x02" + + "\u0491\u0492\x07P\x02\x02\u0492\u0493\x07F\x02\x02\u0493\x8E\x03\x02\x02" + + "\x02\u0494\u0495\x07U\x02\x02\u0495\u0496\x07G\x02\x02\u0496\u0497\x07" + + "E\x02\x02\u0497\u0498\x07Q\x02\x02\u0498\u0499\x07P\x02\x02\u0499\u049A" + + "\x07F\x02\x02\u049A\x90\x03\x02\x02\x02\u049B\u049C\x07O\x02\x02\u049C" + + "\u049D\x07K\x02\x02\u049D\u049E\x07P\x02\x02\u049E\u049F\x07W\x02\x02" + + "\u049F\u04A0\x07V\x02\x02\u04A0\u04A1\x07G\x02\x02\u04A1\x92\x03\x02\x02" + + "\x02\u04A2\u04A3\x07J\x02\x02\u04A3\u04A4\x07Q\x02\x02\u04A4\u04A5\x07" + + "W\x02\x02\u04A5\u04A6\x07T\x02\x02\u04A6\x94\x03\x02\x02\x02\u04A7\u04A8" + + "\x07F\x02\x02\u04A8\u04A9\x07C\x02\x02\u04A9\u04AA\x07[\x02\x02\u04AA" + + "\x96\x03\x02\x02\x02\u04AB\u04AC\x07Y\x02\x02\u04AC\u04AD\x07G\x02\x02" + + "\u04AD\u04AE\x07G\x02\x02\u04AE\u04AF\x07M\x02\x02\u04AF\x98\x03\x02\x02" + + "\x02\u04B0\u04B1\x07O\x02\x02\u04B1\u04B2\x07Q\x02\x02\u04B2\u04B3\x07" + + "P\x02\x02\u04B3\u04B4\x07V\x02\x02\u04B4\u04B5\x07J\x02\x02\u04B5\x9A" + + "\x03\x02\x02\x02\u04B6\u04B7\x07S\x02\x02\u04B7\u04B8\x07W\x02\x02\u04B8" + + "\u04B9\x07C\x02\x02\u04B9\u04BA\x07T\x02\x02\u04BA\u04BB\x07V\x02\x02" + + "\u04BB\u04BC\x07G\x02\x02\u04BC\u04BD\x07T\x02\x02\u04BD\x9C\x03\x02\x02" + + "\x02\u04BE\u04BF\x07[\x02\x02\u04BF\u04C0\x07G\x02\x02\u04C0\u04C1\x07" + + "C\x02\x02\u04C1\u04C2\x07T\x02\x02\u04C2\x9E\x03\x02\x02\x02\u04C3\u04C4" + + "\x07U\x02\x02\u04C4\u04C5\x07G\x02\x02\u04C5\u04C6\x07E\x02\x02\u04C6" + + "\u04C7\x07Q\x02\x02\u04C7\u04C8\x07P\x02\x02\u04C8\u04C9\x07F\x02\x02" + + "\u04C9\u04CA\x07a\x02\x02\u04CA\u04CB\x07O\x02\x02\u04CB\u04CC\x07K\x02" + + "\x02\u04CC\u04CD\x07E\x02\x02\u04CD\u04CE\x07T\x02\x02\u04CE\u04CF\x07" + + "Q\x02\x02\u04CF\u04D0\x07U\x02\x02\u04D0\u04D1\x07G\x02\x02\u04D1\u04D2" + + "\x07E\x02\x02\u04D2\u04D3\x07Q\x02\x02\u04D3\u04D4\x07P\x02\x02\u04D4" + + "\u04D5\x07F\x02\x02\u04D5\xA0\x03\x02\x02\x02\u04D6\u04D7\x07O\x02\x02" + + "\u04D7\u04D8\x07K\x02\x02\u04D8\u04D9\x07P\x02\x02\u04D9\u04DA\x07W\x02" + + "\x02\u04DA\u04DB\x07V\x02\x02\u04DB\u04DC\x07G\x02\x02\u04DC\u04DD\x07" + + "a\x02\x02\u04DD\u04DE\x07O\x02\x02\u04DE\u04DF\x07K\x02\x02\u04DF\u04E0" + + "\x07E\x02\x02\u04E0\u04E1\x07T\x02\x02\u04E1\u04E2\x07Q\x02\x02\u04E2" + + "\u04E3\x07U\x02\x02\u04E3\u04E4\x07G\x02\x02\u04E4\u04E5\x07E\x02\x02" + + "\u04E5\u04E6\x07Q\x02\x02\u04E6\u04E7\x07P\x02\x02\u04E7\u04E8\x07F\x02" + + "\x02\u04E8\xA2\x03\x02\x02\x02\u04E9\u04EA\x07O\x02\x02\u04EA\u04EB\x07" + + "K\x02\x02\u04EB\u04EC\x07P\x02\x02\u04EC\u04ED\x07W\x02\x02\u04ED\u04EE" + + "\x07V\x02\x02\u04EE\u04EF\x07G\x02\x02\u04EF\u04F0\x07a\x02\x02\u04F0" + + "\u04F1\x07U\x02\x02\u04F1\u04F2\x07G\x02\x02\u04F2\u04F3\x07E\x02\x02" + + "\u04F3\u04F4\x07Q\x02\x02\u04F4\u04F5\x07P\x02\x02\u04F5\u04F6\x07F\x02" + + "\x02\u04F6\xA4\x03\x02\x02\x02\u04F7\u04F8\x07J\x02\x02\u04F8\u04F9\x07" + + "Q\x02\x02\u04F9\u04FA\x07W\x02\x02\u04FA\u04FB\x07T\x02\x02\u04FB\u04FC" + + "\x07a\x02\x02\u04FC\u04FD\x07O\x02\x02\u04FD\u04FE\x07K\x02\x02\u04FE" + + "\u04FF\x07E\x02\x02\u04FF\u0500\x07T\x02\x02\u0500\u0501\x07Q\x02\x02" + + "\u0501\u0502\x07U\x02\x02\u0502\u0503\x07G\x02\x02\u0503\u0504\x07E\x02" + + "\x02\u0504\u0505\x07Q\x02\x02\u0505\u0506\x07P\x02\x02\u0506\u0507\x07" + + "F\x02\x02\u0507\xA6\x03\x02\x02\x02\u0508\u0509\x07J\x02\x02\u0509\u050A" + + "\x07Q\x02\x02\u050A\u050B\x07W\x02\x02\u050B\u050C\x07T\x02\x02\u050C" + + "\u050D\x07"; + private static readonly _serializedATNSegment3: string = + "a\x02\x02\u050D\u050E\x07U\x02\x02\u050E\u050F\x07G\x02\x02\u050F\u0510" + + "\x07E\x02\x02\u0510\u0511\x07Q\x02\x02\u0511\u0512\x07P\x02\x02\u0512" + + "\u0513\x07F\x02\x02\u0513\xA8\x03\x02\x02\x02\u0514\u0515\x07J\x02\x02" + + "\u0515\u0516\x07Q\x02\x02\u0516\u0517\x07W\x02\x02\u0517\u0518\x07T\x02" + + "\x02\u0518\u0519\x07a\x02\x02\u0519\u051A\x07O\x02\x02\u051A\u051B\x07" + + "K\x02\x02\u051B\u051C\x07P\x02\x02\u051C\u051D\x07W\x02\x02\u051D\u051E" + + "\x07V\x02\x02\u051E\u051F\x07G\x02\x02\u051F\xAA\x03\x02\x02\x02\u0520" + + "\u0521\x07F\x02\x02\u0521\u0522\x07C\x02\x02\u0522\u0523\x07[\x02\x02" + + "\u0523\u0524\x07a\x02\x02\u0524\u0525\x07O\x02\x02\u0525\u0526\x07K\x02" + + "\x02\u0526\u0527\x07E\x02\x02\u0527\u0528\x07T\x02\x02\u0528\u0529\x07" + + "Q\x02\x02\u0529\u052A\x07U\x02\x02\u052A\u052B\x07G\x02\x02\u052B\u052C" + + "\x07E\x02\x02\u052C\u052D\x07Q\x02\x02\u052D\u052E\x07P\x02\x02\u052E" + + "\u052F\x07F\x02\x02\u052F\xAC\x03\x02\x02\x02\u0530\u0531\x07F\x02\x02" + + "\u0531\u0532\x07C\x02\x02\u0532\u0533\x07[\x02\x02\u0533\u0534\x07a\x02" + + "\x02\u0534\u0535\x07U\x02\x02\u0535\u0536\x07G\x02\x02\u0536\u0537\x07" + + "E\x02\x02\u0537\u0538\x07Q\x02\x02\u0538\u0539\x07P\x02\x02\u0539\u053A" + + "\x07F\x02\x02\u053A\xAE\x03\x02\x02\x02\u053B\u053C\x07F\x02\x02\u053C" + + "\u053D\x07C\x02\x02\u053D\u053E\x07[\x02\x02\u053E\u053F\x07a\x02\x02" + + "\u053F\u0540\x07O\x02\x02\u0540\u0541\x07K\x02\x02\u0541\u0542\x07P\x02" + + "\x02\u0542\u0543\x07W\x02\x02\u0543\u0544\x07V\x02\x02\u0544\u0545\x07" + + "G\x02\x02\u0545\xB0\x03\x02\x02\x02\u0546\u0547\x07F\x02\x02\u0547\u0548" + + "\x07C\x02\x02\u0548\u0549\x07[\x02\x02\u0549\u054A\x07a\x02\x02\u054A" + + "\u054B\x07J\x02\x02\u054B\u054C\x07Q\x02\x02\u054C\u054D\x07W\x02\x02" + + "\u054D\u054E\x07T\x02\x02\u054E\xB2\x03\x02\x02\x02\u054F\u0550\x07[\x02" + + "\x02\u0550\u0551\x07G\x02\x02\u0551\u0552\x07C\x02\x02\u0552\u0553\x07" + + "T\x02\x02\u0553\u0554\x07a\x02\x02\u0554\u0555\x07O\x02\x02\u0555\u0556" + + "\x07Q\x02\x02\u0556\u0557\x07P\x02\x02\u0557\u0558\x07V\x02\x02\u0558" + + "\u0559\x07J\x02\x02\u0559\xB4\x03\x02\x02\x02\u055A\u055B\x07E\x02\x02" + + "\u055B\u055C\x07Q\x02\x02\u055C\u055D\x07P\x02\x02\u055D\u055E\x07X\x02" + + "\x02\u055E\u055F\x07G\x02\x02\u055F\u0560\x07T\x02\x02\u0560\u0561\x07" + + "V\x02\x02\u0561\u0562\x07a\x02\x02\u0562\u0563\x07V\x02\x02\u0563\u0564" + + "\x07\\\x02\x02\u0564\xB6\x03\x02\x02\x02\u0565\u0566\x07F\x02\x02\u0566" + + "\u0567\x07C\x02\x02\u0567\u0568\x07V\x02\x02\u0568\u0569\x07C\x02\x02" + + "\u0569\u056A\x07O\x02\x02\u056A\u056B\x07Q\x02\x02\u056B\u056C\x07F\x02" + + "\x02\u056C\u056D\x07G\x02\x02\u056D\u056E\x07N\x02\x02\u056E\xB8\x03\x02" + + "\x02\x02\u056F\u0570\x07N\x02\x02\u0570\u0571\x07Q\x02\x02\u0571\u0572" + + "\x07Q\x02\x02\u0572\u0573\x07M\x02\x02\u0573\u0574\x07W\x02\x02\u0574" + + "\u0575\x07R\x02\x02\u0575\xBA\x03\x02\x02\x02\u0576\u0577\x07U\x02\x02" + + "\u0577\u0578\x07C\x02\x02\u0578\u0579\x07X\x02\x02\u0579\u057A\x07G\x02" + + "\x02\u057A\u057B\x07F\x02\x02\u057B\u057C\x07U\x02\x02\u057C\u057D\x07" + + "G\x02\x02\u057D\u057E\x07C\x02\x02\u057E\u057F\x07T\x02\x02\u057F\u0580" + + "\x07E\x02\x02\u0580\u0581\x07J\x02\x02\u0581\xBC\x03\x02\x02\x02\u0582" + + "\u0583\x07K\x02\x02\u0583\u0584\x07P\x02\x02\u0584\u0585\x07V\x02\x02" + + "\u0585\xBE\x03\x02\x02\x02\u0586\u0587\x07K\x02\x02\u0587\u0588\x07P\x02" + + "\x02\u0588\u0589\x07V\x02\x02\u0589\u058A\x07G\x02\x02\u058A\u058B\x07" + + "I\x02\x02\u058B\u058C\x07G\x02\x02\u058C\u058D\x07T\x02\x02\u058D\xC0" + + "\x03\x02\x02\x02\u058E\u058F\x07F\x02\x02\u058F\u0590\x07Q\x02\x02\u0590" + + "\u0591\x07W\x02\x02\u0591\u0592\x07D\x02\x02\u0592\u0593\x07N\x02\x02" + + "\u0593\u0594\x07G\x02\x02\u0594\xC2\x03\x02\x02\x02\u0595\u0596\x07N\x02" + + "\x02\u0596\u0597\x07Q\x02\x02\u0597\u0598\x07P\x02\x02\u0598\u0599\x07" + + "I\x02\x02\u0599\xC4\x03\x02\x02\x02\u059A\u059B\x07H\x02\x02\u059B\u059C" + + "\x07N\x02\x02\u059C\u059D\x07Q\x02\x02\u059D\u059E\x07C\x02\x02\u059E" + + "\u059F\x07V\x02\x02\u059F\xC6\x03\x02\x02\x02\u05A0\u05A1\x07U\x02\x02" + + "\u05A1\u05A2\x07V\x02\x02\u05A2\u05A3\x07T\x02\x02\u05A3\u05A4\x07K\x02" + + "\x02\u05A4\u05A5\x07P\x02\x02\u05A5\u05A6\x07I\x02\x02\u05A6\xC8\x03\x02" + + "\x02\x02\u05A7\u05A8\x07D\x02\x02\u05A8\u05A9\x07Q\x02\x02\u05A9\u05AA" + + "\x07Q\x02\x02\u05AA\u05AB\x07N\x02\x02\u05AB\u05AC\x07G\x02\x02\u05AC" + + "\u05AD\x07C\x02\x02\u05AD\u05AE\x07P\x02\x02\u05AE\xCA\x03\x02\x02\x02" + + "\u05AF\u05B0\x07~\x02\x02\u05B0\xCC\x03\x02\x02\x02\u05B1\u05B2\x07.\x02" + + "\x02\u05B2\xCE\x03\x02\x02\x02\u05B3\u05B4\x070\x02\x02\u05B4\xD0\x03" + + "\x02\x02\x02\u05B5\u05B6\x07?\x02\x02\u05B6\xD2\x03\x02\x02\x02\u05B7" + + "\u05B8\x07@\x02\x02\u05B8\xD4\x03\x02\x02\x02\u05B9\u05BA\x07>\x02\x02" + + "\u05BA\xD6\x03\x02\x02\x02\u05BB\u05BC\x07>\x02\x02\u05BC\u05BD\x07?\x02" + + "\x02\u05BD\xD8\x03\x02\x02\x02\u05BE\u05BF\x07@\x02\x02\u05BF\u05C0\x07" + + "?\x02\x02\u05C0\xDA\x03\x02\x02\x02\u05C1\u05C2\x07#\x02\x02\u05C2\u05C3" + + "\x07?\x02\x02\u05C3\xDC\x03\x02\x02\x02\u05C4\u05C5\x07-\x02\x02\u05C5" + + "\xDE\x03\x02\x02\x02\u05C6\u05C7\x07/\x02\x02\u05C7\xE0\x03\x02\x02\x02" + + "\u05C8\u05C9\x07,\x02\x02\u05C9\xE2\x03\x02\x02\x02\u05CA\u05CB\x071\x02" + + "\x02\u05CB\xE4\x03\x02\x02\x02\u05CC\u05CD\x07\'\x02\x02\u05CD\xE6\x03" + + "\x02\x02\x02\u05CE\u05CF\x07#\x02\x02\u05CF\xE8\x03\x02\x02\x02\u05D0" + + "\u05D1\x07<\x02\x02\u05D1\xEA\x03\x02\x02\x02\u05D2\u05D3\x07*\x02\x02" + + "\u05D3\xEC\x03\x02\x02\x02\u05D4\u05D5\x07+\x02\x02\u05D5\xEE\x03\x02" + + "\x02\x02\u05D6\u05D7\x07]\x02\x02\u05D7\xF0\x03\x02\x02\x02\u05D8\u05D9" + + "\x07_\x02\x02\u05D9\xF2\x03\x02\x02\x02\u05DA\u05DB\x07)\x02\x02\u05DB" + + "\xF4\x03\x02\x02\x02\u05DC\u05DD\x07$\x02\x02\u05DD\xF6\x03\x02\x02\x02" + + "\u05DE\u05DF\x07b\x02\x02\u05DF\xF8\x03\x02\x02\x02\u05E0\u05E1\x07\x80" + + "\x02\x02\u05E1\xFA\x03\x02\x02\x02\u05E2\u05E3\x07(\x02\x02\u05E3\xFC" + + "\x03\x02\x02\x02\u05E4\u05E5\x07`\x02\x02\u05E5\xFE\x03\x02\x02\x02\u05E6" + + "\u05E7\x07C\x02\x02\u05E7\u05E8\x07X\x02\x02\u05E8\u05E9\x07I\x02\x02" + + "\u05E9\u0100\x03\x02\x02\x02\u05EA\u05EB\x07E\x02\x02\u05EB\u05EC\x07" + + "Q\x02\x02\u05EC\u05ED\x07W\x02\x02\u05ED\u05EE\x07P\x02\x02\u05EE\u05EF" + + "\x07V\x02\x02\u05EF\u0102\x03\x02\x02\x02\u05F0\u05F1\x07F\x02\x02\u05F1" + + "\u05F2\x07K\x02\x02\u05F2\u05F3\x07U\x02\x02\u05F3\u05F4\x07V\x02\x02" + + "\u05F4\u05F5\x07K\x02\x02\u05F5\u05F6\x07P\x02\x02\u05F6\u05F7\x07E\x02" + + "\x02\u05F7\u05F8\x07V\x02\x02\u05F8\u05F9\x07a\x02\x02\u05F9\u05FA\x07" + + "E\x02\x02\u05FA\u05FB\x07Q\x02\x02\u05FB\u05FC\x07W\x02\x02\u05FC\u05FD" + + "\x07P\x02\x02\u05FD\u05FE\x07V\x02\x02\u05FE\u0104\x03\x02\x02\x02\u05FF" + + "\u0600\x07G\x02\x02\u0600\u0601\x07U\x02\x02\u0601\u0602\x07V\x02\x02" + + "\u0602\u0603\x07F\x02\x02\u0603\u0604\x07E\x02\x02\u0604\u0106\x03\x02" + + "\x02\x02\u0605\u0606\x07G\x02\x02\u0606\u0607\x07U\x02\x02\u0607\u0608" + + "\x07V\x02\x02\u0608\u0609\x07F\x02\x02\u0609\u060A\x07E\x02\x02\u060A" + + "\u060B\x07a\x02\x02\u060B\u060C\x07G\x02\x02\u060C\u060D\x07T\x02\x02" + + "\u060D\u060E\x07T\x02\x02\u060E\u060F\x07Q\x02\x02\u060F\u0610\x07T\x02" + + "\x02\u0610\u0108\x03\x02\x02\x02\u0611\u0612\x07O\x02\x02\u0612\u0613" + + "\x07C\x02\x02\u0613\u0614\x07Z\x02\x02\u0614\u010A\x03\x02\x02\x02\u0615" + + "\u0616\x07O\x02\x02\u0616\u0617\x07G\x02\x02\u0617\u0618\x07C\x02\x02" + + "\u0618\u0619\x07P\x02\x02\u0619\u010C\x03\x02\x02\x02\u061A\u061B\x07" + + "O\x02\x02\u061B\u061C\x07G\x02\x02\u061C\u061D\x07F\x02\x02\u061D\u061E" + + "\x07K\x02\x02\u061E\u061F\x07C\x02\x02\u061F\u0620\x07P\x02\x02\u0620" + + "\u010E\x03\x02\x02\x02\u0621\u0622\x07O\x02\x02\u0622\u0623\x07K\x02\x02" + + "\u0623\u0624\x07P\x02\x02\u0624\u0110\x03\x02\x02\x02\u0625\u0626\x07" + + "O\x02\x02\u0626\u0627\x07Q\x02\x02\u0627\u0628\x07F\x02\x02\u0628\u0629" + + "\x07G\x02\x02\u0629\u0112\x03\x02\x02\x02\u062A\u062B\x07T\x02\x02\u062B" + + "\u062C\x07C\x02\x02\u062C\u062D\x07P\x02\x02\u062D\u062E\x07I\x02\x02" + + "\u062E\u062F\x07G\x02\x02\u062F\u0114\x03\x02\x02\x02\u0630\u0631\x07" + + "U\x02\x02\u0631\u0632\x07V\x02\x02\u0632\u0633\x07F\x02\x02\u0633\u0634" + + "\x07G\x02\x02\u0634\u0635\x07X\x02\x02\u0635\u0116\x03\x02\x02\x02\u0636" + + "\u0637\x07U\x02\x02\u0637\u0638\x07V\x02\x02\u0638\u0639\x07F\x02\x02" + + "\u0639\u063A\x07G\x02\x02\u063A\u063B\x07X\x02\x02\u063B\u063C\x07R\x02" + + "\x02\u063C\u0118\x03\x02\x02\x02\u063D\u063E\x07U\x02\x02\u063E\u063F" + + "\x07W\x02\x02\u063F\u0640\x07O\x02\x02\u0640\u011A\x03\x02\x02\x02\u0641" + + "\u0642\x07U\x02\x02\u0642\u0643\x07W\x02\x02\u0643\u0644\x07O\x02\x02" + + "\u0644\u0645\x07U\x02\x02\u0645\u0646\x07S\x02\x02\u0646\u011C\x03\x02" + + "\x02\x02\u0647\u0648\x07X\x02\x02\u0648\u0649\x07C\x02\x02\u0649\u064A" + + "\x07T\x02\x02\u064A\u064B\x07a\x02\x02\u064B\u064C\x07U\x02\x02\u064C" + + "\u064D\x07C\x02\x02\u064D\u064E\x07O\x02\x02\u064E\u064F\x07R\x02\x02" + + "\u064F\u011E\x03\x02\x02\x02\u0650\u0651\x07X\x02\x02\u0651\u0652\x07" + + "C\x02\x02\u0652\u0653\x07T\x02\x02\u0653\u0654\x07a\x02\x02\u0654\u0655" + + "\x07R\x02\x02\u0655\u0656\x07Q\x02\x02\u0656\u0657\x07R\x02\x02\u0657" + + "\u0120\x03\x02\x02\x02\u0658\u0659\x07U\x02\x02\u0659\u065A\x07V\x02\x02" + + "\u065A\u065B\x07F\x02\x02\u065B\u065C\x07F\x02\x02\u065C\u065D\x07G\x02" + + "\x02\u065D\u065E\x07X\x02\x02\u065E\u065F\x07a\x02\x02\u065F\u0660\x07" + + "U\x02\x02\u0660\u0661\x07C\x02\x02\u0661\u0662\x07O\x02\x02\u0662\u0663" + + "\x07R\x02\x02\u0663\u0122\x03\x02\x02\x02\u0664\u0665\x07U\x02\x02\u0665" + + "\u0666\x07V\x02\x02\u0666\u0667\x07F\x02\x02\u0667\u0668\x07F\x02\x02" + + "\u0668\u0669\x07G\x02\x02\u0669\u066A\x07X\x02\x02\u066A\u066B\x07a\x02" + + "\x02\u066B\u066C\x07R\x02\x02\u066C\u066D\x07Q\x02\x02\u066D\u066E\x07" + + "R\x02\x02\u066E\u0124\x03\x02\x02\x02\u066F\u0670\x07R\x02\x02\u0670\u0671" + + "\x07G\x02\x02\u0671\u0672\x07T\x02\x02\u0672\u0673\x07E\x02\x02\u0673" + + "\u0674\x07G\x02\x02\u0674\u0675\x07P\x02\x02\u0675\u0676\x07V\x02\x02" + + "\u0676\u0677\x07K\x02\x02\u0677\u0678\x07N\x02\x02\u0678\u0679\x07G\x02" + + "\x02\u0679\u0126\x03\x02\x02\x02\u067A\u067B\x07V\x02\x02\u067B\u067C" + + "\x07C\x02\x02\u067C\u067D\x07M\x02\x02\u067D\u067E\x07G\x02\x02\u067E" + + "\u0128\x03\x02\x02\x02\u067F\u0680\x07H\x02\x02\u0680\u0681\x07K\x02\x02" + + "\u0681\u0682\x07T\x02\x02\u0682\u0683\x07U\x02\x02\u0683\u0684\x07V\x02" + + "\x02\u0684\u012A\x03\x02\x02\x02\u0685\u0686\x07N\x02\x02\u0686\u0687" + + "\x07C\x02\x02\u0687\u0688\x07U\x02\x02\u0688\u0689\x07V\x02\x02\u0689" + + "\u012C\x03\x02\x02\x02\u068A\u068B\x07N\x02\x02\u068B\u068C\x07K\x02\x02" + + "\u068C\u068D\x07U\x02\x02\u068D\u068E\x07V\x02\x02\u068E\u012E\x03\x02" + + "\x02\x02\u068F\u0690\x07X\x02\x02\u0690\u0691\x07C\x02\x02\u0691\u0692" + + "\x07N\x02\x02\u0692\u0693\x07W\x02\x02\u0693\u0694\x07G\x02\x02\u0694" + + "\u0695\x07U\x02\x02\u0695\u0130\x03\x02\x02\x02\u0696\u0697\x07G\x02\x02" + + "\u0697\u0698\x07C\x02\x02\u0698\u0699\x07T\x02\x02\u0699\u069A\x07N\x02" + + "\x02\u069A\u069B\x07K\x02\x02\u069B\u069C\x07G\x02\x02\u069C\u069D\x07" + + "U\x02\x02\u069D\u069E\x07V\x02\x02\u069E\u0132\x03\x02\x02\x02\u069F\u06A0" + + "\x07G\x02\x02\u06A0\u06A1\x07C\x02\x02\u06A1\u06A2\x07T\x02\x02\u06A2" + + "\u06A3\x07N\x02\x02\u06A3\u06A4\x07K\x02\x02\u06A4\u06A5\x07G\x02\x02" + + "\u06A5\u06A6\x07U\x02\x02\u06A6\u06A7\x07V\x02\x02\u06A7\u06A8\x07a\x02" + + "\x02\u06A8\u06A9\x07V\x02\x02\u06A9\u06AA\x07K\x02\x02\u06AA\u06AB\x07" + + "O\x02\x02\u06AB\u06AC\x07G\x02\x02\u06AC\u0134\x03\x02\x02\x02\u06AD\u06AE" + + "\x07N\x02\x02\u06AE\u06AF\x07C\x02\x02\u06AF\u06B0\x07V\x02\x02\u06B0" + + "\u06B1\x07G\x02\x02\u06B1\u06B2\x07U\x02\x02\u06B2\u06B3\x07V\x02\x02" + + "\u06B3\u0136\x03\x02\x02\x02\u06B4\u06B5\x07N\x02\x02\u06B5\u06B6\x07" + + "C\x02\x02\u06B6\u06B7\x07V\x02\x02\u06B7\u06B8\x07G\x02\x02\u06B8\u06B9" + + "\x07U\x02\x02\u06B9\u06BA\x07V\x02\x02\u06BA\u06BB\x07a\x02\x02\u06BB" + + "\u06BC\x07V\x02\x02\u06BC\u06BD\x07K\x02\x02\u06BD\u06BE\x07O\x02\x02" + + "\u06BE\u06BF\x07G\x02\x02\u06BF\u0138\x03\x02\x02\x02\u06C0\u06C1\x07" + + "R\x02\x02\u06C1\u06C2\x07G\x02\x02\u06C2\u06C3\x07T\x02\x02\u06C3\u06C4" + + "\x07a\x02\x02\u06C4\u06C5\x07F\x02\x02\u06C5\u06C6\x07C\x02\x02\u06C6" + + "\u06C7\x07[\x02\x02\u06C7\u013A\x03\x02\x02\x02\u06C8\u06C9\x07R\x02\x02" + + "\u06C9\u06CA\x07G\x02\x02\u06CA\u06CB\x07T\x02\x02\u06CB\u06CC\x07a\x02" + + "\x02\u06CC\u06CD\x07J\x02\x02\u06CD\u06CE\x07Q\x02\x02\u06CE\u06CF\x07" + + "W\x02\x02\u06CF\u06D0\x07T\x02\x02\u06D0\u013C\x03\x02\x02\x02\u06D1\u06D2" + + "\x07R\x02\x02\u06D2\u06D3\x07G\x02\x02\u06D3\u06D4\x07T\x02\x02\u06D4" + + "\u06D5\x07a\x02\x02\u06D5\u06D6\x07O\x02\x02\u06D6\u06D7\x07K\x02\x02" + + "\u06D7\u06D8\x07P\x02\x02\u06D8\u06D9\x07W\x02\x02\u06D9\u06DA\x07V\x02" + + "\x02\u06DA\u06DB\x07G\x02\x02\u06DB\u013E\x03\x02\x02\x02\u06DC\u06DD" + + "\x07R\x02\x02\u06DD\u06DE\x07G\x02\x02\u06DE\u06DF\x07T\x02\x02\u06DF" + + "\u06E0\x07a\x02\x02\u06E0\u06E1\x07U\x02\x02\u06E1\u06E2\x07G\x02\x02" + + "\u06E2\u06E3\x07E\x02\x02\u06E3\u06E4\x07Q\x02\x02\u06E4\u06E5\x07P\x02" + + "\x02\u06E5\u06E6\x07F\x02\x02\u06E6\u0140\x03\x02\x02\x02\u06E7\u06E8" + + "\x07T\x02\x02\u06E8\u06E9\x07C\x02\x02\u06E9\u06EA\x07V\x02\x02\u06EA" + + "\u06EB\x07G\x02\x02\u06EB\u0142\x03\x02\x02\x02\u06EC\u06ED\x07U\x02\x02" + + "\u06ED\u06EE\x07R\x02\x02\u06EE\u06EF\x07C\x02\x02\u06EF\u06F0\x07T\x02" + + "\x02\u06F0\u06F1\x07M\x02\x02\u06F1\u06F2\x07N\x02\x02\u06F2\u06F3\x07" + + "K\x02\x02\u06F3\u06F4\x07P\x02\x02\u06F4\u06F5\x07G\x02\x02\u06F5\u0144" + + "\x03\x02\x02\x02\u06F6\u06F7\x07E\x02\x02\u06F7\u0146\x03\x02\x02\x02" + + "\u06F8\u06F9\x07F\x02\x02\u06F9\u06FA\x07E\x02\x02\u06FA\u0148\x03\x02" + + "\x02\x02\u06FB\u06FC\x07C\x02\x02\u06FC\u06FD\x07D\x02\x02\u06FD\u06FE" + + "\x07U\x02\x02\u06FE\u014A\x03\x02\x02\x02\u06FF\u0700\x07E\x02\x02\u0700" + + "\u0701\x07G\x02\x02\u0701\u0702\x07K\x02\x02\u0702\u0703\x07N\x02\x02" + + "\u0703\u014C\x03\x02\x02\x02\u0704\u0705\x07E\x02\x02\u0705\u0706\x07" + + "G\x02\x02\u0706\u0707\x07K\x02\x02\u0707\u0708\x07N\x02\x02\u0708\u0709" + + "\x07K\x02\x02\u0709\u070A\x07P\x02\x02\u070A\u070B\x07I\x02\x02\u070B" + + "\u014E\x03\x02\x02\x02\u070C\u070D\x07E\x02\x02\u070D\u070E\x07Q\x02\x02" + + "\u070E\u070F\x07P\x02\x02\u070F\u0710\x07X\x02\x02\u0710\u0150\x03\x02" + + "\x02\x02\u0711\u0712\x07E\x02\x02\u0712\u0713\x07T\x02\x02\u0713\u0714" + + "\x07E\x02\x02\u0714\u0715\x075\x02\x02\u0715\u0716\x074\x02\x02\u0716" + + "\u0152\x03\x02\x02\x02\u0717\u0718\x07G\x02\x02\u0718\u0154\x03\x02\x02" + + "\x02\u0719\u071A\x07G\x02\x02\u071A\u071B\x07Z\x02\x02\u071B\u071C\x07" + + "R\x02\x02\u071C\u0156\x03\x02\x02\x02\u071D\u071E\x07H\x02\x02\u071E\u071F" + + "\x07N\x02\x02\u071F\u0720\x07Q\x02\x02\u0720\u0721\x07Q\x02\x02\u0721" + + "\u0722\x07T\x02\x02\u0722\u0158\x03\x02\x02\x02\u0723\u0724\x07N\x02\x02" + + "\u0724\u0725\x07P\x02\x02\u0725\u015A\x03\x02\x02\x02\u0726\u0727\x07" + + "N\x02\x02\u0727\u0728\x07Q\x02\x02\u0728\u0729\x07I\x02\x02\u0729\u015C" + + "\x03\x02\x02\x02\u072A\u072B\x07N\x02\x02\u072B\u072C\x07Q\x02\x02\u072C" + + "\u072D\x07I\x02\x02\u072D\u072E\x073\x02\x02\u072E\u072F\x072\x02\x02" + + "\u072F\u015E\x03\x02\x02\x02\u0730\u0731\x07N\x02\x02\u0731\u0732\x07" + + "Q\x02\x02\u0732\u0733\x07I\x02\x02\u0733\u0734\x074\x02\x02\u0734\u0160" + + "\x03\x02\x02\x02\u0735\u0736\x07O\x02\x02\u0736\u0737\x07Q\x02\x02\u0737" + + "\u0738\x07F\x02\x02\u0738\u0162\x03\x02\x02\x02\u0739\u073A\x07R\x02\x02" + + "\u073A\u073B\x07K\x02\x02\u073B\u0164\x03\x02\x02\x02\u073C\u073D\x07" + + "R\x02\x02\u073D\u073E\x07Q\x02\x02\u073E\u073F\x07Y\x02\x02\u073F\u0166" + + "\x03\x02\x02\x02\u0740\u0741\x07R\x02\x02\u0741\u0742\x07Q\x02\x02\u0742" + + "\u0743\x07Y\x02\x02\u0743\u0744\x07G\x02\x02\u0744\u0745\x07T\x02\x02" + + "\u0745\u0168\x03\x02\x02\x02\u0746\u0747\x07T\x02\x02\u0747\u0748\x07" + + "C\x02\x02\u0748\u0749\x07P\x02\x02\u0749\u074A\x07F\x02\x02\u074A\u016A" + + "\x03\x02\x02\x02\u074B\u074C\x07T\x02\x02\u074C\u074D\x07Q\x02\x02\u074D" + + "\u074E\x07W\x02\x02\u074E\u074F\x07P\x02\x02\u074F\u0750\x07F\x02\x02" + + "\u0750\u016C\x03\x02\x02\x02\u0751\u0752\x07U\x02\x02\u0752\u0753\x07" + + "K\x02\x02\u0753\u0754\x07I\x02\x02\u0754\u0755\x07P\x02\x02\u0755\u016E" + + "\x03\x02\x02\x02\u0756\u0757\x07U\x02\x02\u0757\u0758\x07S\x02\x02\u0758" + + "\u0759\x07T\x02\x02\u0759\u075A\x07V\x02\x02\u075A\u0170\x03\x02\x02\x02" + + "\u075B\u075C\x07V\x02\x02\u075C\u075D\x07T\x02\x02\u075D\u075E\x07W\x02" + + "\x02\u075E\u075F\x07P\x02\x02\u075F\u0760\x07E\x02\x02\u0760\u0761\x07" + + "C\x02\x02\u0761\u0762\x07V\x02\x02\u0762\u0763\x07G\x02\x02\u0763\u0172" + + "\x03\x02\x02\x02\u0764\u0765\x07C\x02\x02\u0765\u0766\x07E\x02\x02\u0766" + + "\u0767\x07Q\x02\x02\u0767\u0768\x07U\x02\x02\u0768\u0174\x03\x02\x02\x02" + + "\u0769\u076A\x07C\x02\x02\u076A\u076B\x07U\x02\x02\u076B\u076C\x07K\x02" + + "\x02\u076C\u076D\x07P\x02\x02\u076D\u0176\x03\x02\x02\x02\u076E\u076F" + + "\x07C\x02\x02\u076F\u0770\x07V\x02\x02\u0770\u0771\x07C\x02\x02\u0771" + + "\u0772\x07P\x02\x02\u0772\u0178\x03\x02\x02\x02\u0773\u0774\x07C\x02\x02" + + "\u0774\u0775\x07V\x02\x02\u0775\u0776\x07C\x02\x02\u0776\u0777\x07P\x02" + + "\x02\u0777\u0778\x074\x02\x02\u0778\u017A\x03\x02\x02\x02\u0779\u077A" + + "\x07E\x02\x02\u077A\u077B\x07Q\x02\x02\u077B\u077C\x07U\x02\x02\u077C" + + "\u017C\x03\x02\x02\x02\u077D\u077E\x07E\x02\x02\u077E\u077F\x07Q\x02\x02" + + "\u077F\u0780\x07V\x02\x02\u0780\u017E\x03\x02\x02\x02\u0781\u0782\x07" + + "F\x02\x02\u0782\u0783\x07G\x02\x02\u0783\u0784\x07I\x02\x02\u0784\u0785" + + "\x07T\x02\x02\u0785\u0786\x07G\x02\x02\u0786\u0787\x07G\x02\x02\u0787" + + "\u0788\x07U\x02\x02\u0788\u0180\x03\x02\x02\x02\u0789\u078A\x07T\x02\x02" + + "\u078A\u078B\x07C\x02\x02\u078B\u078C\x07F\x02\x02\u078C\u078D\x07K\x02" + + "\x02\u078D\u078E\x07C\x02\x02\u078E\u078F\x07P\x02\x02\u078F\u0790\x07" + + "U\x02\x02\u0790\u0182\x03\x02\x02\x02\u0791\u0792\x07U\x02\x02\u0792\u0793" + + "\x07K\x02\x02\u0793\u0794\x07P\x02\x02\u0794\u0184\x03\x02\x02\x02\u0795" + + "\u0796\x07V\x02\x02\u0796\u0797\x07C\x02\x02\u0797\u0798\x07P\x02\x02" + + "\u0798\u0186\x03\x02\x02\x02\u0799\u079A\x07C\x02\x02\u079A\u079B\x07" + + "F\x02\x02\u079B\u079C\x07F\x02\x02\u079C\u079D\x07F\x02\x02\u079D\u079E" + + "\x07C\x02\x02\u079E\u079F\x07V\x02\x02\u079F\u07A0\x07G\x02\x02\u07A0" + + "\u0188\x03\x02\x02\x02\u07A1\u07A2\x07E\x02\x02\u07A2\u07A3\x07W\x02\x02" + + "\u07A3\u07A4\x07T\x02\x02\u07A4\u07A5\x07F\x02\x02\u07A5\u07A6\x07C\x02" + + "\x02\u07A6\u07A7\x07V\x02\x02\u07A7\u07A8\x07G\x02\x02\u07A8\u018A\x03" + + "\x02\x02\x02\u07A9\u07AA\x07E\x02\x02\u07AA\u07AB\x07W\x02\x02\u07AB\u07AC" + + "\x07T\x02\x02\u07AC\u07AD\x07T\x02\x02\u07AD\u07AE\x07G\x02\x02\u07AE" + + "\u07AF\x07P\x02\x02\u07AF\u07B0\x07V\x02\x02\u07B0\u07B1\x07a\x02\x02" + + "\u07B1\u07B2\x07F\x02\x02\u07B2\u07B3\x07C\x02\x02\u07B3\u07B4\x07V\x02" + + "\x02\u07B4\u07B5\x07G\x02\x02\u07B5\u018C\x03\x02\x02\x02\u07B6\u07B7" + + "\x07E\x02\x02\u07B7\u07B8\x07W\x02\x02\u07B8\u07B9\x07T\x02\x02\u07B9" + + "\u07BA\x07T\x02\x02\u07BA\u07BB\x07G\x02\x02\u07BB\u07BC\x07P\x02\x02" + + "\u07BC\u07BD\x07V\x02\x02\u07BD\u07BE\x07a\x02\x02\u07BE\u07BF\x07V\x02" + + "\x02\u07BF\u07C0\x07K\x02\x02\u07C0\u07C1\x07O\x02\x02\u07C1\u07C2\x07" + + "G\x02\x02\u07C2\u018E\x03\x02\x02\x02\u07C3\u07C4\x07E\x02\x02\u07C4\u07C5" + + "\x07W\x02\x02\u07C5\u07C6\x07T\x02\x02\u07C6\u07C7\x07T\x02\x02\u07C7" + + "\u07C8\x07G\x02\x02\u07C8\u07C9\x07P\x02\x02\u07C9\u07CA\x07V\x02\x02" + + "\u07CA\u07CB\x07a\x02\x02\u07CB\u07CC\x07V\x02\x02\u07CC\u07CD\x07K\x02" + + "\x02\u07CD\u07CE\x07O\x02\x02\u07CE\u07CF\x07G\x02\x02\u07CF\u07D0\x07" + + "U\x02\x02\u07D0\u07D1\x07V\x02\x02\u07D1\u07D2\x07C\x02\x02\u07D2\u07D3" + + "\x07O\x02\x02\u07D3\u07D4\x07R\x02\x02\u07D4\u0190\x03\x02\x02\x02\u07D5" + + "\u07D6\x07E\x02\x02\u07D6\u07D7\x07W\x02\x02\u07D7\u07D8\x07T\x02\x02" + + "\u07D8\u07D9\x07V\x02\x02\u07D9\u07DA\x07K\x02\x02\u07DA\u07DB\x07O\x02" + + "\x02\u07DB\u07DC\x07G\x02\x02\u07DC\u0192\x03\x02\x02\x02\u07DD\u07DE" + + "\x07F\x02\x02\u07DE\u07DF\x07C\x02\x02\u07DF\u07E0\x07V\x02\x02\u07E0" + + "\u07E1\x07G\x02\x02\u07E1\u0194\x03\x02\x02\x02\u07E2\u07E3\x07F\x02\x02" + + "\u07E3\u07E4\x07C\x02\x02\u07E4\u07E5\x07V\x02\x02\u07E5\u07E6\x07G\x02" + + "\x02\u07E6\u07E7\x07a\x02\x02\u07E7\u07E8\x07C\x02\x02\u07E8\u07E9\x07" + + "F\x02\x02\u07E9\u07EA\x07F\x02\x02\u07EA\u0196\x03\x02\x02\x02\u07EB\u07EC" + + "\x07F\x02\x02\u07EC\u07ED\x07C\x02\x02\u07ED\u07EE\x07V\x02\x02\u07EE" + + "\u07EF\x07G\x02\x02\u07EF\u07F0\x07a\x02\x02\u07F0\u07F1\x07H\x02\x02" + + "\u07F1\u07F2\x07Q\x02\x02\u07F2\u07F3\x07T\x02\x02\u07F3\u07F4\x07O\x02" + + "\x02\u07F4\u07F5\x07C\x02\x02\u07F5\u07F6\x07V\x02\x02\u07F6\u0198\x03" + + "\x02\x02\x02\u07F7\u07F8\x07F\x02\x02\u07F8\u07F9\x07C\x02\x02\u07F9\u07FA" + + "\x07V\x02\x02\u07FA\u07FB\x07G\x02\x02\u07FB\u07FC\x07a\x02\x02\u07FC" + + "\u07FD\x07U\x02\x02\u07FD\u07FE\x07W\x02\x02\u07FE\u07FF\x07D\x02\x02" + + "\u07FF\u019A\x03\x02\x02\x02\u0800\u0801\x07F\x02\x02\u0801\u0802\x07" + + "C\x02\x02\u0802\u0803\x07[\x02\x02\u0803\u0804\x07P\x02\x02\u0804\u0805" + + "\x07C\x02\x02\u0805\u0806\x07O\x02\x02\u0806\u0807\x07G\x02\x02\u0807" + + "\u019C\x03\x02\x02\x02\u0808\u0809\x07F\x02\x02\u0809\u080A\x07C\x02\x02" + + "\u080A\u080B\x07[\x02\x02\u080B\u080C\x07Q\x02\x02\u080C\u080D\x07H\x02" + + "\x02\u080D\u080E\x07O\x02\x02\u080E\u080F\x07Q\x02\x02\u080F\u0810\x07" + + "P\x02\x02\u0810\u0811\x07V\x02\x02\u0811\u0812\x07J\x02\x02\u0812\u019E" + + "\x03\x02\x02\x02\u0813\u0814\x07F\x02\x02\u0814\u0815\x07C\x02\x02\u0815" + + "\u0816\x07[\x02\x02\u0816\u0817\x07Q\x02\x02\u0817\u0818\x07H\x02\x02" + + "\u0818\u0819\x07Y\x02\x02\u0819\u081A\x07G\x02\x02\u081A\u081B\x07G\x02" + + "\x02\u081B\u081C\x07M\x02\x02\u081C\u01A0\x03\x02\x02\x02\u081D\u081E" + + "\x07F\x02\x02\u081E\u081F\x07C\x02\x02\u081F\u0820\x07[\x02\x02\u0820" + + "\u0821\x07Q\x02\x02\u0821\u0822\x07H\x02\x02\u0822\u0823\x07[\x02\x02" + + "\u0823\u0824\x07G\x02\x02\u0824\u0825\x07C\x02\x02\u0825\u0826\x07T\x02" + + "\x02\u0826\u01A2\x03\x02\x02\x02\u0827\u0828\x07H\x02\x02\u0828\u0829" + + "\x07T\x02\x02\u0829\u082A\x07Q\x02\x02\u082A\u082B\x07O\x02\x02\u082B" + + "\u082C\x07a\x02\x02\u082C\u082D\x07F\x02\x02\u082D\u082E\x07C\x02\x02" + + "\u082E\u082F\x07[\x02\x02\u082F\u0830\x07U\x02\x02\u0830\u01A4\x03\x02" + + "\x02\x02\u0831\u0832\x07N\x02\x02\u0832\u0833\x07Q\x02\x02\u0833\u0834" + + "\x07E\x02\x02\u0834\u0835\x07C\x02\x02\u0835\u0836\x07N\x02\x02\u0836" + + "\u0837\x07V\x02\x02\u0837\u0838\x07K\x02\x02\u0838\u0839\x07O\x02\x02" + + "\u0839\u083A\x07G\x02\x02\u083A\u01A6\x03\x02\x02\x02\u083B\u083C\x07" + + "N\x02\x02\u083C\u083D\x07Q\x02\x02\u083D\u083E\x07E\x02\x02\u083E\u083F" + + "\x07C\x02\x02\u083F\u0840\x07N\x02\x02\u0840\u0841\x07V\x02\x02\u0841" + + "\u0842\x07K\x02\x02\u0842\u0843\x07O\x02\x02\u0843\u0844\x07G\x02\x02" + + "\u0844\u0845\x07U\x02\x02\u0845\u0846\x07V\x02\x02\u0846\u0847\x07C\x02" + + "\x02\u0847\u0848\x07O\x02\x02\u0848\u0849\x07R\x02\x02\u0849\u01A8\x03" + + "\x02\x02\x02\u084A\u084B\x07H\x02\x02\u084B\u084C\x07T\x02\x02\u084C\u084D" + + "\x07Q\x02\x02\u084D\u084E\x07O\x02"; + private static readonly _serializedATNSegment4: string = + "\x02\u084E\u084F\x07a\x02\x02\u084F\u0850\x07W\x02\x02\u0850\u0851\x07" + + "P\x02\x02\u0851\u0852\x07K\x02\x02\u0852\u0853\x07Z\x02\x02\u0853\u0854" + + "\x07V\x02\x02\u0854\u0855\x07K\x02\x02\u0855\u0856\x07O\x02\x02\u0856" + + "\u0857\x07G\x02\x02\u0857\u01AA\x03\x02\x02\x02\u0858\u0859\x07O\x02\x02" + + "\u0859\u085A\x07C\x02\x02\u085A\u085B\x07M\x02\x02\u085B\u085C\x07G\x02" + + "\x02\u085C\u085D\x07F\x02\x02\u085D\u085E\x07C\x02\x02\u085E\u085F\x07" + + "V\x02\x02\u085F\u0860\x07G\x02\x02\u0860\u01AC\x03\x02\x02\x02\u0861\u0862" + + "\x07O\x02\x02\u0862\u0863\x07C\x02\x02\u0863\u0864\x07M\x02\x02\u0864" + + "\u0865\x07G\x02\x02\u0865\u0866\x07V\x02\x02\u0866\u0867\x07K\x02\x02" + + "\u0867\u0868\x07O\x02\x02\u0868\u0869\x07G\x02\x02\u0869\u01AE\x03\x02" + + "\x02\x02\u086A\u086B\x07O\x02\x02\u086B\u086C\x07Q\x02\x02\u086C\u086D" + + "\x07P\x02\x02\u086D\u086E\x07V\x02\x02\u086E\u086F\x07J\x02\x02\u086F" + + "\u0870\x07P\x02\x02\u0870\u0871\x07C\x02\x02\u0871\u0872\x07O\x02\x02" + + "\u0872\u0873\x07G\x02\x02\u0873\u01B0\x03\x02\x02\x02\u0874\u0875\x07" + + "P\x02\x02\u0875\u0876\x07Q\x02\x02\u0876\u0877\x07Y\x02\x02\u0877\u01B2" + + "\x03\x02\x02\x02\u0878\u0879\x07R\x02\x02\u0879\u087A\x07G\x02\x02\u087A" + + "\u087B\x07T\x02\x02\u087B\u087C\x07K\x02\x02\u087C\u087D\x07Q\x02\x02" + + "\u087D\u087E\x07F\x02\x02\u087E\u087F\x07a\x02\x02\u087F\u0880\x07C\x02" + + "\x02\u0880\u0881\x07F\x02\x02\u0881\u0882\x07F\x02\x02\u0882\u01B4\x03" + + "\x02\x02\x02\u0883\u0884\x07R\x02\x02\u0884\u0885\x07G\x02\x02\u0885\u0886" + + "\x07T\x02\x02\u0886\u0887\x07K\x02\x02\u0887\u0888\x07Q\x02\x02\u0888" + + "\u0889\x07F\x02\x02\u0889\u088A\x07a\x02\x02\u088A\u088B\x07F\x02\x02" + + "\u088B\u088C\x07K\x02\x02\u088C\u088D\x07H\x02\x02\u088D\u088E\x07H\x02" + + "\x02\u088E\u01B6\x03\x02\x02\x02\u088F\u0890\x07U\x02\x02\u0890\u0891" + + "\x07W\x02\x02\u0891\u0892\x07D\x02\x02\u0892\u0893\x07F\x02\x02\u0893" + + "\u0894\x07C\x02\x02\u0894\u0895\x07V\x02\x02\u0895\u0896\x07G\x02\x02" + + "\u0896\u01B8\x03\x02\x02\x02\u0897\u0898\x07U\x02\x02\u0898\u0899\x07" + + "[\x02\x02\u0899\u089A\x07U\x02\x02\u089A\u089B\x07F\x02\x02\u089B\u089C" + + "\x07C\x02\x02\u089C\u089D\x07V\x02\x02\u089D\u089E\x07G\x02\x02\u089E" + + "\u01BA\x03\x02\x02\x02\u089F\u08A0\x07V\x02\x02\u08A0\u08A1\x07K\x02\x02" + + "\u08A1\u08A2\x07O\x02\x02\u08A2\u08A3\x07G\x02\x02\u08A3\u01BC\x03\x02" + + "\x02\x02\u08A4\u08A5\x07V\x02\x02\u08A5\u08A6\x07K\x02\x02\u08A6\u08A7" + + "\x07O\x02\x02\u08A7\u08A8\x07G\x02\x02\u08A8\u08A9\x07a\x02\x02\u08A9" + + "\u08AA\x07V\x02\x02\u08AA\u08AB\x07Q\x02\x02\u08AB\u08AC\x07a\x02\x02" + + "\u08AC\u08AD\x07U\x02\x02\u08AD\u08AE\x07G\x02\x02\u08AE\u08AF\x07E\x02" + + "\x02\u08AF\u01BE\x03\x02\x02\x02\u08B0\u08B1\x07V\x02\x02\u08B1\u08B2" + + "\x07K\x02\x02\u08B2\u08B3\x07O\x02\x02\u08B3\u08B4\x07G\x02\x02\u08B4" + + "\u08B5\x07U\x02\x02\u08B5\u08B6\x07V\x02\x02\u08B6\u08B7\x07C\x02\x02" + + "\u08B7\u08B8\x07O\x02\x02\u08B8\u08B9\x07R\x02\x02\u08B9\u01C0\x03\x02" + + "\x02\x02\u08BA\u08BB\x07V\x02\x02\u08BB\u08BC\x07Q\x02\x02\u08BC\u08BD" + + "\x07a\x02\x02\u08BD\u08BE\x07F\x02\x02\u08BE\u08BF\x07C\x02\x02\u08BF" + + "\u08C0\x07[\x02\x02\u08C0\u08C1\x07U\x02\x02\u08C1\u01C2\x03\x02\x02\x02" + + "\u08C2\u08C3\x07W\x02\x02\u08C3\u08C4\x07V\x02\x02\u08C4\u08C5\x07E\x02" + + "\x02\u08C5\u08C6\x07a\x02\x02\u08C6\u08C7\x07F\x02\x02\u08C7\u08C8\x07" + + "C\x02\x02\u08C8\u08C9\x07V\x02\x02\u08C9\u08CA\x07G\x02\x02\u08CA\u01C4" + + "\x03\x02\x02\x02\u08CB\u08CC\x07W\x02\x02\u08CC\u08CD\x07V\x02\x02\u08CD" + + "\u08CE\x07E\x02\x02\u08CE\u08CF\x07a\x02\x02\u08CF\u08D0\x07V\x02\x02" + + "\u08D0\u08D1\x07K\x02\x02\u08D1\u08D2\x07O\x02\x02\u08D2\u08D3\x07G\x02" + + "\x02\u08D3\u01C6\x03\x02\x02\x02\u08D4\u08D5\x07W\x02\x02\u08D5\u08D6" + + "\x07V\x02\x02\u08D6\u08D7\x07E\x02\x02\u08D7\u08D8\x07a\x02\x02\u08D8" + + "\u08D9\x07V\x02\x02\u08D9\u08DA\x07K\x02\x02\u08DA\u08DB\x07O\x02\x02" + + "\u08DB\u08DC\x07G\x02\x02\u08DC\u08DD\x07U\x02\x02\u08DD\u08DE\x07V\x02" + + "\x02\u08DE\u08DF\x07C\x02\x02\u08DF\u08E0\x07O\x02\x02\u08E0\u08E1\x07" + + "R\x02\x02\u08E1\u01C8\x03\x02\x02\x02\u08E2\u08E3\x07W\x02\x02\u08E3\u08E4" + + "\x07P\x02\x02\u08E4\u08E5\x07K\x02\x02\u08E5\u08E6\x07Z\x02\x02\u08E6" + + "\u08E7\x07a\x02\x02\u08E7\u08E8\x07V\x02\x02\u08E8\u08E9\x07K\x02\x02" + + "\u08E9\u08EA\x07O\x02\x02\u08EA\u08EB\x07G\x02\x02\u08EB\u08EC\x07U\x02" + + "\x02\u08EC\u08ED\x07V\x02\x02\u08ED\u08EE\x07C\x02\x02\u08EE\u08EF\x07" + + "O\x02\x02\u08EF\u08F0\x07R\x02\x02\u08F0\u01CA\x03\x02\x02\x02\u08F1\u08F2" + + "\x07U\x02\x02\u08F2\u08F3\x07W\x02\x02\u08F3\u08F4\x07D\x02\x02\u08F4" + + "\u08F5\x07U\x02\x02\u08F5\u08F6\x07V\x02\x02\u08F6\u08F7\x07T\x02\x02" + + "\u08F7\u01CC\x03\x02\x02\x02\u08F8\u08F9\x07U\x02\x02\u08F9\u08FA\x07" + + "W\x02\x02\u08FA\u08FB\x07D\x02\x02\u08FB\u08FC\x07U\x02\x02\u08FC\u08FD" + + "\x07V\x02\x02\u08FD\u08FE\x07T\x02\x02\u08FE\u08FF\x07K\x02\x02\u08FF" + + "\u0900\x07P\x02\x02\u0900\u0901\x07I\x02\x02\u0901\u01CE\x03\x02\x02\x02" + + "\u0902\u0903\x07N\x02\x02\u0903\u0904\x07V\x02\x02\u0904\u0905\x07T\x02" + + "\x02\u0905\u0906\x07K\x02\x02\u0906\u0907\x07O\x02\x02\u0907\u01D0\x03" + + "\x02\x02\x02\u0908\u0909\x07T\x02\x02\u0909\u090A\x07V\x02\x02\u090A\u090B" + + "\x07T\x02\x02\u090B\u090C\x07K\x02\x02\u090C\u090D\x07O\x02\x02\u090D" + + "\u01D2\x03\x02\x02\x02\u090E\u090F\x07V\x02\x02\u090F\u0910\x07T\x02\x02" + + "\u0910\u0911\x07K\x02\x02\u0911\u0912\x07O\x02\x02\u0912\u01D4\x03\x02" + + "\x02\x02\u0913\u0914\x07V\x02\x02\u0914\u0915\x07Q\x02\x02\u0915\u01D6" + + "\x03\x02\x02\x02\u0916\u0917\x07N\x02\x02\u0917\u0918\x07Q\x02\x02\u0918" + + "\u0919\x07Y\x02\x02\u0919\u091A\x07G\x02\x02\u091A\u091B\x07T\x02\x02" + + "\u091B\u01D8\x03\x02\x02\x02\u091C\u091D\x07W\x02\x02\u091D\u091E\x07" + + "R\x02\x02\u091E\u091F\x07R\x02\x02\u091F\u0920\x07G\x02\x02\u0920\u0921" + + "\x07T\x02\x02\u0921\u01DA\x03\x02\x02\x02\u0922\u0923\x07E\x02\x02\u0923" + + "\u0924\x07Q\x02\x02\u0924\u0925\x07P\x02\x02\u0925\u0926\x07E\x02\x02" + + "\u0926\u0927\x07C\x02\x02\u0927\u0928\x07V\x02\x02\u0928\u01DC\x03\x02" + + "\x02\x02\u0929\u092A\x07E\x02\x02\u092A\u092B\x07Q\x02\x02\u092B\u092C" + + "\x07P\x02\x02\u092C\u092D\x07E\x02\x02\u092D\u092E\x07C\x02\x02\u092E" + + "\u092F\x07V\x02\x02\u092F\u0930\x07a\x02\x02\u0930\u0931\x07Y\x02\x02" + + "\u0931\u0932\x07U\x02\x02\u0932\u01DE\x03\x02\x02\x02\u0933\u0934\x07" + + "N\x02\x02\u0934\u0935\x07G\x02\x02\u0935\u0936\x07P\x02\x02\u0936\u0937" + + "\x07I\x02\x02\u0937\u0938\x07V\x02\x02\u0938\u0939\x07J\x02\x02\u0939" + + "\u01E0\x03\x02\x02\x02\u093A\u093B\x07U\x02\x02\u093B\u093C\x07V\x02\x02" + + "\u093C\u093D\x07T\x02\x02\u093D\u093E\x07E\x02\x02\u093E\u093F\x07O\x02" + + "\x02\u093F\u0940\x07R\x02\x02\u0940\u01E2\x03\x02\x02\x02\u0941\u0942" + + "\x07T\x02\x02\u0942\u0943\x07K\x02\x02\u0943\u0944\x07I\x02\x02\u0944" + + "\u0945\x07J\x02\x02\u0945\u0946\x07V\x02\x02\u0946\u01E4\x03\x02\x02\x02" + + "\u0947\u0948\x07N\x02\x02\u0948\u0949\x07G\x02\x02\u0949\u094A\x07H\x02" + + "\x02\u094A\u094B\x07V\x02\x02\u094B\u01E6\x03\x02\x02\x02\u094C\u094D" + + "\x07C\x02\x02\u094D\u094E\x07U\x02\x02\u094E\u094F\x07E\x02\x02\u094F" + + "\u0950\x07K\x02\x02\u0950\u0951\x07K\x02\x02\u0951\u01E8\x03\x02\x02\x02" + + "\u0952\u0953\x07N\x02\x02\u0953\u0954\x07Q\x02\x02\u0954\u0955\x07E\x02" + + "\x02\u0955\u0956\x07C\x02\x02\u0956\u0957\x07V\x02\x02\u0957\u0958\x07" + + "G\x02\x02\u0958\u01EA\x03\x02\x02\x02\u0959\u095A\x07T\x02\x02\u095A\u095B" + + "\x07G\x02\x02\u095B\u095C\x07R\x02\x02\u095C\u095D\x07N\x02\x02\u095D" + + "\u095E\x07C\x02\x02\u095E\u095F\x07E\x02\x02\u095F\u0960\x07G\x02\x02" + + "\u0960\u01EC\x03\x02\x02\x02\u0961\u0962\x07E\x02\x02\u0962\u0963\x07" + + "C\x02\x02\u0963\u0964\x07U\x02\x02\u0964\u0965\x07V\x02\x02\u0965\u01EE" + + "\x03\x02\x02\x02\u0966\u0967\x07N\x02\x02\u0967\u0968\x07K\x02\x02\u0968" + + "\u0969\x07M\x02\x02\u0969\u096A\x07G\x02\x02\u096A\u01F0\x03\x02\x02\x02" + + "\u096B\u096C\x07K\x02\x02\u096C\u096D\x07U\x02\x02\u096D\u096E\x07P\x02" + + "\x02\u096E\u096F\x07W\x02\x02\u096F\u0970\x07N\x02\x02\u0970\u0971\x07" + + "N\x02\x02\u0971\u01F2\x03\x02\x02\x02\u0972\u0973\x07K\x02\x02\u0973\u0974" + + "\x07U\x02\x02\u0974\u0975\x07P\x02\x02\u0975\u0976\x07Q\x02\x02\u0976" + + "\u0977\x07V\x02\x02\u0977\u0978\x07P\x02\x02\u0978\u0979\x07W\x02\x02" + + "\u0979\u097A\x07N\x02\x02\u097A\u097B\x07N\x02\x02\u097B\u01F4\x03\x02" + + "\x02\x02\u097C\u097D\x07K\x02\x02\u097D\u097E\x07H\x02\x02\u097E\u097F" + + "\x07P\x02\x02\u097F\u0980\x07W\x02\x02\u0980\u0981\x07N\x02\x02\u0981" + + "\u0982\x07N\x02\x02\u0982\u01F6\x03\x02\x02\x02\u0983\u0984\x07P\x02\x02" + + "\u0984\u0985\x07W\x02\x02\u0985\u0986\x07N\x02\x02\u0986\u0987\x07N\x02" + + "\x02\u0987\u0988\x07K\x02\x02\u0988\u0989\x07H\x02\x02\u0989\u01F8\x03" + + "\x02\x02\x02\u098A\u098B\x07K\x02\x02\u098B\u098C\x07H\x02\x02\u098C\u01FA" + + "\x03\x02\x02\x02\u098D\u098E\x07V\x02\x02\u098E\u098F\x07[\x02\x02\u098F" + + "\u0990\x07R\x02\x02\u0990\u0991\x07G\x02\x02\u0991\u0992\x07Q\x02\x02" + + "\u0992\u0993\x07H\x02\x02\u0993\u01FC\x03\x02\x02\x02\u0994\u0995\x07" + + "O\x02\x02\u0995\u0996\x07C\x02\x02\u0996\u0997\x07V\x02\x02\u0997\u0998" + + "\x07E\x02\x02\u0998\u0999\x07J\x02\x02\u0999\u01FE\x03\x02\x02\x02\u099A" + + "\u099B\x07O\x02\x02\u099B\u099C\x07C\x02\x02\u099C\u099D\x07V\x02\x02" + + "\u099D\u099E\x07E\x02\x02\u099E\u099F\x07J\x02\x02\u099F\u09A0\x07a\x02" + + "\x02\u09A0\u09A1\x07R\x02\x02\u09A1\u09A2\x07J\x02\x02\u09A2\u09A3\x07" + + "T\x02\x02\u09A3\u09A4\x07C\x02\x02\u09A4\u09A5\x07U\x02\x02\u09A5\u09A6" + + "\x07G\x02\x02\u09A6\u0200\x03\x02\x02\x02\u09A7\u09A8\x07O\x02\x02\u09A8" + + "\u09A9\x07C\x02\x02\u09A9\u09AA\x07V\x02\x02\u09AA\u09AB\x07E\x02\x02" + + "\u09AB\u09AC\x07J\x02\x02\u09AC\u09AD\x07a\x02\x02\u09AD\u09AE\x07R\x02" + + "\x02\u09AE\u09AF\x07J\x02\x02\u09AF\u09B0\x07T\x02\x02\u09B0\u09B1\x07" + + "C\x02\x02\u09B1\u09B2\x07U\x02\x02\u09B2\u09B3\x07G\x02\x02\u09B3\u09B4" + + "\x07a\x02\x02\u09B4\u09B5\x07R\x02\x02\u09B5\u09B6\x07T\x02\x02\u09B6" + + "\u09B7\x07G\x02\x02\u09B7\u09B8\x07H\x02\x02\u09B8\u09B9\x07K\x02\x02" + + "\u09B9\u09BA\x07Z\x02\x02\u09BA\u0202\x03\x02\x02\x02\u09BB\u09BC\x07" + + "O\x02\x02\u09BC\u09BD\x07C\x02\x02\u09BD\u09BE\x07V\x02\x02\u09BE\u09BF" + + "\x07E\x02\x02\u09BF\u09C0\x07J\x02\x02\u09C0\u09C1\x07a\x02\x02\u09C1" + + "\u09C2\x07D\x02\x02\u09C2\u09C3\x07Q\x02\x02\u09C3\u09C4\x07Q\x02\x02" + + "\u09C4\u09C5\x07N\x02\x02\u09C5\u09C6\x07a\x02\x02\u09C6\u09C7\x07R\x02" + + "\x02\u09C7\u09C8\x07T\x02\x02\u09C8\u09C9\x07G\x02\x02\u09C9\u09CA\x07" + + "H\x02\x02\u09CA\u09CB\x07K\x02\x02\u09CB\u09CC\x07Z\x02\x02\u09CC\u0204" + + "\x03\x02\x02\x02\u09CD\u09CE\x07U\x02\x02\u09CE\u09CF\x07K\x02\x02\u09CF" + + "\u09D0\x07O\x02\x02\u09D0\u09D1\x07R\x02\x02\u09D1\u09D2\x07N\x02\x02" + + "\u09D2\u09D3\x07G\x02\x02\u09D3\u09D4\x07a\x02\x02\u09D4\u09D5\x07S\x02" + + "\x02\u09D5\u09D6\x07W\x02\x02\u09D6\u09D7\x07G\x02\x02\u09D7\u09D8\x07" + + "T\x02\x02\u09D8\u09D9\x07[\x02\x02\u09D9\u09DA\x07a\x02\x02\u09DA\u09DB" + + "\x07U\x02\x02\u09DB\u09DC\x07V\x02\x02\u09DC\u09DD\x07T\x02\x02\u09DD" + + "\u09DE\x07K\x02\x02\u09DE\u09DF\x07P\x02\x02\u09DF\u09E0\x07I\x02\x02" + + "\u09E0\u0206\x03\x02\x02\x02\u09E1\u09E2\x07O\x02\x02\u09E2\u09E3\x07" + + "W\x02\x02\u09E3\u09E4\x07N\x02\x02\u09E4\u09E5\x07V\x02\x02\u09E5\u09E6" + + "\x07K\x02\x02\u09E6\u09E7\x07a\x02\x02\u09E7\u09E8\x07O\x02\x02\u09E8" + + "\u09E9\x07C\x02\x02\u09E9\u09EA\x07V\x02\x02\u09EA\u09EB\x07E\x02\x02" + + "\u09EB\u09EC\x07J\x02\x02\u09EC\u0208\x03\x02\x02\x02\u09ED\u09EE\x07" + + "S\x02\x02\u09EE\u09EF\x07W\x02\x02\u09EF\u09F0\x07G\x02\x02\u09F0\u09F1" + + "\x07T\x02\x02\u09F1\u09F2\x07[\x02\x02\u09F2\u09F3\x07a\x02\x02\u09F3" + + "\u09F4\x07U\x02\x02\u09F4\u09F5\x07V\x02\x02\u09F5\u09F6\x07T\x02\x02" + + "\u09F6\u09F7\x07K\x02\x02\u09F7\u09F8\x07P\x02\x02\u09F8\u09F9\x07I\x02" + + "\x02\u09F9\u020A\x03\x02\x02\x02\u09FA\u09FB\x07C\x02\x02\u09FB\u09FC" + + "\x07N\x02\x02\u09FC\u09FD\x07N\x02\x02\u09FD\u09FE\x07Q\x02\x02\u09FE" + + "\u09FF\x07Y\x02\x02\u09FF\u0A00\x07a\x02\x02\u0A00\u0A01\x07N\x02\x02" + + "\u0A01\u0A02\x07G\x02\x02\u0A02\u0A03\x07C\x02\x02\u0A03\u0A04\x07F\x02" + + "\x02\u0A04\u0A05\x07K\x02\x02\u0A05\u0A06\x07P\x02\x02\u0A06\u0A07\x07" + + "I\x02\x02\u0A07\u0A08\x07a\x02\x02\u0A08\u0A09\x07Y\x02\x02\u0A09\u0A0A" + + "\x07K\x02\x02\u0A0A\u0A0B\x07N\x02\x02\u0A0B\u0A0C\x07F\x02\x02\u0A0C" + + "\u0A0D\x07E\x02\x02\u0A0D\u0A0E\x07C\x02\x02\u0A0E\u0A0F\x07T\x02\x02" + + "\u0A0F\u0A10\x07F\x02\x02\u0A10\u020C\x03\x02\x02\x02\u0A11\u0A12\x07" + + "C\x02\x02\u0A12\u0A13\x07P\x02\x02\u0A13\u0A14\x07C\x02\x02\u0A14\u0A15" + + "\x07N\x02\x02\u0A15\u0A16\x07[\x02\x02\u0A16\u0A17\x07\\\x02\x02\u0A17" + + "\u0A18\x07G\x02\x02\u0A18\u0A19\x07a\x02\x02\u0A19\u0A1A\x07Y\x02\x02" + + "\u0A1A\u0A1B\x07K\x02\x02\u0A1B\u0A1C\x07N\x02\x02\u0A1C\u0A1D\x07F\x02" + + "\x02\u0A1D\u0A1E\x07E\x02\x02\u0A1E\u0A1F\x07C\x02\x02\u0A1F\u0A20\x07" + + "T\x02\x02\u0A20\u0A21\x07F\x02\x02\u0A21\u020E\x03\x02\x02\x02\u0A22\u0A23" + + "\x07C\x02\x02\u0A23\u0A24\x07P\x02\x02\u0A24\u0A25\x07C\x02\x02\u0A25" + + "\u0A26\x07N\x02\x02\u0A26\u0A27\x07[\x02\x02\u0A27\u0A28\x07\\\x02\x02" + + "\u0A28\u0A29\x07G\x02\x02\u0A29\u0A2A\x07T\x02\x02\u0A2A\u0210\x03\x02" + + "\x02\x02\u0A2B\u0A2C\x07C\x02\x02\u0A2C\u0A2D\x07W\x02\x02\u0A2D\u0A2E" + + "\x07V\x02\x02\u0A2E\u0A2F\x07Q\x02\x02\u0A2F\u0A30\x07a\x02\x02\u0A30" + + "\u0A31\x07I\x02\x02\u0A31\u0A32\x07G\x02\x02\u0A32\u0A33\x07P\x02\x02" + + "\u0A33\u0A34\x07G\x02\x02\u0A34\u0A35\x07T\x02\x02\u0A35\u0A36\x07C\x02" + + "\x02\u0A36\u0A37\x07V\x02\x02\u0A37\u0A38\x07G\x02\x02\u0A38\u0A39\x07" + + "a\x02\x02\u0A39\u0A3A\x07U\x02\x02\u0A3A\u0A3B\x07[\x02\x02\u0A3B\u0A3C" + + "\x07P\x02\x02\u0A3C\u0A3D\x07Q\x02\x02\u0A3D\u0A3E\x07P\x02\x02\u0A3E" + + "\u0A3F\x07[\x02\x02\u0A3F\u0A40\x07O\x02\x02\u0A40\u0A41\x07U\x02\x02" + + "\u0A41\u0A42\x07a\x02\x02\u0A42\u0A43\x07R\x02\x02\u0A43\u0A44\x07J\x02" + + "\x02\u0A44\u0A45\x07T\x02\x02\u0A45\u0A46\x07C\x02\x02\u0A46\u0A47\x07" + + "U\x02\x02\u0A47\u0A48\x07G\x02\x02\u0A48\u0A49\x07a\x02\x02\u0A49\u0A4A" + + "\x07S\x02\x02\u0A4A\u0A4B\x07W\x02\x02\u0A4B\u0A4C\x07G\x02\x02\u0A4C" + + "\u0A4D\x07T\x02\x02\u0A4D\u0A4E\x07[\x02\x02\u0A4E\u0212\x03\x02\x02\x02" + + "\u0A4F\u0A50\x07D\x02\x02\u0A50\u0A51\x07Q\x02\x02\u0A51\u0A52\x07Q\x02" + + "\x02\u0A52\u0A53\x07U\x02\x02\u0A53\u0A54\x07V\x02\x02\u0A54\u0214\x03" + + "\x02\x02\x02\u0A55\u0A56\x07E\x02\x02\u0A56\u0A57\x07W\x02\x02\u0A57\u0A58" + + "\x07V\x02\x02\u0A58\u0A59\x07Q\x02\x02\u0A59\u0A5A\x07H\x02\x02\u0A5A" + + "\u0A5B\x07H\x02\x02\u0A5B\u0A5C\x07a\x02\x02\u0A5C\u0A5D\x07H\x02\x02" + + "\u0A5D\u0A5E\x07T\x02\x02\u0A5E\u0A5F\x07G\x02\x02\u0A5F\u0A60\x07S\x02" + + "\x02\u0A60\u0A61\x07W\x02\x02\u0A61\u0A62\x07G\x02\x02\u0A62\u0A63\x07" + + "P\x02\x02\u0A63\u0A64\x07E\x02\x02\u0A64\u0A65\x07[\x02\x02\u0A65\u0216" + + "\x03\x02\x02\x02\u0A66\u0A67\x07F\x02\x02\u0A67\u0A68\x07G\x02\x02\u0A68" + + "\u0A69\x07H\x02\x02\u0A69\u0A6A\x07C\x02\x02\u0A6A\u0A6B\x07W\x02\x02" + + "\u0A6B\u0A6C\x07N\x02\x02\u0A6C\u0A6D\x07V\x02\x02\u0A6D\u0A6E\x07a\x02" + + "\x02\u0A6E\u0A6F\x07H\x02\x02\u0A6F\u0A70\x07K\x02\x02\u0A70\u0A71\x07" + + "G\x02\x02\u0A71\u0A72\x07N\x02\x02\u0A72\u0A73\x07F\x02\x02\u0A73\u0218" + + "\x03\x02\x02\x02\u0A74\u0A75\x07F\x02\x02\u0A75\u0A76\x07G\x02\x02\u0A76" + + "\u0A77\x07H\x02\x02\u0A77\u0A78\x07C\x02\x02\u0A78\u0A79\x07W\x02\x02" + + "\u0A79\u0A7A\x07N\x02\x02\u0A7A\u0A7B\x07V\x02\x02\u0A7B\u0A7C\x07a\x02" + + "\x02\u0A7C\u0A7D\x07Q\x02\x02\u0A7D\u0A7E\x07R\x02\x02\u0A7E\u0A7F\x07" + + "G\x02\x02\u0A7F\u0A80\x07T\x02\x02\u0A80\u0A81\x07C\x02\x02\u0A81\u0A82" + + "\x07V\x02\x02\u0A82\u0A83\x07Q\x02\x02\u0A83\u0A84\x07T\x02\x02\u0A84" + + "\u021A\x03\x02\x02\x02\u0A85\u0A86\x07G\x02\x02\u0A86\u0A87\x07P\x02\x02" + + "\u0A87\u0A88\x07C\x02\x02\u0A88\u0A89\x07D\x02\x02\u0A89\u0A8A\x07N\x02" + + "\x02\u0A8A\u0A8B\x07G\x02\x02\u0A8B\u0A8C\x07a\x02\x02\u0A8C\u0A8D\x07" + + "R\x02\x02\u0A8D\u0A8E\x07Q\x02\x02\u0A8E\u0A8F\x07U\x02\x02\u0A8F\u0A90" + + "\x07K\x02\x02\u0A90\u0A91\x07V\x02\x02\u0A91\u0A92\x07K\x02\x02\u0A92" + + "\u0A93\x07Q\x02\x02\u0A93\u0A94\x07P\x02\x02\u0A94\u0A95\x07a\x02\x02" + + "\u0A95\u0A96\x07K\x02\x02\u0A96\u0A97\x07P\x02\x02\u0A97\u0A98\x07E\x02" + + "\x02\u0A98\u0A99\x07T\x02\x02\u0A99\u0A9A\x07G\x02\x02\u0A9A\u0A9B\x07" + + "O\x02\x02\u0A9B\u0A9C\x07G\x02\x02\u0A9C\u0A9D\x07P\x02\x02\u0A9D\u0A9E" + + "\x07V\x02\x02\u0A9E\u0A9F\x07U\x02\x02\u0A9F\u021C\x03\x02\x02\x02\u0AA0" + + "\u0AA1\x07G\x02\x02\u0AA1\u0AA2\x07U\x02\x02\u0AA2\u0AA3\x07E\x02\x02" + + "\u0AA3\u0AA4\x07C\x02\x02\u0AA4\u0AA5\x07R\x02\x02\u0AA5\u0AA6\x07G\x02" + + "\x02\u0AA6\u021E\x03\x02\x02\x02\u0AA7\u0AA8\x07H\x02\x02\u0AA8\u0AA9" + + "\x07N\x02\x02\u0AA9\u0AAA\x07C\x02\x02\u0AAA\u0AAB\x07I\x02\x02\u0AAB" + + "\u0AAC\x07U\x02\x02\u0AAC\u0220\x03\x02\x02\x02\u0AAD\u0AAE\x07H\x02\x02" + + "\u0AAE\u0AAF\x07W\x02\x02\u0AAF\u0AB0\x07\\\x02\x02\u0AB0\u0AB1\x07\\" + + "\x02\x02\u0AB1\u0AB2\x07[\x02\x02\u0AB2\u0AB3\x07a\x02\x02\u0AB3\u0AB4" + + "\x07O\x02\x02\u0AB4\u0AB5\x07C\x02\x02\u0AB5\u0AB6\x07Z\x02\x02\u0AB6" + + "\u0AB7\x07a\x02\x02\u0AB7\u0AB8\x07G\x02\x02\u0AB8\u0AB9\x07Z\x02\x02" + + "\u0AB9\u0ABA\x07R\x02\x02\u0ABA\u0ABB\x07C\x02\x02\u0ABB\u0ABC\x07P\x02" + + "\x02\u0ABC\u0ABD\x07U\x02\x02\u0ABD\u0ABE\x07K\x02\x02\u0ABE\u0ABF\x07" + + "Q\x02\x02\u0ABF\u0AC0\x07P\x02\x02\u0AC0\u0AC1\x07U\x02\x02\u0AC1\u0222" + + "\x03\x02\x02\x02\u0AC2\u0AC3\x07H\x02\x02\u0AC3\u0AC4\x07W\x02\x02\u0AC4" + + "\u0AC5\x07\\\x02\x02\u0AC5\u0AC6\x07\\\x02\x02\u0AC6\u0AC7\x07[\x02\x02" + + "\u0AC7\u0AC8\x07a\x02\x02\u0AC8\u0AC9\x07R\x02\x02\u0AC9\u0ACA\x07T\x02" + + "\x02\u0ACA\u0ACB\x07G\x02\x02\u0ACB\u0ACC\x07H\x02\x02\u0ACC\u0ACD\x07" + + "K\x02\x02\u0ACD\u0ACE\x07Z\x02\x02\u0ACE\u0ACF\x07a\x02\x02\u0ACF\u0AD0" + + "\x07N\x02\x02\u0AD0\u0AD1\x07G\x02\x02\u0AD1\u0AD2\x07P\x02\x02\u0AD2" + + "\u0AD3\x07I\x02\x02\u0AD3\u0AD4\x07V\x02\x02\u0AD4\u0AD5\x07J\x02\x02" + + "\u0AD5\u0224\x03\x02\x02\x02\u0AD6\u0AD7\x07H\x02\x02\u0AD7\u0AD8\x07" + + "W\x02\x02\u0AD8\u0AD9\x07\\\x02\x02\u0AD9\u0ADA\x07\\\x02\x02\u0ADA\u0ADB" + + "\x07[\x02\x02\u0ADB\u0ADC\x07a\x02\x02\u0ADC\u0ADD\x07V\x02\x02\u0ADD" + + "\u0ADE\x07T\x02\x02\u0ADE\u0ADF\x07C\x02\x02\u0ADF\u0AE0\x07P\x02\x02" + + "\u0AE0\u0AE1\x07U\x02\x02\u0AE1\u0AE2\x07R\x02\x02\u0AE2\u0AE3\x07Q\x02" + + "\x02\u0AE3\u0AE4\x07U\x02\x02\u0AE4\u0AE5\x07K\x02\x02\u0AE5\u0AE6\x07" + + "V\x02\x02\u0AE6\u0AE7\x07K\x02\x02\u0AE7\u0AE8\x07Q\x02\x02\u0AE8\u0AE9" + + "\x07P\x02\x02\u0AE9\u0AEA\x07U\x02\x02\u0AEA\u0226\x03\x02\x02\x02\u0AEB" + + "\u0AEC\x07H\x02\x02\u0AEC\u0AED\x07W\x02\x02\u0AED\u0AEE\x07\\\x02\x02" + + "\u0AEE\u0AEF\x07\\\x02\x02\u0AEF\u0AF0\x07[\x02\x02\u0AF0\u0AF1\x07a\x02" + + "\x02\u0AF1\u0AF2\x07T\x02\x02\u0AF2\u0AF3\x07G\x02\x02\u0AF3\u0AF4\x07" + + "Y\x02\x02\u0AF4\u0AF5\x07T\x02\x02\u0AF5\u0AF6\x07K\x02\x02\u0AF6\u0AF7" + + "\x07V\x02\x02\u0AF7\u0AF8\x07G\x02\x02\u0AF8\u0228\x03\x02\x02\x02\u0AF9" + + "\u0AFA\x07H\x02\x02\u0AFA\u0AFB\x07W\x02\x02\u0AFB\u0AFC\x07\\\x02\x02" + + "\u0AFC\u0AFD\x07\\\x02\x02\u0AFD\u0AFE\x07K\x02\x02\u0AFE\u0AFF\x07P\x02" + + "\x02\u0AFF\u0B00\x07G\x02\x02\u0B00\u0B01\x07U\x02\x02\u0B01\u0B02\x07" + + "U\x02\x02\u0B02\u022A\x03\x02\x02\x02\u0B03\u0B04\x07N\x02\x02\u0B04\u0B05" + + "\x07G\x02\x02\u0B05\u0B06\x07P\x02\x02\u0B06\u0B07\x07K\x02\x02\u0B07" + + "\u0B08\x07G\x02\x02\u0B08\u0B09\x07P\x02\x02\u0B09\u0B0A\x07V\x02\x02" + + "\u0B0A\u022C\x03\x02\x02\x02\u0B0B\u0B0C\x07N\x02\x02\u0B0C\u0B0D\x07" + + "Q\x02\x02\u0B0D\u0B0E\x07Y\x02\x02\u0B0E\u0B0F\x07a\x02\x02\u0B0F\u0B10" + + "\x07H\x02\x02\u0B10\u0B11\x07T\x02\x02\u0B11\u0B12\x07G\x02\x02\u0B12" + + "\u0B13\x07S\x02\x02\u0B13\u0B14\x07a\x02\x02\u0B14\u0B15\x07Q\x02\x02" + + "\u0B15\u0B16\x07R\x02\x02\u0B16\u0B17\x07G\x02\x02\u0B17\u0B18\x07T\x02" + + "\x02\u0B18\u0B19\x07C\x02\x02\u0B19\u0B1A\x07V\x02\x02\u0B1A\u0B1B\x07" + + "Q\x02\x02\u0B1B\u0B1C\x07T\x02\x02\u0B1C\u022E\x03\x02\x02\x02\u0B1D\u0B1E" + + "\x07O\x02\x02\u0B1E\u0B1F\x07C\x02\x02\u0B1F\u0B20\x07Z\x02\x02\u0B20" + + "\u0B21\x07a\x02\x02\u0B21\u0B22\x07F\x02\x02\u0B22\u0B23\x07G\x02\x02" + + "\u0B23\u0B24\x07V\x02\x02\u0B24\u0B25\x07G\x02\x02\u0B25\u0B26\x07T\x02" + + "\x02\u0B26\u0B27\x07O\x02\x02\u0B27\u0B28\x07K\x02\x02\u0B28\u0B29\x07" + + "P\x02\x02\u0B29\u0B2A\x07K\x02\x02\u0B2A\u0B2B\x07\\\x02\x02\u0B2B\u0B2C" + + "\x07G\x02\x02\u0B2C\u0B2D\x07F\x02\x02\u0B2D\u0B2E\x07a\x02\x02\u0B2E" + + "\u0B2F\x07U\x02\x02\u0B2F\u0B30\x07V\x02\x02\u0B30\u0B31\x07C\x02\x02" + + "\u0B31\u0B32\x07V\x02\x02\u0B32\u0B33\x07G\x02\x02\u0B33\u0B34\x07U\x02" + + "\x02\u0B34\u0230\x03\x02\x02\x02\u0B35\u0B36\x07O\x02\x02\u0B36\u0B37" + + "\x07C\x02\x02\u0B37\u0B38\x07Z\x02\x02\u0B38\u0B39\x07a\x02\x02\u0B39" + + "\u0B3A\x07G\x02\x02\u0B3A\u0B3B\x07Z\x02\x02\u0B3B\u0B3C\x07R\x02\x02" + + "\u0B3C\u0B3D\x07C\x02\x02\u0B3D\u0B3E\x07P\x02\x02\u0B3E\u0B3F\x07U\x02" + + "\x02\u0B3F\u0B40\x07K\x02\x02\u0B40\u0B41\x07Q\x02\x02\u0B41\u0B42\x07" + + "P\x02\x02\u0B42\u0B43\x07U\x02\x02\u0B43\u0232\x03\x02\x02\x02\u0B44\u0B45" + + "\x07O\x02\x02\u0B45\u0B46\x07K\x02\x02\u0B46\u0B47\x07P\x02\x02\u0B47" + + "\u0B48\x07K\x02\x02\u0B48\u0B49\x07O\x02\x02\u0B49\u0B4A\x07W\x02\x02" + + "\u0B4A\u0B4B\x07O\x02\x02\u0B4B\u0B4C\x07a\x02\x02\u0B4C\u0B4D\x07U\x02" + + "\x02\u0B4D\u0B4E\x07J\x02\x02\u0B4E\u0B4F\x07Q\x02\x02\u0B4F\u0B50\x07" + + "W\x02\x02\u0B50\u0B51\x07N\x02\x02\u0B51\u0B52\x07F\x02\x02\u0B52\u0B53" + + "\x07a\x02\x02\u0B53\u0B54\x07O\x02\x02\u0B54\u0B55\x07C\x02\x02\u0B55" + + "\u0B56\x07V\x02\x02\u0B56\u0B57\x07E\x02\x02\u0B57\u0B58\x07J\x02\x02" + + "\u0B58\u0234\x03\x02\x02\x02\u0B59\u0B5A\x07Q\x02\x02\u0B5A\u0B5B\x07" + + "R\x02\x02\u0B5B\u0B5C\x07G\x02\x02\u0B5C\u0B5D\x07T\x02\x02\u0B5D\u0B5E" + + "\x07C\x02\x02\u0B5E\u0B5F\x07V\x02\x02\u0B5F\u0B60\x07Q\x02\x02\u0B60" + + "\u0B61\x07T\x02\x02\u0B61\u0236\x03\x02\x02\x02\u0B62\u0B63\x07R\x02\x02" + + "\u0B63\u0B64\x07J\x02\x02\u0B64\u0B65\x07T\x02\x02\u0B65\u0B66\x07C\x02" + + "\x02\u0B66\u0B67\x07U\x02\x02\u0B67\u0B68\x07G\x02\x02\u0B68\u0B69\x07" + + "a\x02\x02\u0B69\u0B6A\x07U\x02\x02\u0B6A\u0B6B\x07N\x02\x02\u0B6B\u0B6C" + + "\x07Q\x02\x02\u0B6C\u0B6D\x07R\x02\x02\u0B6D\u0238\x03\x02\x02\x02\u0B6E" + + "\u0B6F\x07R\x02\x02\u0B6F\u0B70\x07T\x02\x02\u0B70\u0B71\x07G\x02\x02" + + "\u0B71\u0B72\x07H\x02\x02\u0B72\u0B73\x07K\x02\x02\u0B73\u0B74\x07Z\x02" + + "\x02\u0B74\u0B75\x07a\x02\x02\u0B75\u0B76\x07N\x02\x02\u0B76\u0B77\x07" + + "G\x02\x02\u0B77\u0B78\x07P\x02\x02\u0B78\u0B79\x07I\x02\x02\u0B79\u0B7A" + + "\x07V\x02\x02\u0B7A\u0B7B\x07J\x02\x02\u0B7B\u023A\x03\x02\x02\x02\u0B7C" + + "\u0B7D\x07S\x02\x02\u0B7D\u0B7E\x07W\x02\x02\u0B7E\u0B7F\x07Q\x02\x02" + + "\u0B7F\u0B80\x07V\x02\x02\u0B80\u0B81\x07G\x02\x02\u0B81\u0B82\x07a\x02" + + "\x02\u0B82\u0B83\x07C\x02\x02\u0B83\u0B84\x07P\x02\x02\u0B84\u0B85\x07" + + "C\x02\x02\u0B85\u0B86\x07N\x02\x02\u0B86\u0B87\x07[\x02\x02\u0B87\u0B88" + + "\x07\\\x02\x02\u0B88\u0B89\x07G\x02\x02\u0B89\u0B8A\x07T\x02\x02\u0B8A" + + "\u023C\x03\x02\x02\x02\u0B8B\u0B8C\x07S\x02\x02\u0B8C\u0B8D\x07W\x02\x02" + + "\u0B8D\u0B8E\x07Q\x02\x02\u0B8E\u0B8F\x07V\x02\x02\u0B8F"; + private static readonly _serializedATNSegment5: string = + "\u0B90\x07G\x02\x02\u0B90\u0B91\x07a\x02\x02\u0B91\u0B92\x07H\x02\x02" + + "\u0B92\u0B93\x07K\x02\x02\u0B93\u0B94\x07G\x02\x02\u0B94\u0B95\x07N\x02" + + "\x02\u0B95\u0B96\x07F\x02\x02\u0B96\u0B97\x07a\x02\x02\u0B97\u0B98\x07" + + "U\x02\x02\u0B98\u0B99\x07W\x02\x02\u0B99\u0B9A\x07H\x02\x02\u0B9A\u0B9B" + + "\x07H\x02\x02\u0B9B\u0B9C\x07K\x02\x02\u0B9C\u0B9D\x07Z\x02\x02\u0B9D" + + "\u023E\x03\x02\x02\x02\u0B9E\u0B9F\x07T\x02\x02\u0B9F\u0BA0\x07G\x02\x02" + + "\u0BA0\u0BA1\x07Y\x02\x02\u0BA1\u0BA2\x07T\x02\x02\u0BA2\u0BA3\x07K\x02" + + "\x02\u0BA3\u0BA4\x07V\x02\x02\u0BA4\u0BA5\x07G\x02\x02\u0BA5\u0240\x03" + + "\x02\x02\x02\u0BA6\u0BA7\x07U\x02\x02\u0BA7\u0BA8\x07N\x02\x02\u0BA8\u0BA9" + + "\x07Q\x02\x02\u0BA9\u0BAA\x07R\x02\x02\u0BAA\u0242\x03\x02\x02\x02\u0BAB" + + "\u0BAC\x07V\x02\x02\u0BAC\u0BAD\x07K\x02\x02\u0BAD\u0BAE\x07G\x02\x02" + + "\u0BAE\u0BAF\x07a\x02\x02\u0BAF\u0BB0\x07D\x02\x02\u0BB0\u0BB1\x07T\x02" + + "\x02\u0BB1\u0BB2\x07G\x02\x02\u0BB2\u0BB3\x07C\x02\x02\u0BB3\u0BB4\x07" + + "M\x02\x02\u0BB4\u0BB5\x07G\x02\x02\u0BB5\u0BB6\x07T\x02\x02\u0BB6\u0244" + + "\x03\x02\x02\x02\u0BB7\u0BB8\x07V\x02\x02\u0BB8\u0BB9\x07[\x02\x02\u0BB9" + + "\u0BBA\x07R\x02\x02\u0BBA\u0BBB\x07G\x02\x02\u0BBB\u0246\x03\x02\x02\x02" + + "\u0BBC\u0BBD\x07\\\x02\x02\u0BBD\u0BBE\x07G\x02\x02\u0BBE\u0BBF\x07T\x02" + + "\x02\u0BBF\u0BC0\x07Q\x02\x02\u0BC0\u0BC1\x07a\x02\x02\u0BC1\u0BC2\x07" + + "V\x02\x02\u0BC2\u0BC3\x07G\x02\x02\u0BC3\u0BC4\x07T\x02\x02\u0BC4\u0BC5" + + "\x07O\x02\x02\u0BC5\u0BC6\x07U\x02\x02\u0BC6\u0BC7\x07a\x02\x02\u0BC7" + + "\u0BC8\x07S\x02\x02\u0BC8\u0BC9\x07W\x02\x02\u0BC9\u0BCA\x07G\x02\x02" + + "\u0BCA\u0BCB\x07T\x02\x02\u0BCB\u0BCC\x07[\x02\x02\u0BCC\u0248\x03\x02" + + "\x02\x02\u0BCD\u0BCE\x07U\x02\x02\u0BCE\u0BCF\x07R\x02\x02\u0BCF\u0BD0" + + "\x07C\x02\x02\u0BD0\u0BD1\x07P\x02\x02\u0BD1\u024A\x03\x02\x02\x02\u0BD2" + + "\u0BD3\x07O\x02\x02\u0BD3\u0BD4\x07U\x02\x02\u0BD4\u024C\x03\x02\x02\x02" + + "\u0BD5\u0BD6\x07U\x02\x02\u0BD6\u024E\x03\x02\x02\x02\u0BD7\u0BD8\x07" + + "O\x02\x02\u0BD8\u0250\x03\x02\x02\x02\u0BD9\u0BDA\x07J\x02\x02\u0BDA\u0252" + + "\x03\x02\x02\x02\u0BDB\u0BDC\x07Y\x02\x02\u0BDC\u0254\x03\x02\x02\x02" + + "\u0BDD\u0BDE\x07S\x02\x02\u0BDE\u0256\x03\x02\x02\x02\u0BDF\u0BE0\x07" + + "[\x02\x02\u0BE0\u0258\x03\x02\x02\x02\u0BE1\u0BE2\x05\u0261\u0131\x02" + + "\u0BE2\u025A\x03\x02\x02\x02\u0BE3\u0BE5\x05\u026B\u0136\x02\u0BE4\u0BE3" + + "\x03\x02\x02\x02\u0BE5\u0BE6\x03\x02\x02\x02\u0BE6\u0BE4\x03\x02\x02\x02" + + "\u0BE6\u0BE7\x03\x02\x02\x02\u0BE7\u025C\x03\x02\x02\x02\u0BE8\u0BEA\x05" + + "\u026B\u0136\x02\u0BE9\u0BE8\x03\x02\x02\x02\u0BEA\u0BEB\x03\x02\x02\x02" + + "\u0BEB\u0BE9\x03\x02\x02\x02\u0BEB\u0BEC\x03\x02\x02\x02\u0BEC\u0BEE\x03" + + "\x02\x02\x02\u0BED\u0BE9\x03\x02\x02\x02\u0BED\u0BEE\x03\x02\x02\x02\u0BEE" + + "\u0BEF\x03\x02\x02\x02\u0BEF\u0BF1\x070\x02\x02\u0BF0\u0BF2\x05\u026B" + + "\u0136\x02\u0BF1\u0BF0\x03\x02\x02\x02\u0BF2\u0BF3\x03\x02\x02\x02\u0BF3" + + "\u0BF1\x03\x02\x02\x02\u0BF3\u0BF4\x03\x02\x02\x02\u0BF4\u025E\x03\x02" + + "\x02\x02\u0BF5\u0BF7\t\x02\x02\x02\u0BF6\u0BF8\t\x03\x02\x02\u0BF7\u0BF6" + + "\x03\x02\x02\x02\u0BF8\u0BF9\x03\x02\x02\x02\u0BF9\u0BF7\x03\x02\x02\x02" + + "\u0BF9\u0BFA\x03\x02\x02\x02\u0BFA\u0BFC\x03\x02\x02\x02\u0BFB\u0BF5\x03" + + "\x02\x02\x02\u0BFC\u0BFF\x03\x02\x02\x02\u0BFD\u0BFB\x03\x02\x02\x02\u0BFD" + + "\u0BFE\x03\x02\x02\x02\u0BFE\u0260\x03\x02\x02\x02\u0BFF\u0BFD\x03\x02" + + "\x02\x02\u0C00\u0C02\t\x04\x02\x02\u0C01\u0C00\x03\x02\x02\x02\u0C02\u0C03" + + "\x03\x02\x02\x02\u0C03\u0C04\x03\x02\x02\x02\u0C03\u0C01\x03\x02\x02\x02" + + "\u0C04\u0C08\x03\x02\x02\x02\u0C05\u0C07\t\x05\x02\x02\u0C06\u0C05\x03" + + "\x02\x02\x02\u0C07\u0C0A\x03\x02\x02\x02\u0C08\u0C06\x03\x02\x02\x02\u0C08" + + "\u0C09\x03\x02\x02\x02\u0C09\u0262\x03\x02\x02\x02\u0C0A\u0C08\x03\x02" + + "\x02\x02\u0C0B\u0C0C\x05\u0261\u0131\x02\u0C0C\u0C0D\x05\u025F\u0130\x02" + + "\u0C0D\u0264\x03\x02\x02\x02\u0C0E\u0C16\x07$\x02\x02\u0C0F\u0C10\x07" + + "^\x02\x02\u0C10\u0C15\v\x02\x02\x02\u0C11\u0C12\x07$\x02\x02\u0C12\u0C15" + + "\x07$\x02\x02\u0C13\u0C15\n\x06\x02\x02\u0C14\u0C0F\x03\x02\x02\x02\u0C14" + + "\u0C11\x03\x02\x02\x02\u0C14\u0C13\x03\x02\x02\x02\u0C15\u0C18\x03\x02" + + "\x02\x02\u0C16\u0C14\x03\x02\x02\x02\u0C16\u0C17\x03\x02\x02\x02\u0C17" + + "\u0C19\x03\x02\x02\x02\u0C18\u0C16\x03\x02\x02\x02\u0C19\u0C1A\x07$\x02" + + "\x02\u0C1A\u0266\x03\x02\x02\x02\u0C1B\u0C23\x07)\x02\x02\u0C1C\u0C1D" + + "\x07^\x02\x02\u0C1D\u0C22\v\x02\x02\x02\u0C1E\u0C1F\x07)\x02\x02\u0C1F" + + "\u0C22\x07)\x02\x02\u0C20\u0C22\n\x07\x02\x02\u0C21\u0C1C\x03\x02\x02" + + "\x02\u0C21\u0C1E\x03\x02\x02\x02\u0C21\u0C20\x03\x02\x02\x02\u0C22\u0C25" + + "\x03\x02\x02\x02\u0C23\u0C21\x03\x02\x02\x02\u0C23\u0C24\x03\x02\x02\x02" + + "\u0C24\u0C26\x03\x02\x02\x02\u0C25\u0C23\x03\x02\x02\x02\u0C26\u0C27\x07" + + ")\x02\x02\u0C27\u0268\x03\x02\x02\x02\u0C28\u0C30\x07b\x02\x02\u0C29\u0C2A" + + "\x07^\x02\x02\u0C2A\u0C2F\v\x02\x02\x02\u0C2B\u0C2C\x07b\x02\x02\u0C2C" + + "\u0C2F\x07b\x02\x02\u0C2D\u0C2F\n\b\x02\x02\u0C2E\u0C29\x03\x02\x02\x02" + + "\u0C2E\u0C2B\x03\x02\x02\x02\u0C2E\u0C2D\x03\x02\x02\x02\u0C2F\u0C32\x03" + + "\x02\x02\x02\u0C30\u0C2E\x03\x02\x02\x02\u0C30\u0C31\x03\x02\x02\x02\u0C31" + + "\u0C33\x03\x02\x02\x02\u0C32\u0C30\x03\x02\x02\x02\u0C33\u0C34\x07b\x02" + + "\x02\u0C34\u026A\x03\x02\x02\x02\u0C35\u0C36\t\t\x02\x02\u0C36\u026C\x03" + + "\x02\x02\x02\u0C37\u0C38\v\x02\x02\x02\u0C38\u0C39\x03\x02\x02\x02\u0C39" + + "\u0C3A\b\u0137\x02\x02\u0C3A\u026E\x03\x02\x02\x02\x11\x02\u0BE6\u0BEB" + + "\u0BED\u0BF3\u0BF9\u0BFD\u0C03\u0C08\u0C14\u0C16\u0C21\u0C23\u0C2E\u0C30" + + "\x03\x02\x05\x02"; + public static readonly _serializedATN: string = Utils.join( + [ + OpenSearchPPLLexer._serializedATNSegment0, + OpenSearchPPLLexer._serializedATNSegment1, + OpenSearchPPLLexer._serializedATNSegment2, + OpenSearchPPLLexer._serializedATNSegment3, + OpenSearchPPLLexer._serializedATNSegment4, + OpenSearchPPLLexer._serializedATNSegment5, + ], + "", + ); + public static __ATN: ATN; + public static get _ATN(): ATN { + if (!OpenSearchPPLLexer.__ATN) { + OpenSearchPPLLexer.__ATN = new ATNDeserializer().deserialize(Utils.toCharArray(OpenSearchPPLLexer._serializedATN)); + } + + return OpenSearchPPLLexer.__ATN; + } + +} + diff --git a/dashboards-observability/common/query_manager/antlr/output/OpenSearchPPLParser.interp b/dashboards-observability/common/query_manager/antlr/output/OpenSearchPPLParser.interp new file mode 100644 index 000000000..1610ee03e --- /dev/null +++ b/dashboards-observability/common/query_manager/antlr/output/OpenSearchPPLParser.interp @@ -0,0 +1,728 @@ +token literal names: +null +'SEARCH' +'DESCRIBE' +'SHOW' +'FROM' +'WHERE' +'FIELDS' +'RENAME' +'STATS' +'DEDUP' +'SORT' +'EVAL' +'HEAD' +'TOP' +'RARE' +'PARSE' +'METHOD' +'REGEX' +'PUNCT' +'GROK' +'PATTERN' +'PATTERNS' +'NEW_FIELD' +'KMEANS' +'AD' +'ML' +'AS' +'BY' +'SOURCE' +'INDEX' +'D' +'DESC' +'CATALOGS' +'SORTBY' +'AUTO' +'STR' +'IP' +'NUM' +'KEEPEMPTY' +'CONSECUTIVE' +'DEDUP_SPLITVALUES' +'PARTITIONS' +'ALLNUM' +'DELIM' +'CENTROIDS' +'ITERATIONS' +'DISTANCE_TYPE' +'NUMBER_OF_TREES' +'SHINGLE_SIZE' +'SAMPLE_SIZE' +'OUTPUT_AFTER' +'TIME_DECAY' +'ANOMALY_RATE' +'CATEGORY_FIELD' +'TIME_FIELD' +'TIME_ZONE' +'TRAINING_DATA_SIZE' +'ANOMALY_SCORE_THRESHOLD' +'CASE' +'IN' +'NOT' +'OR' +'AND' +'XOR' +'TRUE' +'FALSE' +'REGEXP' +'DATETIME' +'INTERVAL' +'MICROSECOND' +'MILLISECOND' +'SECOND' +'MINUTE' +'HOUR' +'DAY' +'WEEK' +'MONTH' +'QUARTER' +'YEAR' +'SECOND_MICROSECOND' +'MINUTE_MICROSECOND' +'MINUTE_SECOND' +'HOUR_MICROSECOND' +'HOUR_SECOND' +'HOUR_MINUTE' +'DAY_MICROSECOND' +'DAY_SECOND' +'DAY_MINUTE' +'DAY_HOUR' +'YEAR_MONTH' +'CONVERT_TZ' +'DATAMODEL' +'LOOKUP' +'SAVEDSEARCH' +'INT' +'INTEGER' +'DOUBLE' +'LONG' +'FLOAT' +'STRING' +'BOOLEAN' +'|' +',' +'.' +'=' +'>' +'<' +null +null +null +'+' +'-' +'*' +'/' +'%' +'!' +':' +'(' +')' +'[' +']' +'\'' +'"' +'`' +'~' +'&' +'^' +'AVG' +'COUNT' +'DISTINCT_COUNT' +'ESTDC' +'ESTDC_ERROR' +'MAX' +'MEAN' +'MEDIAN' +'MIN' +'MODE' +'RANGE' +'STDEV' +'STDEVP' +'SUM' +'SUMSQ' +'VAR_SAMP' +'VAR_POP' +'STDDEV_SAMP' +'STDDEV_POP' +'PERCENTILE' +'TAKE' +'FIRST' +'LAST' +'LIST' +'VALUES' +'EARLIEST' +'EARLIEST_TIME' +'LATEST' +'LATEST_TIME' +'PER_DAY' +'PER_HOUR' +'PER_MINUTE' +'PER_SECOND' +'RATE' +'SPARKLINE' +'C' +'DC' +'ABS' +'CEIL' +'CEILING' +'CONV' +'CRC32' +'E' +'EXP' +'FLOOR' +'LN' +'LOG' +'LOG10' +'LOG2' +'MOD' +'PI' +'POW' +'POWER' +'RAND' +'ROUND' +'SIGN' +'SQRT' +'TRUNCATE' +'ACOS' +'ASIN' +'ATAN' +'ATAN2' +'COS' +'COT' +'DEGREES' +'RADIANS' +'SIN' +'TAN' +'ADDDATE' +'CURDATE' +'CURRENT_DATE' +'CURRENT_TIME' +'CURRENT_TIMESTAMP' +'CURTIME' +'DATE' +'DATE_ADD' +'DATE_FORMAT' +'DATE_SUB' +'DAYNAME' +'DAYOFMONTH' +'DAYOFWEEK' +'DAYOFYEAR' +'FROM_DAYS' +'LOCALTIME' +'LOCALTIMESTAMP' +'FROM_UNIXTIME' +'MAKEDATE' +'MAKETIME' +'MONTHNAME' +'NOW' +'PERIOD_ADD' +'PERIOD_DIFF' +'SUBDATE' +'SYSDATE' +'TIME' +'TIME_TO_SEC' +'TIMESTAMP' +'TO_DAYS' +'UTC_DATE' +'UTC_TIME' +'UTC_TIMESTAMP' +'UNIX_TIMESTAMP' +'SUBSTR' +'SUBSTRING' +'LTRIM' +'RTRIM' +'TRIM' +'TO' +'LOWER' +'UPPER' +'CONCAT' +'CONCAT_WS' +'LENGTH' +'STRCMP' +'RIGHT' +'LEFT' +'ASCII' +'LOCATE' +'REPLACE' +'CAST' +'LIKE' +'ISNULL' +'ISNOTNULL' +'IFNULL' +'NULLIF' +'IF' +'TYPEOF' +'MATCH' +'MATCH_PHRASE' +'MATCH_PHRASE_PREFIX' +'MATCH_BOOL_PREFIX' +'SIMPLE_QUERY_STRING' +'MULTI_MATCH' +'QUERY_STRING' +'ALLOW_LEADING_WILDCARD' +'ANALYZE_WILDCARD' +'ANALYZER' +'AUTO_GENERATE_SYNONYMS_PHRASE_QUERY' +'BOOST' +'CUTOFF_FREQUENCY' +'DEFAULT_FIELD' +'DEFAULT_OPERATOR' +'ENABLE_POSITION_INCREMENTS' +'ESCAPE' +'FLAGS' +'FUZZY_MAX_EXPANSIONS' +'FUZZY_PREFIX_LENGTH' +'FUZZY_TRANSPOSITIONS' +'FUZZY_REWRITE' +'FUZZINESS' +'LENIENT' +'LOW_FREQ_OPERATOR' +'MAX_DETERMINIZED_STATES' +'MAX_EXPANSIONS' +'MINIMUM_SHOULD_MATCH' +'OPERATOR' +'PHRASE_SLOP' +'PREFIX_LENGTH' +'QUOTE_ANALYZER' +'QUOTE_FIELD_SUFFIX' +'REWRITE' +'SLOP' +'TIE_BREAKER' +'TYPE' +'ZERO_TERMS_QUERY' +'SPAN' +'MS' +'S' +'M' +'H' +'W' +'Q' +'Y' +null +null +null +null +null +null +null +null + +token symbolic names: +null +SEARCH +DESCRIBE +SHOW +FROM +WHERE +FIELDS +RENAME +STATS +DEDUP +SORT +EVAL +HEAD +TOP +RARE +PARSE +METHOD +REGEX +PUNCT +GROK +PATTERN +PATTERNS +NEW_FIELD +KMEANS +AD +ML +AS +BY +SOURCE +INDEX +D +DESC +CATALOGS +SORTBY +AUTO +STR +IP +NUM +KEEPEMPTY +CONSECUTIVE +DEDUP_SPLITVALUES +PARTITIONS +ALLNUM +DELIM +CENTROIDS +ITERATIONS +DISTANCE_TYPE +NUMBER_OF_TREES +SHINGLE_SIZE +SAMPLE_SIZE +OUTPUT_AFTER +TIME_DECAY +ANOMALY_RATE +CATEGORY_FIELD +TIME_FIELD +TIME_ZONE +TRAINING_DATA_SIZE +ANOMALY_SCORE_THRESHOLD +CASE +IN +NOT +OR +AND +XOR +TRUE +FALSE +REGEXP +DATETIME +INTERVAL +MICROSECOND +MILLISECOND +SECOND +MINUTE +HOUR +DAY +WEEK +MONTH +QUARTER +YEAR +SECOND_MICROSECOND +MINUTE_MICROSECOND +MINUTE_SECOND +HOUR_MICROSECOND +HOUR_SECOND +HOUR_MINUTE +DAY_MICROSECOND +DAY_SECOND +DAY_MINUTE +DAY_HOUR +YEAR_MONTH +CONVERT_TZ +DATAMODEL +LOOKUP +SAVEDSEARCH +INT +INTEGER +DOUBLE +LONG +FLOAT +STRING +BOOLEAN +PIPE +COMMA +DOT +EQUAL +GREATER +LESS +NOT_GREATER +NOT_LESS +NOT_EQUAL +PLUS +MINUS +STAR +DIVIDE +MODULE +EXCLAMATION_SYMBOL +COLON +LT_PRTHS +RT_PRTHS +LT_SQR_PRTHS +RT_SQR_PRTHS +SINGLE_QUOTE +DOUBLE_QUOTE +BACKTICK +BIT_NOT_OP +BIT_AND_OP +BIT_XOR_OP +AVG +COUNT +DISTINCT_COUNT +ESTDC +ESTDC_ERROR +MAX +MEAN +MEDIAN +MIN +MODE +RANGE +STDEV +STDEVP +SUM +SUMSQ +VAR_SAMP +VAR_POP +STDDEV_SAMP +STDDEV_POP +PERCENTILE +TAKE +FIRST +LAST +LIST +VALUES +EARLIEST +EARLIEST_TIME +LATEST +LATEST_TIME +PER_DAY +PER_HOUR +PER_MINUTE +PER_SECOND +RATE +SPARKLINE +C +DC +ABS +CEIL +CEILING +CONV +CRC32 +E +EXP +FLOOR +LN +LOG +LOG10 +LOG2 +MOD +PI +POW +POWER +RAND +ROUND +SIGN +SQRT +TRUNCATE +ACOS +ASIN +ATAN +ATAN2 +COS +COT +DEGREES +RADIANS +SIN +TAN +ADDDATE +CURDATE +CURRENT_DATE +CURRENT_TIME +CURRENT_TIMESTAMP +CURTIME +DATE +DATE_ADD +DATE_FORMAT +DATE_SUB +DAYNAME +DAYOFMONTH +DAYOFWEEK +DAYOFYEAR +FROM_DAYS +LOCALTIME +LOCALTIMESTAMP +FROM_UNIXTIME +MAKEDATE +MAKETIME +MONTHNAME +NOW +PERIOD_ADD +PERIOD_DIFF +SUBDATE +SYSDATE +TIME +TIME_TO_SEC +TIMESTAMP +TO_DAYS +UTC_DATE +UTC_TIME +UTC_TIMESTAMP +UNIX_TIMESTAMP +SUBSTR +SUBSTRING +LTRIM +RTRIM +TRIM +TO +LOWER +UPPER +CONCAT +CONCAT_WS +LENGTH +STRCMP +RIGHT +LEFT +ASCII +LOCATE +REPLACE +CAST +LIKE +ISNULL +ISNOTNULL +IFNULL +NULLIF +IF +TYPEOF +MATCH +MATCH_PHRASE +MATCH_PHRASE_PREFIX +MATCH_BOOL_PREFIX +SIMPLE_QUERY_STRING +MULTI_MATCH +QUERY_STRING +ALLOW_LEADING_WILDCARD +ANALYZE_WILDCARD +ANALYZER +AUTO_GENERATE_SYNONYMS_PHRASE_QUERY +BOOST +CUTOFF_FREQUENCY +DEFAULT_FIELD +DEFAULT_OPERATOR +ENABLE_POSITION_INCREMENTS +ESCAPE +FLAGS +FUZZY_MAX_EXPANSIONS +FUZZY_PREFIX_LENGTH +FUZZY_TRANSPOSITIONS +FUZZY_REWRITE +FUZZINESS +LENIENT +LOW_FREQ_OPERATOR +MAX_DETERMINIZED_STATES +MAX_EXPANSIONS +MINIMUM_SHOULD_MATCH +OPERATOR +PHRASE_SLOP +PREFIX_LENGTH +QUOTE_ANALYZER +QUOTE_FIELD_SUFFIX +REWRITE +SLOP +TIE_BREAKER +TYPE +ZERO_TERMS_QUERY +SPAN +MS +S +M +H +W +Q +Y +ID +INTEGER_LITERAL +DECIMAL_LITERAL +ID_DATE_SUFFIX +DQUOTA_STRING +SQUOTA_STRING +BQUOTA_STRING +ERROR_RECOGNITION + +rule names: +root +pplStatement +pplCommands +commands +searchCommand +describeCommand +showCatalogsCommand +whereCommand +fieldsCommand +renameCommand +statsCommand +dedupCommand +sortCommand +evalCommand +headCommand +topCommand +rareCommand +grokCommand +parseCommand +patternsCommand +patternsParameter +patternsMethod +kmeansCommand +kmeansParameter +adCommand +adParameter +mlCommand +mlArg +fromClause +tableSourceClause +renameClasue +byClause +statsByClause +bySpanClause +spanClause +sortbyClause +evalClause +statsAggTerm +statsFunction +statsFunctionName +takeAggFunction +percentileAggFunction +expression +logicalExpression +comparisonExpression +valueExpression +primaryExpression +constantFunction +booleanExpression +relevanceExpression +singleFieldRelevanceFunction +multiFieldRelevanceFunction +tableSource +tableFunction +fieldList +wcFieldList +sortField +sortFieldExpression +fieldExpression +wcFieldExpression +evalFunctionCall +dataTypeFunctionCall +booleanFunctionCall +convertedDataType +evalFunctionName +functionArgs +functionArg +relevanceArg +relevanceArgName +relevanceFieldAndWeight +relevanceFieldWeight +relevanceField +relevanceQuery +relevanceArgValue +mathematicalFunctionBase +trigonometricFunctionName +dateAndTimeFunctionBase +constantFunctionName +conditionFunctionBase +systemFunctionBase +textFunctionBase +comparisonOperator +binaryOperator +singleFieldRelevanceFunctionName +multiFieldRelevanceFunctionName +literalValue +intervalLiteral +stringLiteral +integerLiteral +decimalLiteral +booleanLiteral +datetimeLiteral +dateLiteral +timeLiteral +timestampLiteral +intervalUnit +timespanUnit +valueList +qualifiedName +wcQualifiedName +ident +wildcard +keywordsCanBeId + + +atn: +[3, 51485, 51898, 1421, 44986, 20307, 1543, 60043, 49729, 3, 309, 998, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23, 4, 24, 9, 24, 4, 25, 9, 25, 4, 26, 9, 26, 4, 27, 9, 27, 4, 28, 9, 28, 4, 29, 9, 29, 4, 30, 9, 30, 4, 31, 9, 31, 4, 32, 9, 32, 4, 33, 9, 33, 4, 34, 9, 34, 4, 35, 9, 35, 4, 36, 9, 36, 4, 37, 9, 37, 4, 38, 9, 38, 4, 39, 9, 39, 4, 40, 9, 40, 4, 41, 9, 41, 4, 42, 9, 42, 4, 43, 9, 43, 4, 44, 9, 44, 4, 45, 9, 45, 4, 46, 9, 46, 4, 47, 9, 47, 4, 48, 9, 48, 4, 49, 9, 49, 4, 50, 9, 50, 4, 51, 9, 51, 4, 52, 9, 52, 4, 53, 9, 53, 4, 54, 9, 54, 4, 55, 9, 55, 4, 56, 9, 56, 4, 57, 9, 57, 4, 58, 9, 58, 4, 59, 9, 59, 4, 60, 9, 60, 4, 61, 9, 61, 4, 62, 9, 62, 4, 63, 9, 63, 4, 64, 9, 64, 4, 65, 9, 65, 4, 66, 9, 66, 4, 67, 9, 67, 4, 68, 9, 68, 4, 69, 9, 69, 4, 70, 9, 70, 4, 71, 9, 71, 4, 72, 9, 72, 4, 73, 9, 73, 4, 74, 9, 74, 4, 75, 9, 75, 4, 76, 9, 76, 4, 77, 9, 77, 4, 78, 9, 78, 4, 79, 9, 79, 4, 80, 9, 80, 4, 81, 9, 81, 4, 82, 9, 82, 4, 83, 9, 83, 4, 84, 9, 84, 4, 85, 9, 85, 4, 86, 9, 86, 4, 87, 9, 87, 4, 88, 9, 88, 4, 89, 9, 89, 4, 90, 9, 90, 4, 91, 9, 91, 4, 92, 9, 92, 4, 93, 9, 93, 4, 94, 9, 94, 4, 95, 9, 95, 4, 96, 9, 96, 4, 97, 9, 97, 4, 98, 9, 98, 4, 99, 9, 99, 4, 100, 9, 100, 4, 101, 9, 101, 4, 102, 9, 102, 4, 103, 9, 103, 4, 104, 9, 104, 3, 2, 5, 2, 210, 10, 2, 3, 2, 3, 2, 3, 3, 3, 3, 3, 3, 7, 3, 217, 10, 3, 12, 3, 14, 3, 220, 11, 3, 3, 4, 3, 4, 3, 4, 5, 4, 225, 10, 4, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 5, 5, 243, 10, 5, 3, 6, 5, 6, 246, 10, 6, 3, 6, 3, 6, 5, 6, 250, 10, 6, 3, 6, 3, 6, 3, 6, 3, 6, 5, 6, 256, 10, 6, 3, 6, 3, 6, 3, 6, 5, 6, 261, 10, 6, 3, 7, 3, 7, 3, 7, 3, 8, 3, 8, 3, 8, 3, 9, 3, 9, 3, 9, 3, 10, 3, 10, 5, 10, 274, 10, 10, 3, 10, 3, 10, 3, 11, 3, 11, 3, 11, 3, 11, 7, 11, 282, 10, 11, 12, 11, 14, 11, 285, 11, 11, 3, 12, 3, 12, 3, 12, 3, 12, 5, 12, 291, 10, 12, 3, 12, 3, 12, 3, 12, 5, 12, 296, 10, 12, 3, 12, 3, 12, 3, 12, 5, 12, 301, 10, 12, 3, 12, 3, 12, 3, 12, 7, 12, 306, 10, 12, 12, 12, 14, 12, 309, 11, 12, 3, 12, 5, 12, 312, 10, 12, 3, 12, 3, 12, 3, 12, 5, 12, 317, 10, 12, 3, 13, 3, 13, 5, 13, 321, 10, 13, 3, 13, 3, 13, 3, 13, 3, 13, 5, 13, 327, 10, 13, 3, 13, 3, 13, 3, 13, 5, 13, 332, 10, 13, 3, 14, 3, 14, 3, 14, 3, 15, 3, 15, 3, 15, 3, 15, 7, 15, 341, 10, 15, 12, 15, 14, 15, 344, 11, 15, 3, 16, 3, 16, 5, 16, 348, 10, 16, 3, 16, 3, 16, 5, 16, 352, 10, 16, 3, 17, 3, 17, 5, 17, 356, 10, 17, 3, 17, 3, 17, 5, 17, 360, 10, 17, 3, 18, 3, 18, 3, 18, 5, 18, 365, 10, 18, 3, 19, 3, 19, 3, 19, 3, 19, 3, 20, 3, 20, 3, 20, 3, 20, 3, 21, 3, 21, 7, 21, 377, 10, 21, 12, 21, 14, 21, 380, 11, 21, 3, 21, 3, 21, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 5, 22, 390, 10, 22, 3, 23, 3, 23, 3, 24, 3, 24, 7, 24, 396, 10, 24, 12, 24, 14, 24, 399, 11, 24, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 5, 25, 410, 10, 25, 3, 26, 3, 26, 7, 26, 414, 10, 26, 12, 26, 14, 26, 417, 11, 26, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 5, 27, 455, 10, 27, 3, 28, 3, 28, 7, 28, 459, 10, 28, 12, 28, 14, 28, 462, 11, 28, 3, 29, 3, 29, 3, 29, 3, 29, 3, 30, 3, 30, 3, 30, 3, 30, 3, 30, 3, 30, 3, 30, 3, 30, 3, 30, 3, 30, 3, 30, 3, 30, 5, 30, 480, 10, 30, 3, 31, 3, 31, 3, 31, 7, 31, 485, 10, 31, 12, 31, 14, 31, 488, 11, 31, 3, 32, 3, 32, 3, 32, 3, 32, 3, 33, 3, 33, 3, 33, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 5, 34, 506, 10, 34, 3, 35, 3, 35, 3, 35, 5, 35, 511, 10, 35, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 5, 36, 519, 10, 36, 3, 36, 3, 36, 3, 37, 3, 37, 3, 37, 7, 37, 526, 10, 37, 12, 37, 14, 37, 529, 11, 37, 3, 38, 3, 38, 3, 38, 3, 38, 3, 39, 3, 39, 3, 39, 5, 39, 538, 10, 39, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 5, 40, 555, 10, 40, 3, 41, 3, 41, 3, 42, 3, 42, 3, 42, 3, 42, 3, 42, 5, 42, 564, 10, 42, 3, 42, 3, 42, 3, 43, 3, 43, 3, 43, 3, 43, 3, 43, 3, 43, 3, 43, 3, 43, 3, 44, 3, 44, 3, 44, 5, 44, 579, 10, 44, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 5, 45, 587, 10, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 5, 45, 594, 10, 45, 3, 45, 3, 45, 3, 45, 3, 45, 7, 45, 600, 10, 45, 12, 45, 14, 45, 603, 11, 45, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 5, 46, 613, 10, 46, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 5, 47, 623, 10, 47, 3, 47, 3, 47, 3, 47, 3, 47, 7, 47, 629, 10, 47, 12, 47, 14, 47, 632, 11, 47, 3, 48, 3, 48, 3, 48, 3, 48, 3, 48, 5, 48, 639, 10, 48, 3, 49, 3, 49, 3, 49, 5, 49, 644, 10, 49, 3, 49, 3, 49, 3, 50, 3, 50, 3, 51, 3, 51, 5, 51, 652, 10, 51, 3, 52, 3, 52, 3, 52, 3, 52, 3, 52, 3, 52, 3, 52, 7, 52, 661, 10, 52, 12, 52, 14, 52, 664, 11, 52, 3, 52, 3, 52, 3, 53, 3, 53, 3, 53, 3, 53, 3, 53, 3, 53, 7, 53, 674, 10, 53, 12, 53, 14, 53, 677, 11, 53, 3, 53, 3, 53, 3, 53, 3, 53, 3, 53, 7, 53, 684, 10, 53, 12, 53, 14, 53, 687, 11, 53, 3, 53, 3, 53, 3, 54, 3, 54, 5, 54, 693, 10, 54, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 56, 3, 56, 3, 56, 7, 56, 703, 10, 56, 12, 56, 14, 56, 706, 11, 56, 3, 57, 3, 57, 3, 57, 7, 57, 711, 10, 57, 12, 57, 14, 57, 714, 11, 57, 3, 58, 5, 58, 717, 10, 58, 3, 58, 3, 58, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 5, 59, 742, 10, 59, 3, 60, 3, 60, 3, 61, 3, 61, 3, 62, 3, 62, 3, 62, 3, 62, 3, 62, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 64, 3, 64, 3, 64, 3, 64, 3, 64, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 5, 65, 775, 10, 65, 3, 66, 3, 66, 3, 66, 3, 66, 3, 66, 5, 66, 782, 10, 66, 3, 67, 3, 67, 3, 67, 7, 67, 787, 10, 67, 12, 67, 14, 67, 790, 11, 67, 5, 67, 792, 10, 67, 3, 68, 3, 68, 3, 68, 5, 68, 797, 10, 68, 3, 68, 3, 68, 3, 69, 3, 69, 3, 69, 3, 69, 3, 70, 3, 70, 3, 71, 3, 71, 3, 71, 3, 71, 3, 71, 3, 71, 3, 71, 3, 71, 5, 71, 815, 10, 71, 3, 72, 3, 72, 5, 72, 819, 10, 72, 3, 73, 3, 73, 5, 73, 823, 10, 73, 3, 74, 3, 74, 3, 75, 3, 75, 5, 75, 829, 10, 75, 3, 76, 3, 76, 3, 76, 3, 76, 3, 76, 3, 76, 3, 76, 3, 76, 3, 76, 3, 76, 3, 76, 3, 76, 3, 76, 3, 76, 3, 76, 3, 76, 3, 76, 3, 76, 3, 76, 3, 76, 3, 76, 3, 76, 5, 76, 853, 10, 76, 3, 77, 3, 77, 3, 78, 3, 78, 3, 79, 3, 79, 3, 80, 3, 80, 3, 81, 3, 81, 3, 82, 3, 82, 3, 83, 3, 83, 3, 84, 3, 84, 3, 85, 3, 85, 3, 86, 3, 86, 3, 87, 3, 87, 3, 87, 3, 87, 3, 87, 3, 87, 5, 87, 881, 10, 87, 3, 88, 3, 88, 3, 88, 3, 88, 3, 89, 3, 89, 3, 90, 5, 90, 890, 10, 90, 3, 90, 3, 90, 3, 91, 5, 91, 895, 10, 91, 3, 91, 3, 91, 3, 92, 3, 92, 3, 93, 3, 93, 3, 93, 5, 93, 904, 10, 93, 3, 94, 3, 94, 3, 94, 3, 95, 3, 95, 3, 95, 3, 96, 3, 96, 3, 96, 3, 97, 3, 97, 3, 98, 3, 98, 3, 99, 3, 99, 3, 99, 3, 99, 7, 99, 923, 10, 99, 12, 99, 14, 99, 926, 11, 99, 3, 99, 3, 99, 3, 100, 3, 100, 3, 100, 7, 100, 933, 10, 100, 12, 100, 14, 100, 936, 11, 100, 3, 101, 3, 101, 3, 101, 7, 101, 941, 10, 101, 12, 101, 14, 101, 944, 11, 101, 3, 102, 5, 102, 947, 10, 102, 3, 102, 3, 102, 3, 102, 3, 102, 3, 102, 3, 102, 3, 102, 5, 102, 956, 10, 102, 3, 103, 3, 103, 3, 103, 7, 103, 961, 10, 103, 12, 103, 14, 103, 964, 11, 103, 3, 103, 5, 103, 967, 10, 103, 3, 103, 3, 103, 3, 103, 3, 103, 3, 103, 3, 103, 3, 103, 3, 103, 3, 103, 3, 103, 3, 103, 3, 103, 5, 103, 981, 10, 103, 3, 104, 3, 104, 3, 104, 3, 104, 3, 104, 3, 104, 3, 104, 3, 104, 3, 104, 3, 104, 3, 104, 3, 104, 3, 104, 5, 104, 996, 10, 104, 3, 104, 2, 2, 4, 88, 92, 105, 2, 2, 4, 2, 6, 2, 8, 2, 10, 2, 12, 2, 14, 2, 16, 2, 18, 2, 20, 2, 22, 2, 24, 2, 26, 2, 28, 2, 30, 2, 32, 2, 34, 2, 36, 2, 38, 2, 40, 2, 42, 2, 44, 2, 46, 2, 48, 2, 50, 2, 52, 2, 54, 2, 56, 2, 58, 2, 60, 2, 62, 2, 64, 2, 66, 2, 68, 2, 70, 2, 72, 2, 74, 2, 76, 2, 78, 2, 80, 2, 82, 2, 84, 2, 86, 2, 88, 2, 90, 2, 92, 2, 94, 2, 96, 2, 98, 2, 100, 2, 102, 2, 104, 2, 106, 2, 108, 2, 110, 2, 112, 2, 114, 2, 116, 2, 118, 2, 120, 2, 122, 2, 124, 2, 126, 2, 128, 2, 130, 2, 132, 2, 134, 2, 136, 2, 138, 2, 140, 2, 142, 2, 144, 2, 146, 2, 148, 2, 150, 2, 152, 2, 154, 2, 156, 2, 158, 2, 160, 2, 162, 2, 164, 2, 166, 2, 168, 2, 170, 2, 172, 2, 174, 2, 176, 2, 178, 2, 180, 2, 182, 2, 184, 2, 186, 2, 188, 2, 190, 2, 192, 2, 194, 2, 196, 2, 198, 2, 200, 2, 202, 2, 204, 2, 206, 2, 2, 20, 3, 2, 112, 113, 3, 2, 19, 20, 4, 2, 131, 131, 165, 165, 7, 2, 129, 130, 134, 134, 137, 137, 142, 142, 144, 147, 5, 2, 8, 8, 57, 57, 263, 293, 3, 2, 187, 196, 11, 2, 69, 69, 71, 71, 73, 80, 92, 92, 197, 197, 203, 211, 214, 217, 219, 226, 230, 230, 6, 2, 198, 202, 212, 213, 218, 218, 227, 229, 3, 2, 249, 254, 4, 2, 231, 235, 237, 247, 4, 2, 68, 68, 106, 111, 3, 2, 112, 116, 3, 2, 256, 259, 3, 2, 260, 262, 3, 2, 306, 307, 3, 2, 66, 67, 4, 2, 71, 71, 73, 91, 5, 2, 32, 32, 72, 80, 295, 301, 2, 1072, 2, 209, 3, 2, 2, 2, 4, 213, 3, 2, 2, 2, 6, 224, 3, 2, 2, 2, 8, 242, 3, 2, 2, 2, 10, 260, 3, 2, 2, 2, 12, 262, 3, 2, 2, 2, 14, 265, 3, 2, 2, 2, 16, 268, 3, 2, 2, 2, 18, 271, 3, 2, 2, 2, 20, 277, 3, 2, 2, 2, 22, 286, 3, 2, 2, 2, 24, 318, 3, 2, 2, 2, 26, 333, 3, 2, 2, 2, 28, 336, 3, 2, 2, 2, 30, 345, 3, 2, 2, 2, 32, 353, 3, 2, 2, 2, 34, 361, 3, 2, 2, 2, 36, 366, 3, 2, 2, 2, 38, 370, 3, 2, 2, 2, 40, 374, 3, 2, 2, 2, 42, 389, 3, 2, 2, 2, 44, 391, 3, 2, 2, 2, 46, 393, 3, 2, 2, 2, 48, 409, 3, 2, 2, 2, 50, 411, 3, 2, 2, 2, 52, 454, 3, 2, 2, 2, 54, 456, 3, 2, 2, 2, 56, 463, 3, 2, 2, 2, 58, 479, 3, 2, 2, 2, 60, 481, 3, 2, 2, 2, 62, 489, 3, 2, 2, 2, 64, 493, 3, 2, 2, 2, 66, 505, 3, 2, 2, 2, 68, 507, 3, 2, 2, 2, 70, 512, 3, 2, 2, 2, 72, 522, 3, 2, 2, 2, 74, 530, 3, 2, 2, 2, 76, 534, 3, 2, 2, 2, 78, 554, 3, 2, 2, 2, 80, 556, 3, 2, 2, 2, 82, 558, 3, 2, 2, 2, 84, 567, 3, 2, 2, 2, 86, 578, 3, 2, 2, 2, 88, 586, 3, 2, 2, 2, 90, 612, 3, 2, 2, 2, 92, 622, 3, 2, 2, 2, 94, 638, 3, 2, 2, 2, 96, 640, 3, 2, 2, 2, 98, 647, 3, 2, 2, 2, 100, 651, 3, 2, 2, 2, 102, 653, 3, 2, 2, 2, 104, 667, 3, 2, 2, 2, 106, 692, 3, 2, 2, 2, 108, 694, 3, 2, 2, 2, 110, 699, 3, 2, 2, 2, 112, 707, 3, 2, 2, 2, 114, 716, 3, 2, 2, 2, 116, 741, 3, 2, 2, 2, 118, 743, 3, 2, 2, 2, 120, 745, 3, 2, 2, 2, 122, 747, 3, 2, 2, 2, 124, 752, 3, 2, 2, 2, 126, 759, 3, 2, 2, 2, 128, 774, 3, 2, 2, 2, 130, 781, 3, 2, 2, 2, 132, 791, 3, 2, 2, 2, 134, 796, 3, 2, 2, 2, 136, 800, 3, 2, 2, 2, 138, 804, 3, 2, 2, 2, 140, 814, 3, 2, 2, 2, 142, 818, 3, 2, 2, 2, 144, 822, 3, 2, 2, 2, 146, 824, 3, 2, 2, 2, 148, 828, 3, 2, 2, 2, 150, 852, 3, 2, 2, 2, 152, 854, 3, 2, 2, 2, 154, 856, 3, 2, 2, 2, 156, 858, 3, 2, 2, 2, 158, 860, 3, 2, 2, 2, 160, 862, 3, 2, 2, 2, 162, 864, 3, 2, 2, 2, 164, 866, 3, 2, 2, 2, 166, 868, 3, 2, 2, 2, 168, 870, 3, 2, 2, 2, 170, 872, 3, 2, 2, 2, 172, 880, 3, 2, 2, 2, 174, 882, 3, 2, 2, 2, 176, 886, 3, 2, 2, 2, 178, 889, 3, 2, 2, 2, 180, 894, 3, 2, 2, 2, 182, 898, 3, 2, 2, 2, 184, 903, 3, 2, 2, 2, 186, 905, 3, 2, 2, 2, 188, 908, 3, 2, 2, 2, 190, 911, 3, 2, 2, 2, 192, 914, 3, 2, 2, 2, 194, 916, 3, 2, 2, 2, 196, 918, 3, 2, 2, 2, 198, 929, 3, 2, 2, 2, 200, 937, 3, 2, 2, 2, 202, 955, 3, 2, 2, 2, 204, 980, 3, 2, 2, 2, 206, 995, 3, 2, 2, 2, 208, 210, 5, 4, 3, 2, 209, 208, 3, 2, 2, 2, 209, 210, 3, 2, 2, 2, 210, 211, 3, 2, 2, 2, 211, 212, 7, 2, 2, 3, 212, 3, 3, 2, 2, 2, 213, 218, 5, 6, 4, 2, 214, 215, 7, 103, 2, 2, 215, 217, 5, 8, 5, 2, 216, 214, 3, 2, 2, 2, 217, 220, 3, 2, 2, 2, 218, 216, 3, 2, 2, 2, 218, 219, 3, 2, 2, 2, 219, 5, 3, 2, 2, 2, 220, 218, 3, 2, 2, 2, 221, 225, 5, 10, 6, 2, 222, 225, 5, 12, 7, 2, 223, 225, 5, 14, 8, 2, 224, 221, 3, 2, 2, 2, 224, 222, 3, 2, 2, 2, 224, 223, 3, 2, 2, 2, 225, 7, 3, 2, 2, 2, 226, 243, 5, 16, 9, 2, 227, 243, 5, 18, 10, 2, 228, 243, 5, 20, 11, 2, 229, 243, 5, 22, 12, 2, 230, 243, 5, 24, 13, 2, 231, 243, 5, 26, 14, 2, 232, 243, 5, 28, 15, 2, 233, 243, 5, 30, 16, 2, 234, 243, 5, 32, 17, 2, 235, 243, 5, 34, 18, 2, 236, 243, 5, 36, 19, 2, 237, 243, 5, 38, 20, 2, 238, 243, 5, 40, 21, 2, 239, 243, 5, 46, 24, 2, 240, 243, 5, 50, 26, 2, 241, 243, 5, 54, 28, 2, 242, 226, 3, 2, 2, 2, 242, 227, 3, 2, 2, 2, 242, 228, 3, 2, 2, 2, 242, 229, 3, 2, 2, 2, 242, 230, 3, 2, 2, 2, 242, 231, 3, 2, 2, 2, 242, 232, 3, 2, 2, 2, 242, 233, 3, 2, 2, 2, 242, 234, 3, 2, 2, 2, 242, 235, 3, 2, 2, 2, 242, 236, 3, 2, 2, 2, 242, 237, 3, 2, 2, 2, 242, 238, 3, 2, 2, 2, 242, 239, 3, 2, 2, 2, 242, 240, 3, 2, 2, 2, 242, 241, 3, 2, 2, 2, 243, 9, 3, 2, 2, 2, 244, 246, 7, 3, 2, 2, 245, 244, 3, 2, 2, 2, 245, 246, 3, 2, 2, 2, 246, 247, 3, 2, 2, 2, 247, 261, 5, 58, 30, 2, 248, 250, 7, 3, 2, 2, 249, 248, 3, 2, 2, 2, 249, 250, 3, 2, 2, 2, 250, 251, 3, 2, 2, 2, 251, 252, 5, 58, 30, 2, 252, 253, 5, 88, 45, 2, 253, 261, 3, 2, 2, 2, 254, 256, 7, 3, 2, 2, 255, 254, 3, 2, 2, 2, 255, 256, 3, 2, 2, 2, 256, 257, 3, 2, 2, 2, 257, 258, 5, 88, 45, 2, 258, 259, 5, 58, 30, 2, 259, 261, 3, 2, 2, 2, 260, 245, 3, 2, 2, 2, 260, 249, 3, 2, 2, 2, 260, 255, 3, 2, 2, 2, 261, 11, 3, 2, 2, 2, 262, 263, 7, 4, 2, 2, 263, 264, 5, 60, 31, 2, 264, 13, 3, 2, 2, 2, 265, 266, 7, 5, 2, 2, 266, 267, 7, 34, 2, 2, 267, 15, 3, 2, 2, 2, 268, 269, 7, 7, 2, 2, 269, 270, 5, 88, 45, 2, 270, 17, 3, 2, 2, 2, 271, 273, 7, 8, 2, 2, 272, 274, 9, 2, 2, 2, 273, 272, 3, 2, 2, 2, 273, 274, 3, 2, 2, 2, 274, 275, 3, 2, 2, 2, 275, 276, 5, 110, 56, 2, 276, 19, 3, 2, 2, 2, 277, 278, 7, 9, 2, 2, 278, 283, 5, 62, 32, 2, 279, 280, 7, 104, 2, 2, 280, 282, 5, 62, 32, 2, 281, 279, 3, 2, 2, 2, 282, 285, 3, 2, 2, 2, 283, 281, 3, 2, 2, 2, 283, 284, 3, 2, 2, 2, 284, 21, 3, 2, 2, 2, 285, 283, 3, 2, 2, 2, 286, 290, 7, 10, 2, 2, 287, 288, 7, 43, 2, 2, 288, 289, 7, 106, 2, 2, 289, 291, 5, 178, 90, 2, 290, 287, 3, 2, 2, 2, 290, 291, 3, 2, 2, 2, 291, 295, 3, 2, 2, 2, 292, 293, 7, 44, 2, 2, 293, 294, 7, 106, 2, 2, 294, 296, 5, 182, 92, 2, 295, 292, 3, 2, 2, 2, 295, 296, 3, 2, 2, 2, 296, 300, 3, 2, 2, 2, 297, 298, 7, 45, 2, 2, 298, 299, 7, 106, 2, 2, 299, 301, 5, 176, 89, 2, 300, 297, 3, 2, 2, 2, 300, 301, 3, 2, 2, 2, 301, 302, 3, 2, 2, 2, 302, 307, 5, 76, 39, 2, 303, 304, 7, 104, 2, 2, 304, 306, 5, 76, 39, 2, 305, 303, 3, 2, 2, 2, 306, 309, 3, 2, 2, 2, 307, 305, 3, 2, 2, 2, 307, 308, 3, 2, 2, 2, 308, 311, 3, 2, 2, 2, 309, 307, 3, 2, 2, 2, 310, 312, 5, 66, 34, 2, 311, 310, 3, 2, 2, 2, 311, 312, 3, 2, 2, 2, 312, 316, 3, 2, 2, 2, 313, 314, 7, 42, 2, 2, 314, 315, 7, 106, 2, 2, 315, 317, 5, 182, 92, 2, 316, 313, 3, 2, 2, 2, 316, 317, 3, 2, 2, 2, 317, 23, 3, 2, 2, 2, 318, 320, 7, 11, 2, 2, 319, 321, 5, 178, 90, 2, 320, 319, 3, 2, 2, 2, 320, 321, 3, 2, 2, 2, 321, 322, 3, 2, 2, 2, 322, 326, 5, 110, 56, 2, 323, 324, 7, 40, 2, 2, 324, 325, 7, 106, 2, 2, 325, 327, 5, 182, 92, 2, 326, 323, 3, 2, 2, 2, 326, 327, 3, 2, 2, 2, 327, 331, 3, 2, 2, 2, 328, 329, 7, 41, 2, 2, 329, 330, 7, 106, 2, 2, 330, 332, 5, 182, 92, 2, 331, 328, 3, 2, 2, 2, 331, 332, 3, 2, 2, 2, 332, 25, 3, 2, 2, 2, 333, 334, 7, 12, 2, 2, 334, 335, 5, 72, 37, 2, 335, 27, 3, 2, 2, 2, 336, 337, 7, 13, 2, 2, 337, 342, 5, 74, 38, 2, 338, 339, 7, 104, 2, 2, 339, 341, 5, 74, 38, 2, 340, 338, 3, 2, 2, 2, 341, 344, 3, 2, 2, 2, 342, 340, 3, 2, 2, 2, 342, 343, 3, 2, 2, 2, 343, 29, 3, 2, 2, 2, 344, 342, 3, 2, 2, 2, 345, 347, 7, 14, 2, 2, 346, 348, 5, 178, 90, 2, 347, 346, 3, 2, 2, 2, 347, 348, 3, 2, 2, 2, 348, 351, 3, 2, 2, 2, 349, 350, 7, 6, 2, 2, 350, 352, 5, 178, 90, 2, 351, 349, 3, 2, 2, 2, 351, 352, 3, 2, 2, 2, 352, 31, 3, 2, 2, 2, 353, 355, 7, 15, 2, 2, 354, 356, 5, 178, 90, 2, 355, 354, 3, 2, 2, 2, 355, 356, 3, 2, 2, 2, 356, 357, 3, 2, 2, 2, 357, 359, 5, 110, 56, 2, 358, 360, 5, 64, 33, 2, 359, 358, 3, 2, 2, 2, 359, 360, 3, 2, 2, 2, 360, 33, 3, 2, 2, 2, 361, 362, 7, 16, 2, 2, 362, 364, 5, 110, 56, 2, 363, 365, 5, 64, 33, 2, 364, 363, 3, 2, 2, 2, 364, 365, 3, 2, 2, 2, 365, 35, 3, 2, 2, 2, 366, 367, 7, 21, 2, 2, 367, 368, 5, 86, 44, 2, 368, 369, 5, 176, 89, 2, 369, 37, 3, 2, 2, 2, 370, 371, 7, 17, 2, 2, 371, 372, 5, 86, 44, 2, 372, 373, 5, 176, 89, 2, 373, 39, 3, 2, 2, 2, 374, 378, 7, 23, 2, 2, 375, 377, 5, 42, 22, 2, 376, 375, 3, 2, 2, 2, 377, 380, 3, 2, 2, 2, 378, 376, 3, 2, 2, 2, 378, 379, 3, 2, 2, 2, 379, 381, 3, 2, 2, 2, 380, 378, 3, 2, 2, 2, 381, 382, 5, 86, 44, 2, 382, 41, 3, 2, 2, 2, 383, 384, 7, 24, 2, 2, 384, 385, 7, 106, 2, 2, 385, 390, 5, 176, 89, 2, 386, 387, 7, 22, 2, 2, 387, 388, 7, 106, 2, 2, 388, 390, 5, 176, 89, 2, 389, 383, 3, 2, 2, 2, 389, 386, 3, 2, 2, 2, 390, 43, 3, 2, 2, 2, 391, 392, 9, 3, 2, 2, 392, 45, 3, 2, 2, 2, 393, 397, 7, 25, 2, 2, 394, 396, 5, 48, 25, 2, 395, 394, 3, 2, 2, 2, 396, 399, 3, 2, 2, 2, 397, 395, 3, 2, 2, 2, 397, 398, 3, 2, 2, 2, 398, 47, 3, 2, 2, 2, 399, 397, 3, 2, 2, 2, 400, 401, 7, 46, 2, 2, 401, 402, 7, 106, 2, 2, 402, 410, 5, 178, 90, 2, 403, 404, 7, 47, 2, 2, 404, 405, 7, 106, 2, 2, 405, 410, 5, 178, 90, 2, 406, 407, 7, 48, 2, 2, 407, 408, 7, 106, 2, 2, 408, 410, 5, 176, 89, 2, 409, 400, 3, 2, 2, 2, 409, 403, 3, 2, 2, 2, 409, 406, 3, 2, 2, 2, 410, 49, 3, 2, 2, 2, 411, 415, 7, 26, 2, 2, 412, 414, 5, 52, 27, 2, 413, 412, 3, 2, 2, 2, 414, 417, 3, 2, 2, 2, 415, 413, 3, 2, 2, 2, 415, 416, 3, 2, 2, 2, 416, 51, 3, 2, 2, 2, 417, 415, 3, 2, 2, 2, 418, 419, 7, 49, 2, 2, 419, 420, 7, 106, 2, 2, 420, 455, 5, 178, 90, 2, 421, 422, 7, 50, 2, 2, 422, 423, 7, 106, 2, 2, 423, 455, 5, 178, 90, 2, 424, 425, 7, 51, 2, 2, 425, 426, 7, 106, 2, 2, 426, 455, 5, 178, 90, 2, 427, 428, 7, 52, 2, 2, 428, 429, 7, 106, 2, 2, 429, 455, 5, 178, 90, 2, 430, 431, 7, 53, 2, 2, 431, 432, 7, 106, 2, 2, 432, 455, 5, 180, 91, 2, 433, 434, 7, 54, 2, 2, 434, 435, 7, 106, 2, 2, 435, 455, 5, 180, 91, 2, 436, 437, 7, 55, 2, 2, 437, 438, 7, 106, 2, 2, 438, 455, 5, 176, 89, 2, 439, 440, 7, 56, 2, 2, 440, 441, 7, 106, 2, 2, 441, 455, 5, 176, 89, 2, 442, 443, 7, 205, 2, 2, 443, 444, 7, 106, 2, 2, 444, 455, 5, 176, 89, 2, 445, 446, 7, 57, 2, 2, 446, 447, 7, 106, 2, 2, 447, 455, 5, 176, 89, 2, 448, 449, 7, 58, 2, 2, 449, 450, 7, 106, 2, 2, 450, 455, 5, 178, 90, 2, 451, 452, 7, 59, 2, 2, 452, 453, 7, 106, 2, 2, 453, 455, 5, 180, 91, 2, 454, 418, 3, 2, 2, 2, 454, 421, 3, 2, 2, 2, 454, 424, 3, 2, 2, 2, 454, 427, 3, 2, 2, 2, 454, 430, 3, 2, 2, 2, 454, 433, 3, 2, 2, 2, 454, 436, 3, 2, 2, 2, 454, 439, 3, 2, 2, 2, 454, 442, 3, 2, 2, 2, 454, 445, 3, 2, 2, 2, 454, 448, 3, 2, 2, 2, 454, 451, 3, 2, 2, 2, 455, 53, 3, 2, 2, 2, 456, 460, 7, 27, 2, 2, 457, 459, 5, 56, 29, 2, 458, 457, 3, 2, 2, 2, 459, 462, 3, 2, 2, 2, 460, 458, 3, 2, 2, 2, 460, 461, 3, 2, 2, 2, 461, 55, 3, 2, 2, 2, 462, 460, 3, 2, 2, 2, 463, 464, 5, 202, 102, 2, 464, 465, 7, 106, 2, 2, 465, 466, 5, 172, 87, 2, 466, 57, 3, 2, 2, 2, 467, 468, 7, 30, 2, 2, 468, 469, 7, 106, 2, 2, 469, 480, 5, 60, 31, 2, 470, 471, 7, 31, 2, 2, 471, 472, 7, 106, 2, 2, 472, 480, 5, 60, 31, 2, 473, 474, 7, 30, 2, 2, 474, 475, 7, 106, 2, 2, 475, 480, 5, 108, 55, 2, 476, 477, 7, 31, 2, 2, 477, 478, 7, 106, 2, 2, 478, 480, 5, 108, 55, 2, 479, 467, 3, 2, 2, 2, 479, 470, 3, 2, 2, 2, 479, 473, 3, 2, 2, 2, 479, 476, 3, 2, 2, 2, 480, 59, 3, 2, 2, 2, 481, 486, 5, 106, 54, 2, 482, 483, 7, 104, 2, 2, 483, 485, 5, 106, 54, 2, 484, 482, 3, 2, 2, 2, 485, 488, 3, 2, 2, 2, 486, 484, 3, 2, 2, 2, 486, 487, 3, 2, 2, 2, 487, 61, 3, 2, 2, 2, 488, 486, 3, 2, 2, 2, 489, 490, 5, 120, 61, 2, 490, 491, 7, 28, 2, 2, 491, 492, 5, 120, 61, 2, 492, 63, 3, 2, 2, 2, 493, 494, 7, 29, 2, 2, 494, 495, 5, 110, 56, 2, 495, 65, 3, 2, 2, 2, 496, 497, 7, 29, 2, 2, 497, 506, 5, 110, 56, 2, 498, 499, 7, 29, 2, 2, 499, 506, 5, 68, 35, 2, 500, 501, 7, 29, 2, 2, 501, 502, 5, 68, 35, 2, 502, 503, 7, 104, 2, 2, 503, 504, 5, 110, 56, 2, 504, 506, 3, 2, 2, 2, 505, 496, 3, 2, 2, 2, 505, 498, 3, 2, 2, 2, 505, 500, 3, 2, 2, 2, 506, 67, 3, 2, 2, 2, 507, 510, 5, 70, 36, 2, 508, 509, 7, 28, 2, 2, 509, 511, 5, 198, 100, 2, 510, 508, 3, 2, 2, 2, 510, 511, 3, 2, 2, 2, 511, 69, 3, 2, 2, 2, 512, 513, 7, 294, 2, 2, 513, 514, 7, 119, 2, 2, 514, 515, 5, 118, 60, 2, 515, 516, 7, 104, 2, 2, 516, 518, 5, 172, 87, 2, 517, 519, 5, 194, 98, 2, 518, 517, 3, 2, 2, 2, 518, 519, 3, 2, 2, 2, 519, 520, 3, 2, 2, 2, 520, 521, 7, 120, 2, 2, 521, 71, 3, 2, 2, 2, 522, 527, 5, 114, 58, 2, 523, 524, 7, 104, 2, 2, 524, 526, 5, 114, 58, 2, 525, 523, 3, 2, 2, 2, 526, 529, 3, 2, 2, 2, 527, 525, 3, 2, 2, 2, 527, 528, 3, 2, 2, 2, 528, 73, 3, 2, 2, 2, 529, 527, 3, 2, 2, 2, 530, 531, 5, 118, 60, 2, 531, 532, 7, 106, 2, 2, 532, 533, 5, 86, 44, 2, 533, 75, 3, 2, 2, 2, 534, 537, 5, 78, 40, 2, 535, 536, 7, 28, 2, 2, 536, 538, 5, 120, 61, 2, 537, 535, 3, 2, 2, 2, 537, 538, 3, 2, 2, 2, 538, 77, 3, 2, 2, 2, 539, 540, 5, 80, 41, 2, 540, 541, 7, 119, 2, 2, 541, 542, 5, 92, 47, 2, 542, 543, 7, 120, 2, 2, 543, 555, 3, 2, 2, 2, 544, 545, 7, 130, 2, 2, 545, 546, 7, 119, 2, 2, 546, 555, 7, 120, 2, 2, 547, 548, 9, 4, 2, 2, 548, 549, 7, 119, 2, 2, 549, 550, 5, 92, 47, 2, 550, 551, 7, 120, 2, 2, 551, 555, 3, 2, 2, 2, 552, 555, 5, 84, 43, 2, 553, 555, 5, 82, 42, 2, 554, 539, 3, 2, 2, 2, 554, 544, 3, 2, 2, 2, 554, 547, 3, 2, 2, 2, 554, 552, 3, 2, 2, 2, 554, 553, 3, 2, 2, 2, 555, 79, 3, 2, 2, 2, 556, 557, 9, 5, 2, 2, 557, 81, 3, 2, 2, 2, 558, 559, 7, 149, 2, 2, 559, 560, 7, 119, 2, 2, 560, 563, 5, 118, 60, 2, 561, 562, 7, 104, 2, 2, 562, 564, 5, 178, 90, 2, 563, 561, 3, 2, 2, 2, 563, 564, 3, 2, 2, 2, 564, 565, 3, 2, 2, 2, 565, 566, 7, 120, 2, 2, 566, 83, 3, 2, 2, 2, 567, 568, 7, 148, 2, 2, 568, 569, 7, 108, 2, 2, 569, 570, 5, 178, 90, 2, 570, 571, 7, 107, 2, 2, 571, 572, 7, 119, 2, 2, 572, 573, 5, 118, 60, 2, 573, 574, 7, 120, 2, 2, 574, 85, 3, 2, 2, 2, 575, 579, 5, 88, 45, 2, 576, 579, 5, 90, 46, 2, 577, 579, 5, 92, 47, 2, 578, 575, 3, 2, 2, 2, 578, 576, 3, 2, 2, 2, 578, 577, 3, 2, 2, 2, 579, 87, 3, 2, 2, 2, 580, 581, 8, 45, 1, 2, 581, 587, 5, 90, 46, 2, 582, 583, 7, 62, 2, 2, 583, 587, 5, 88, 45, 8, 584, 587, 5, 98, 50, 2, 585, 587, 5, 100, 51, 2, 586, 580, 3, 2, 2, 2, 586, 582, 3, 2, 2, 2, 586, 584, 3, 2, 2, 2, 586, 585, 3, 2, 2, 2, 587, 601, 3, 2, 2, 2, 588, 589, 12, 7, 2, 2, 589, 590, 7, 63, 2, 2, 590, 600, 5, 88, 45, 8, 591, 593, 12, 6, 2, 2, 592, 594, 7, 64, 2, 2, 593, 592, 3, 2, 2, 2, 593, 594, 3, 2, 2, 2, 594, 595, 3, 2, 2, 2, 595, 600, 5, 88, 45, 7, 596, 597, 12, 5, 2, 2, 597, 598, 7, 65, 2, 2, 598, 600, 5, 88, 45, 6, 599, 588, 3, 2, 2, 2, 599, 591, 3, 2, 2, 2, 599, 596, 3, 2, 2, 2, 600, 603, 3, 2, 2, 2, 601, 599, 3, 2, 2, 2, 601, 602, 3, 2, 2, 2, 602, 89, 3, 2, 2, 2, 603, 601, 3, 2, 2, 2, 604, 605, 5, 92, 47, 2, 605, 606, 5, 164, 83, 2, 606, 607, 5, 92, 47, 2, 607, 613, 3, 2, 2, 2, 608, 609, 5, 92, 47, 2, 609, 610, 7, 61, 2, 2, 610, 611, 5, 196, 99, 2, 611, 613, 3, 2, 2, 2, 612, 604, 3, 2, 2, 2, 612, 608, 3, 2, 2, 2, 613, 91, 3, 2, 2, 2, 614, 615, 8, 47, 1, 2, 615, 616, 7, 119, 2, 2, 616, 617, 5, 92, 47, 2, 617, 618, 5, 166, 84, 2, 618, 619, 5, 92, 47, 2, 619, 620, 7, 120, 2, 2, 620, 623, 3, 2, 2, 2, 621, 623, 5, 94, 48, 2, 622, 614, 3, 2, 2, 2, 622, 621, 3, 2, 2, 2, 623, 630, 3, 2, 2, 2, 624, 625, 12, 5, 2, 2, 625, 626, 5, 166, 84, 2, 626, 627, 5, 92, 47, 6, 627, 629, 3, 2, 2, 2, 628, 624, 3, 2, 2, 2, 629, 632, 3, 2, 2, 2, 630, 628, 3, 2, 2, 2, 630, 631, 3, 2, 2, 2, 631, 93, 3, 2, 2, 2, 632, 630, 3, 2, 2, 2, 633, 639, 5, 122, 62, 2, 634, 639, 5, 124, 63, 2, 635, 639, 5, 118, 60, 2, 636, 639, 5, 172, 87, 2, 637, 639, 5, 96, 49, 2, 638, 633, 3, 2, 2, 2, 638, 634, 3, 2, 2, 2, 638, 635, 3, 2, 2, 2, 638, 636, 3, 2, 2, 2, 638, 637, 3, 2, 2, 2, 639, 95, 3, 2, 2, 2, 640, 641, 5, 156, 79, 2, 641, 643, 7, 119, 2, 2, 642, 644, 5, 132, 67, 2, 643, 642, 3, 2, 2, 2, 643, 644, 3, 2, 2, 2, 644, 645, 3, 2, 2, 2, 645, 646, 7, 120, 2, 2, 646, 97, 3, 2, 2, 2, 647, 648, 5, 126, 64, 2, 648, 99, 3, 2, 2, 2, 649, 652, 5, 102, 52, 2, 650, 652, 5, 104, 53, 2, 651, 649, 3, 2, 2, 2, 651, 650, 3, 2, 2, 2, 652, 101, 3, 2, 2, 2, 653, 654, 5, 168, 85, 2, 654, 655, 7, 119, 2, 2, 655, 656, 5, 144, 73, 2, 656, 657, 7, 104, 2, 2, 657, 662, 5, 146, 74, 2, 658, 659, 7, 104, 2, 2, 659, 661, 5, 136, 69, 2, 660, 658, 3, 2, 2, 2, 661, 664, 3, 2, 2, 2, 662, 660, 3, 2, 2, 2, 662, 663, 3, 2, 2, 2, 663, 665, 3, 2, 2, 2, 664, 662, 3, 2, 2, 2, 665, 666, 7, 120, 2, 2, 666, 103, 3, 2, 2, 2, 667, 668, 5, 170, 86, 2, 668, 669, 7, 119, 2, 2, 669, 670, 7, 121, 2, 2, 670, 675, 5, 140, 71, 2, 671, 672, 7, 104, 2, 2, 672, 674, 5, 140, 71, 2, 673, 671, 3, 2, 2, 2, 674, 677, 3, 2, 2, 2, 675, 673, 3, 2, 2, 2, 675, 676, 3, 2, 2, 2, 676, 678, 3, 2, 2, 2, 677, 675, 3, 2, 2, 2, 678, 679, 7, 122, 2, 2, 679, 680, 7, 104, 2, 2, 680, 685, 5, 146, 74, 2, 681, 682, 7, 104, 2, 2, 682, 684, 5, 136, 69, 2, 683, 681, 3, 2, 2, 2, 684, 687, 3, 2, 2, 2, 685, 683, 3, 2, 2, 2, 685, 686, 3, 2, 2, 2, 686, 688, 3, 2, 2, 2, 687, 685, 3, 2, 2, 2, 688, 689, 7, 120, 2, 2, 689, 105, 3, 2, 2, 2, 690, 693, 5, 198, 100, 2, 691, 693, 7, 305, 2, 2, 692, 690, 3, 2, 2, 2, 692, 691, 3, 2, 2, 2, 693, 107, 3, 2, 2, 2, 694, 695, 5, 198, 100, 2, 695, 696, 7, 119, 2, 2, 696, 697, 5, 132, 67, 2, 697, 698, 7, 120, 2, 2, 698, 109, 3, 2, 2, 2, 699, 704, 5, 118, 60, 2, 700, 701, 7, 104, 2, 2, 701, 703, 5, 118, 60, 2, 702, 700, 3, 2, 2, 2, 703, 706, 3, 2, 2, 2, 704, 702, 3, 2, 2, 2, 704, 705, 3, 2, 2, 2, 705, 111, 3, 2, 2, 2, 706, 704, 3, 2, 2, 2, 707, 712, 5, 120, 61, 2, 708, 709, 7, 104, 2, 2, 709, 711, 5, 120, 61, 2, 710, 708, 3, 2, 2, 2, 711, 714, 3, 2, 2, 2, 712, 710, 3, 2, 2, 2, 712, 713, 3, 2, 2, 2, 713, 113, 3, 2, 2, 2, 714, 712, 3, 2, 2, 2, 715, 717, 9, 2, 2, 2, 716, 715, 3, 2, 2, 2, 716, 717, 3, 2, 2, 2, 717, 718, 3, 2, 2, 2, 718, 719, 5, 116, 59, 2, 719, 115, 3, 2, 2, 2, 720, 742, 5, 118, 60, 2, 721, 722, 7, 36, 2, 2, 722, 723, 7, 119, 2, 2, 723, 724, 5, 118, 60, 2, 724, 725, 7, 120, 2, 2, 725, 742, 3, 2, 2, 2, 726, 727, 7, 37, 2, 2, 727, 728, 7, 119, 2, 2, 728, 729, 5, 118, 60, 2, 729, 730, 7, 120, 2, 2, 730, 742, 3, 2, 2, 2, 731, 732, 7, 38, 2, 2, 732, 733, 7, 119, 2, 2, 733, 734, 5, 118, 60, 2, 734, 735, 7, 120, 2, 2, 735, 742, 3, 2, 2, 2, 736, 737, 7, 39, 2, 2, 737, 738, 7, 119, 2, 2, 738, 739, 5, 118, 60, 2, 739, 740, 7, 120, 2, 2, 740, 742, 3, 2, 2, 2, 741, 720, 3, 2, 2, 2, 741, 721, 3, 2, 2, 2, 741, 726, 3, 2, 2, 2, 741, 731, 3, 2, 2, 2, 741, 736, 3, 2, 2, 2, 742, 117, 3, 2, 2, 2, 743, 744, 5, 198, 100, 2, 744, 119, 3, 2, 2, 2, 745, 746, 5, 200, 101, 2, 746, 121, 3, 2, 2, 2, 747, 748, 5, 130, 66, 2, 748, 749, 7, 119, 2, 2, 749, 750, 5, 132, 67, 2, 750, 751, 7, 120, 2, 2, 751, 123, 3, 2, 2, 2, 752, 753, 7, 248, 2, 2, 753, 754, 7, 119, 2, 2, 754, 755, 5, 86, 44, 2, 755, 756, 7, 28, 2, 2, 756, 757, 5, 128, 65, 2, 757, 758, 7, 120, 2, 2, 758, 125, 3, 2, 2, 2, 759, 760, 5, 158, 80, 2, 760, 761, 7, 119, 2, 2, 761, 762, 5, 132, 67, 2, 762, 763, 7, 120, 2, 2, 763, 127, 3, 2, 2, 2, 764, 775, 7, 203, 2, 2, 765, 775, 7, 223, 2, 2, 766, 775, 7, 225, 2, 2, 767, 775, 7, 96, 2, 2, 768, 775, 7, 97, 2, 2, 769, 775, 7, 98, 2, 2, 770, 775, 7, 99, 2, 2, 771, 775, 7, 100, 2, 2, 772, 775, 7, 101, 2, 2, 773, 775, 7, 102, 2, 2, 774, 764, 3, 2, 2, 2, 774, 765, 3, 2, 2, 2, 774, 766, 3, 2, 2, 2, 774, 767, 3, 2, 2, 2, 774, 768, 3, 2, 2, 2, 774, 769, 3, 2, 2, 2, 774, 770, 3, 2, 2, 2, 774, 771, 3, 2, 2, 2, 774, 772, 3, 2, 2, 2, 774, 773, 3, 2, 2, 2, 775, 129, 3, 2, 2, 2, 776, 782, 5, 150, 76, 2, 777, 782, 5, 154, 78, 2, 778, 782, 5, 162, 82, 2, 779, 782, 5, 158, 80, 2, 780, 782, 5, 160, 81, 2, 781, 776, 3, 2, 2, 2, 781, 777, 3, 2, 2, 2, 781, 778, 3, 2, 2, 2, 781, 779, 3, 2, 2, 2, 781, 780, 3, 2, 2, 2, 782, 131, 3, 2, 2, 2, 783, 788, 5, 134, 68, 2, 784, 785, 7, 104, 2, 2, 785, 787, 5, 134, 68, 2, 786, 784, 3, 2, 2, 2, 787, 790, 3, 2, 2, 2, 788, 786, 3, 2, 2, 2, 788, 789, 3, 2, 2, 2, 789, 792, 3, 2, 2, 2, 790, 788, 3, 2, 2, 2, 791, 783, 3, 2, 2, 2, 791, 792, 3, 2, 2, 2, 792, 133, 3, 2, 2, 2, 793, 794, 5, 202, 102, 2, 794, 795, 7, 106, 2, 2, 795, 797, 3, 2, 2, 2, 796, 793, 3, 2, 2, 2, 796, 797, 3, 2, 2, 2, 797, 798, 3, 2, 2, 2, 798, 799, 5, 92, 47, 2, 799, 135, 3, 2, 2, 2, 800, 801, 5, 138, 70, 2, 801, 802, 7, 106, 2, 2, 802, 803, 5, 148, 75, 2, 803, 137, 3, 2, 2, 2, 804, 805, 9, 6, 2, 2, 805, 139, 3, 2, 2, 2, 806, 815, 5, 144, 73, 2, 807, 808, 5, 144, 73, 2, 808, 809, 5, 142, 72, 2, 809, 815, 3, 2, 2, 2, 810, 811, 5, 144, 73, 2, 811, 812, 7, 128, 2, 2, 812, 813, 5, 142, 72, 2, 813, 815, 3, 2, 2, 2, 814, 806, 3, 2, 2, 2, 814, 807, 3, 2, 2, 2, 814, 810, 3, 2, 2, 2, 815, 141, 3, 2, 2, 2, 816, 819, 5, 178, 90, 2, 817, 819, 5, 180, 91, 2, 818, 816, 3, 2, 2, 2, 818, 817, 3, 2, 2, 2, 819, 143, 3, 2, 2, 2, 820, 823, 5, 198, 100, 2, 821, 823, 5, 176, 89, 2, 822, 820, 3, 2, 2, 2, 822, 821, 3, 2, 2, 2, 823, 145, 3, 2, 2, 2, 824, 825, 5, 148, 75, 2, 825, 147, 3, 2, 2, 2, 826, 829, 5, 198, 100, 2, 827, 829, 5, 172, 87, 2, 828, 826, 3, 2, 2, 2, 828, 827, 3, 2, 2, 2, 829, 149, 3, 2, 2, 2, 830, 853, 7, 166, 2, 2, 831, 853, 7, 167, 2, 2, 832, 853, 7, 168, 2, 2, 833, 853, 7, 169, 2, 2, 834, 853, 7, 170, 2, 2, 835, 853, 7, 171, 2, 2, 836, 853, 7, 172, 2, 2, 837, 853, 7, 173, 2, 2, 838, 853, 7, 174, 2, 2, 839, 853, 7, 175, 2, 2, 840, 853, 7, 176, 2, 2, 841, 853, 7, 177, 2, 2, 842, 853, 7, 178, 2, 2, 843, 853, 7, 179, 2, 2, 844, 853, 7, 180, 2, 2, 845, 853, 7, 181, 2, 2, 846, 853, 7, 182, 2, 2, 847, 853, 7, 183, 2, 2, 848, 853, 7, 184, 2, 2, 849, 853, 7, 185, 2, 2, 850, 853, 7, 186, 2, 2, 851, 853, 5, 152, 77, 2, 852, 830, 3, 2, 2, 2, 852, 831, 3, 2, 2, 2, 852, 832, 3, 2, 2, 2, 852, 833, 3, 2, 2, 2, 852, 834, 3, 2, 2, 2, 852, 835, 3, 2, 2, 2, 852, 836, 3, 2, 2, 2, 852, 837, 3, 2, 2, 2, 852, 838, 3, 2, 2, 2, 852, 839, 3, 2, 2, 2, 852, 840, 3, 2, 2, 2, 852, 841, 3, 2, 2, 2, 852, 842, 3, 2, 2, 2, 852, 843, 3, 2, 2, 2, 852, 844, 3, 2, 2, 2, 852, 845, 3, 2, 2, 2, 852, 846, 3, 2, 2, 2, 852, 847, 3, 2, 2, 2, 852, 848, 3, 2, 2, 2, 852, 849, 3, 2, 2, 2, 852, 850, 3, 2, 2, 2, 852, 851, 3, 2, 2, 2, 853, 151, 3, 2, 2, 2, 854, 855, 9, 7, 2, 2, 855, 153, 3, 2, 2, 2, 856, 857, 9, 8, 2, 2, 857, 155, 3, 2, 2, 2, 858, 859, 9, 9, 2, 2, 859, 157, 3, 2, 2, 2, 860, 861, 9, 10, 2, 2, 861, 159, 3, 2, 2, 2, 862, 863, 7, 255, 2, 2, 863, 161, 3, 2, 2, 2, 864, 865, 9, 11, 2, 2, 865, 163, 3, 2, 2, 2, 866, 867, 9, 12, 2, 2, 867, 165, 3, 2, 2, 2, 868, 869, 9, 13, 2, 2, 869, 167, 3, 2, 2, 2, 870, 871, 9, 14, 2, 2, 871, 169, 3, 2, 2, 2, 872, 873, 9, 15, 2, 2, 873, 171, 3, 2, 2, 2, 874, 881, 5, 174, 88, 2, 875, 881, 5, 176, 89, 2, 876, 881, 5, 178, 90, 2, 877, 881, 5, 180, 91, 2, 878, 881, 5, 182, 92, 2, 879, 881, 5, 184, 93, 2, 880, 874, 3, 2, 2, 2, 880, 875, 3, 2, 2, 2, 880, 876, 3, 2, 2, 2, 880, 877, 3, 2, 2, 2, 880, 878, 3, 2, 2, 2, 880, 879, 3, 2, 2, 2, 881, 173, 3, 2, 2, 2, 882, 883, 7, 70, 2, 2, 883, 884, 5, 92, 47, 2, 884, 885, 5, 192, 97, 2, 885, 175, 3, 2, 2, 2, 886, 887, 9, 16, 2, 2, 887, 177, 3, 2, 2, 2, 888, 890, 9, 2, 2, 2, 889, 888, 3, 2, 2, 2, 889, 890, 3, 2, 2, 2, 890, 891, 3, 2, 2, 2, 891, 892, 7, 303, 2, 2, 892, 179, 3, 2, 2, 2, 893, 895, 9, 2, 2, 2, 894, 893, 3, 2, 2, 2, 894, 895, 3, 2, 2, 2, 895, 896, 3, 2, 2, 2, 896, 897, 7, 304, 2, 2, 897, 181, 3, 2, 2, 2, 898, 899, 9, 17, 2, 2, 899, 183, 3, 2, 2, 2, 900, 904, 5, 186, 94, 2, 901, 904, 5, 188, 95, 2, 902, 904, 5, 190, 96, 2, 903, 900, 3, 2, 2, 2, 903, 901, 3, 2, 2, 2, 903, 902, 3, 2, 2, 2, 904, 185, 3, 2, 2, 2, 905, 906, 7, 203, 2, 2, 906, 907, 5, 176, 89, 2, 907, 187, 3, 2, 2, 2, 908, 909, 7, 223, 2, 2, 909, 910, 5, 176, 89, 2, 910, 189, 3, 2, 2, 2, 911, 912, 7, 225, 2, 2, 912, 913, 5, 176, 89, 2, 913, 191, 3, 2, 2, 2, 914, 915, 9, 18, 2, 2, 915, 193, 3, 2, 2, 2, 916, 917, 9, 19, 2, 2, 917, 195, 3, 2, 2, 2, 918, 919, 7, 119, 2, 2, 919, 924, 5, 172, 87, 2, 920, 921, 7, 104, 2, 2, 921, 923, 5, 172, 87, 2, 922, 920, 3, 2, 2, 2, 923, 926, 3, 2, 2, 2, 924, 922, 3, 2, 2, 2, 924, 925, 3, 2, 2, 2, 925, 927, 3, 2, 2, 2, 926, 924, 3, 2, 2, 2, 927, 928, 7, 120, 2, 2, 928, 197, 3, 2, 2, 2, 929, 934, 5, 202, 102, 2, 930, 931, 7, 105, 2, 2, 931, 933, 5, 202, 102, 2, 932, 930, 3, 2, 2, 2, 933, 936, 3, 2, 2, 2, 934, 932, 3, 2, 2, 2, 934, 935, 3, 2, 2, 2, 935, 199, 3, 2, 2, 2, 936, 934, 3, 2, 2, 2, 937, 942, 5, 204, 103, 2, 938, 939, 7, 105, 2, 2, 939, 941, 5, 204, 103, 2, 940, 938, 3, 2, 2, 2, 941, 944, 3, 2, 2, 2, 942, 940, 3, 2, 2, 2, 942, 943, 3, 2, 2, 2, 943, 201, 3, 2, 2, 2, 944, 942, 3, 2, 2, 2, 945, 947, 7, 105, 2, 2, 946, 945, 3, 2, 2, 2, 946, 947, 3, 2, 2, 2, 947, 948, 3, 2, 2, 2, 948, 956, 7, 302, 2, 2, 949, 950, 7, 125, 2, 2, 950, 951, 5, 202, 102, 2, 951, 952, 7, 125, 2, 2, 952, 956, 3, 2, 2, 2, 953, 956, 7, 308, 2, 2, 954, 956, 5, 206, 104, 2, 955, 946, 3, 2, 2, 2, 955, 949, 3, 2, 2, 2, 955, 953, 3, 2, 2, 2, 955, 954, 3, 2, 2, 2, 956, 203, 3, 2, 2, 2, 957, 962, 5, 202, 102, 2, 958, 959, 7, 116, 2, 2, 959, 961, 5, 202, 102, 2, 960, 958, 3, 2, 2, 2, 961, 964, 3, 2, 2, 2, 962, 960, 3, 2, 2, 2, 962, 963, 3, 2, 2, 2, 963, 966, 3, 2, 2, 2, 964, 962, 3, 2, 2, 2, 965, 967, 7, 116, 2, 2, 966, 965, 3, 2, 2, 2, 966, 967, 3, 2, 2, 2, 967, 981, 3, 2, 2, 2, 968, 969, 7, 123, 2, 2, 969, 970, 5, 204, 103, 2, 970, 971, 7, 123, 2, 2, 971, 981, 3, 2, 2, 2, 972, 973, 7, 124, 2, 2, 973, 974, 5, 204, 103, 2, 974, 975, 7, 124, 2, 2, 975, 981, 3, 2, 2, 2, 976, 977, 7, 125, 2, 2, 977, 978, 5, 204, 103, 2, 978, 979, 7, 125, 2, 2, 979, 981, 3, 2, 2, 2, 980, 957, 3, 2, 2, 2, 980, 968, 3, 2, 2, 2, 980, 972, 3, 2, 2, 2, 980, 976, 3, 2, 2, 2, 981, 205, 3, 2, 2, 2, 982, 996, 7, 32, 2, 2, 983, 996, 5, 80, 41, 2, 984, 996, 7, 225, 2, 2, 985, 996, 7, 203, 2, 2, 986, 996, 7, 223, 2, 2, 987, 996, 7, 150, 2, 2, 988, 996, 7, 151, 2, 2, 989, 996, 5, 194, 98, 2, 990, 996, 7, 294, 2, 2, 991, 996, 5, 156, 79, 2, 992, 996, 5, 154, 78, 2, 993, 996, 5, 162, 82, 2, 994, 996, 5, 150, 76, 2, 995, 982, 3, 2, 2, 2, 995, 983, 3, 2, 2, 2, 995, 984, 3, 2, 2, 2, 995, 985, 3, 2, 2, 2, 995, 986, 3, 2, 2, 2, 995, 987, 3, 2, 2, 2, 995, 988, 3, 2, 2, 2, 995, 989, 3, 2, 2, 2, 995, 990, 3, 2, 2, 2, 995, 991, 3, 2, 2, 2, 995, 992, 3, 2, 2, 2, 995, 993, 3, 2, 2, 2, 995, 994, 3, 2, 2, 2, 996, 207, 3, 2, 2, 2, 85, 209, 218, 224, 242, 245, 249, 255, 260, 273, 283, 290, 295, 300, 307, 311, 316, 320, 326, 331, 342, 347, 351, 355, 359, 364, 378, 389, 397, 409, 415, 454, 460, 479, 486, 505, 510, 518, 527, 537, 554, 563, 578, 586, 593, 599, 601, 612, 622, 630, 638, 643, 651, 662, 675, 685, 692, 704, 712, 716, 741, 774, 781, 788, 791, 796, 814, 818, 822, 828, 852, 880, 889, 894, 903, 924, 934, 942, 946, 955, 962, 966, 980, 995] \ No newline at end of file diff --git a/dashboards-observability/common/query_manager/antlr/output/OpenSearchPPLParser.tokens b/dashboards-observability/common/query_manager/antlr/output/OpenSearchPPLParser.tokens new file mode 100644 index 000000000..303e66c7a --- /dev/null +++ b/dashboards-observability/common/query_manager/antlr/output/OpenSearchPPLParser.tokens @@ -0,0 +1,603 @@ +SEARCH=1 +DESCRIBE=2 +SHOW=3 +FROM=4 +WHERE=5 +FIELDS=6 +RENAME=7 +STATS=8 +DEDUP=9 +SORT=10 +EVAL=11 +HEAD=12 +TOP=13 +RARE=14 +PARSE=15 +METHOD=16 +REGEX=17 +PUNCT=18 +GROK=19 +PATTERN=20 +PATTERNS=21 +NEW_FIELD=22 +KMEANS=23 +AD=24 +ML=25 +AS=26 +BY=27 +SOURCE=28 +INDEX=29 +D=30 +DESC=31 +CATALOGS=32 +SORTBY=33 +AUTO=34 +STR=35 +IP=36 +NUM=37 +KEEPEMPTY=38 +CONSECUTIVE=39 +DEDUP_SPLITVALUES=40 +PARTITIONS=41 +ALLNUM=42 +DELIM=43 +CENTROIDS=44 +ITERATIONS=45 +DISTANCE_TYPE=46 +NUMBER_OF_TREES=47 +SHINGLE_SIZE=48 +SAMPLE_SIZE=49 +OUTPUT_AFTER=50 +TIME_DECAY=51 +ANOMALY_RATE=52 +CATEGORY_FIELD=53 +TIME_FIELD=54 +TIME_ZONE=55 +TRAINING_DATA_SIZE=56 +ANOMALY_SCORE_THRESHOLD=57 +CASE=58 +IN=59 +NOT=60 +OR=61 +AND=62 +XOR=63 +TRUE=64 +FALSE=65 +REGEXP=66 +DATETIME=67 +INTERVAL=68 +MICROSECOND=69 +MILLISECOND=70 +SECOND=71 +MINUTE=72 +HOUR=73 +DAY=74 +WEEK=75 +MONTH=76 +QUARTER=77 +YEAR=78 +SECOND_MICROSECOND=79 +MINUTE_MICROSECOND=80 +MINUTE_SECOND=81 +HOUR_MICROSECOND=82 +HOUR_SECOND=83 +HOUR_MINUTE=84 +DAY_MICROSECOND=85 +DAY_SECOND=86 +DAY_MINUTE=87 +DAY_HOUR=88 +YEAR_MONTH=89 +CONVERT_TZ=90 +DATAMODEL=91 +LOOKUP=92 +SAVEDSEARCH=93 +INT=94 +INTEGER=95 +DOUBLE=96 +LONG=97 +FLOAT=98 +STRING=99 +BOOLEAN=100 +PIPE=101 +COMMA=102 +DOT=103 +EQUAL=104 +GREATER=105 +LESS=106 +NOT_GREATER=107 +NOT_LESS=108 +NOT_EQUAL=109 +PLUS=110 +MINUS=111 +STAR=112 +DIVIDE=113 +MODULE=114 +EXCLAMATION_SYMBOL=115 +COLON=116 +LT_PRTHS=117 +RT_PRTHS=118 +LT_SQR_PRTHS=119 +RT_SQR_PRTHS=120 +SINGLE_QUOTE=121 +DOUBLE_QUOTE=122 +BACKTICK=123 +BIT_NOT_OP=124 +BIT_AND_OP=125 +BIT_XOR_OP=126 +AVG=127 +COUNT=128 +DISTINCT_COUNT=129 +ESTDC=130 +ESTDC_ERROR=131 +MAX=132 +MEAN=133 +MEDIAN=134 +MIN=135 +MODE=136 +RANGE=137 +STDEV=138 +STDEVP=139 +SUM=140 +SUMSQ=141 +VAR_SAMP=142 +VAR_POP=143 +STDDEV_SAMP=144 +STDDEV_POP=145 +PERCENTILE=146 +TAKE=147 +FIRST=148 +LAST=149 +LIST=150 +VALUES=151 +EARLIEST=152 +EARLIEST_TIME=153 +LATEST=154 +LATEST_TIME=155 +PER_DAY=156 +PER_HOUR=157 +PER_MINUTE=158 +PER_SECOND=159 +RATE=160 +SPARKLINE=161 +C=162 +DC=163 +ABS=164 +CEIL=165 +CEILING=166 +CONV=167 +CRC32=168 +E=169 +EXP=170 +FLOOR=171 +LN=172 +LOG=173 +LOG10=174 +LOG2=175 +MOD=176 +PI=177 +POW=178 +POWER=179 +RAND=180 +ROUND=181 +SIGN=182 +SQRT=183 +TRUNCATE=184 +ACOS=185 +ASIN=186 +ATAN=187 +ATAN2=188 +COS=189 +COT=190 +DEGREES=191 +RADIANS=192 +SIN=193 +TAN=194 +ADDDATE=195 +CURDATE=196 +CURRENT_DATE=197 +CURRENT_TIME=198 +CURRENT_TIMESTAMP=199 +CURTIME=200 +DATE=201 +DATE_ADD=202 +DATE_FORMAT=203 +DATE_SUB=204 +DAYNAME=205 +DAYOFMONTH=206 +DAYOFWEEK=207 +DAYOFYEAR=208 +FROM_DAYS=209 +LOCALTIME=210 +LOCALTIMESTAMP=211 +FROM_UNIXTIME=212 +MAKEDATE=213 +MAKETIME=214 +MONTHNAME=215 +NOW=216 +PERIOD_ADD=217 +PERIOD_DIFF=218 +SUBDATE=219 +SYSDATE=220 +TIME=221 +TIME_TO_SEC=222 +TIMESTAMP=223 +TO_DAYS=224 +UTC_DATE=225 +UTC_TIME=226 +UTC_TIMESTAMP=227 +UNIX_TIMESTAMP=228 +SUBSTR=229 +SUBSTRING=230 +LTRIM=231 +RTRIM=232 +TRIM=233 +TO=234 +LOWER=235 +UPPER=236 +CONCAT=237 +CONCAT_WS=238 +LENGTH=239 +STRCMP=240 +RIGHT=241 +LEFT=242 +ASCII=243 +LOCATE=244 +REPLACE=245 +CAST=246 +LIKE=247 +ISNULL=248 +ISNOTNULL=249 +IFNULL=250 +NULLIF=251 +IF=252 +TYPEOF=253 +MATCH=254 +MATCH_PHRASE=255 +MATCH_PHRASE_PREFIX=256 +MATCH_BOOL_PREFIX=257 +SIMPLE_QUERY_STRING=258 +MULTI_MATCH=259 +QUERY_STRING=260 +ALLOW_LEADING_WILDCARD=261 +ANALYZE_WILDCARD=262 +ANALYZER=263 +AUTO_GENERATE_SYNONYMS_PHRASE_QUERY=264 +BOOST=265 +CUTOFF_FREQUENCY=266 +DEFAULT_FIELD=267 +DEFAULT_OPERATOR=268 +ENABLE_POSITION_INCREMENTS=269 +ESCAPE=270 +FLAGS=271 +FUZZY_MAX_EXPANSIONS=272 +FUZZY_PREFIX_LENGTH=273 +FUZZY_TRANSPOSITIONS=274 +FUZZY_REWRITE=275 +FUZZINESS=276 +LENIENT=277 +LOW_FREQ_OPERATOR=278 +MAX_DETERMINIZED_STATES=279 +MAX_EXPANSIONS=280 +MINIMUM_SHOULD_MATCH=281 +OPERATOR=282 +PHRASE_SLOP=283 +PREFIX_LENGTH=284 +QUOTE_ANALYZER=285 +QUOTE_FIELD_SUFFIX=286 +REWRITE=287 +SLOP=288 +TIE_BREAKER=289 +TYPE=290 +ZERO_TERMS_QUERY=291 +SPAN=292 +MS=293 +S=294 +M=295 +H=296 +W=297 +Q=298 +Y=299 +ID=300 +INTEGER_LITERAL=301 +DECIMAL_LITERAL=302 +ID_DATE_SUFFIX=303 +DQUOTA_STRING=304 +SQUOTA_STRING=305 +BQUOTA_STRING=306 +ERROR_RECOGNITION=307 +'SEARCH'=1 +'DESCRIBE'=2 +'SHOW'=3 +'FROM'=4 +'WHERE'=5 +'FIELDS'=6 +'RENAME'=7 +'STATS'=8 +'DEDUP'=9 +'SORT'=10 +'EVAL'=11 +'HEAD'=12 +'TOP'=13 +'RARE'=14 +'PARSE'=15 +'METHOD'=16 +'REGEX'=17 +'PUNCT'=18 +'GROK'=19 +'PATTERN'=20 +'PATTERNS'=21 +'NEW_FIELD'=22 +'KMEANS'=23 +'AD'=24 +'ML'=25 +'AS'=26 +'BY'=27 +'SOURCE'=28 +'INDEX'=29 +'D'=30 +'DESC'=31 +'CATALOGS'=32 +'SORTBY'=33 +'AUTO'=34 +'STR'=35 +'IP'=36 +'NUM'=37 +'KEEPEMPTY'=38 +'CONSECUTIVE'=39 +'DEDUP_SPLITVALUES'=40 +'PARTITIONS'=41 +'ALLNUM'=42 +'DELIM'=43 +'CENTROIDS'=44 +'ITERATIONS'=45 +'DISTANCE_TYPE'=46 +'NUMBER_OF_TREES'=47 +'SHINGLE_SIZE'=48 +'SAMPLE_SIZE'=49 +'OUTPUT_AFTER'=50 +'TIME_DECAY'=51 +'ANOMALY_RATE'=52 +'CATEGORY_FIELD'=53 +'TIME_FIELD'=54 +'TIME_ZONE'=55 +'TRAINING_DATA_SIZE'=56 +'ANOMALY_SCORE_THRESHOLD'=57 +'CASE'=58 +'IN'=59 +'NOT'=60 +'OR'=61 +'AND'=62 +'XOR'=63 +'TRUE'=64 +'FALSE'=65 +'REGEXP'=66 +'DATETIME'=67 +'INTERVAL'=68 +'MICROSECOND'=69 +'MILLISECOND'=70 +'SECOND'=71 +'MINUTE'=72 +'HOUR'=73 +'DAY'=74 +'WEEK'=75 +'MONTH'=76 +'QUARTER'=77 +'YEAR'=78 +'SECOND_MICROSECOND'=79 +'MINUTE_MICROSECOND'=80 +'MINUTE_SECOND'=81 +'HOUR_MICROSECOND'=82 +'HOUR_SECOND'=83 +'HOUR_MINUTE'=84 +'DAY_MICROSECOND'=85 +'DAY_SECOND'=86 +'DAY_MINUTE'=87 +'DAY_HOUR'=88 +'YEAR_MONTH'=89 +'CONVERT_TZ'=90 +'DATAMODEL'=91 +'LOOKUP'=92 +'SAVEDSEARCH'=93 +'INT'=94 +'INTEGER'=95 +'DOUBLE'=96 +'LONG'=97 +'FLOAT'=98 +'STRING'=99 +'BOOLEAN'=100 +'|'=101 +','=102 +'.'=103 +'='=104 +'>'=105 +'<'=106 +'+'=110 +'-'=111 +'*'=112 +'/'=113 +'%'=114 +'!'=115 +':'=116 +'('=117 +')'=118 +'['=119 +']'=120 +'\''=121 +'"'=122 +'`'=123 +'~'=124 +'&'=125 +'^'=126 +'AVG'=127 +'COUNT'=128 +'DISTINCT_COUNT'=129 +'ESTDC'=130 +'ESTDC_ERROR'=131 +'MAX'=132 +'MEAN'=133 +'MEDIAN'=134 +'MIN'=135 +'MODE'=136 +'RANGE'=137 +'STDEV'=138 +'STDEVP'=139 +'SUM'=140 +'SUMSQ'=141 +'VAR_SAMP'=142 +'VAR_POP'=143 +'STDDEV_SAMP'=144 +'STDDEV_POP'=145 +'PERCENTILE'=146 +'TAKE'=147 +'FIRST'=148 +'LAST'=149 +'LIST'=150 +'VALUES'=151 +'EARLIEST'=152 +'EARLIEST_TIME'=153 +'LATEST'=154 +'LATEST_TIME'=155 +'PER_DAY'=156 +'PER_HOUR'=157 +'PER_MINUTE'=158 +'PER_SECOND'=159 +'RATE'=160 +'SPARKLINE'=161 +'C'=162 +'DC'=163 +'ABS'=164 +'CEIL'=165 +'CEILING'=166 +'CONV'=167 +'CRC32'=168 +'E'=169 +'EXP'=170 +'FLOOR'=171 +'LN'=172 +'LOG'=173 +'LOG10'=174 +'LOG2'=175 +'MOD'=176 +'PI'=177 +'POW'=178 +'POWER'=179 +'RAND'=180 +'ROUND'=181 +'SIGN'=182 +'SQRT'=183 +'TRUNCATE'=184 +'ACOS'=185 +'ASIN'=186 +'ATAN'=187 +'ATAN2'=188 +'COS'=189 +'COT'=190 +'DEGREES'=191 +'RADIANS'=192 +'SIN'=193 +'TAN'=194 +'ADDDATE'=195 +'CURDATE'=196 +'CURRENT_DATE'=197 +'CURRENT_TIME'=198 +'CURRENT_TIMESTAMP'=199 +'CURTIME'=200 +'DATE'=201 +'DATE_ADD'=202 +'DATE_FORMAT'=203 +'DATE_SUB'=204 +'DAYNAME'=205 +'DAYOFMONTH'=206 +'DAYOFWEEK'=207 +'DAYOFYEAR'=208 +'FROM_DAYS'=209 +'LOCALTIME'=210 +'LOCALTIMESTAMP'=211 +'FROM_UNIXTIME'=212 +'MAKEDATE'=213 +'MAKETIME'=214 +'MONTHNAME'=215 +'NOW'=216 +'PERIOD_ADD'=217 +'PERIOD_DIFF'=218 +'SUBDATE'=219 +'SYSDATE'=220 +'TIME'=221 +'TIME_TO_SEC'=222 +'TIMESTAMP'=223 +'TO_DAYS'=224 +'UTC_DATE'=225 +'UTC_TIME'=226 +'UTC_TIMESTAMP'=227 +'UNIX_TIMESTAMP'=228 +'SUBSTR'=229 +'SUBSTRING'=230 +'LTRIM'=231 +'RTRIM'=232 +'TRIM'=233 +'TO'=234 +'LOWER'=235 +'UPPER'=236 +'CONCAT'=237 +'CONCAT_WS'=238 +'LENGTH'=239 +'STRCMP'=240 +'RIGHT'=241 +'LEFT'=242 +'ASCII'=243 +'LOCATE'=244 +'REPLACE'=245 +'CAST'=246 +'LIKE'=247 +'ISNULL'=248 +'ISNOTNULL'=249 +'IFNULL'=250 +'NULLIF'=251 +'IF'=252 +'TYPEOF'=253 +'MATCH'=254 +'MATCH_PHRASE'=255 +'MATCH_PHRASE_PREFIX'=256 +'MATCH_BOOL_PREFIX'=257 +'SIMPLE_QUERY_STRING'=258 +'MULTI_MATCH'=259 +'QUERY_STRING'=260 +'ALLOW_LEADING_WILDCARD'=261 +'ANALYZE_WILDCARD'=262 +'ANALYZER'=263 +'AUTO_GENERATE_SYNONYMS_PHRASE_QUERY'=264 +'BOOST'=265 +'CUTOFF_FREQUENCY'=266 +'DEFAULT_FIELD'=267 +'DEFAULT_OPERATOR'=268 +'ENABLE_POSITION_INCREMENTS'=269 +'ESCAPE'=270 +'FLAGS'=271 +'FUZZY_MAX_EXPANSIONS'=272 +'FUZZY_PREFIX_LENGTH'=273 +'FUZZY_TRANSPOSITIONS'=274 +'FUZZY_REWRITE'=275 +'FUZZINESS'=276 +'LENIENT'=277 +'LOW_FREQ_OPERATOR'=278 +'MAX_DETERMINIZED_STATES'=279 +'MAX_EXPANSIONS'=280 +'MINIMUM_SHOULD_MATCH'=281 +'OPERATOR'=282 +'PHRASE_SLOP'=283 +'PREFIX_LENGTH'=284 +'QUOTE_ANALYZER'=285 +'QUOTE_FIELD_SUFFIX'=286 +'REWRITE'=287 +'SLOP'=288 +'TIE_BREAKER'=289 +'TYPE'=290 +'ZERO_TERMS_QUERY'=291 +'SPAN'=292 +'MS'=293 +'S'=294 +'M'=295 +'H'=296 +'W'=297 +'Q'=298 +'Y'=299 diff --git a/dashboards-observability/common/query_manager/antlr/output/OpenSearchPPLParser.ts b/dashboards-observability/common/query_manager/antlr/output/OpenSearchPPLParser.ts new file mode 100644 index 000000000..88d1a7e63 --- /dev/null +++ b/dashboards-observability/common/query_manager/antlr/output/OpenSearchPPLParser.ts @@ -0,0 +1,11912 @@ +// Generated from ./common/query_manager/antlr/grammar/OpenSearchPPLParser.g4 by ANTLR 4.9.0-SNAPSHOT + + +import { ATN } from "antlr4ts/atn/ATN"; +import { ATNDeserializer } from "antlr4ts/atn/ATNDeserializer"; +import { FailedPredicateException } from "antlr4ts/FailedPredicateException"; +import { NotNull } from "antlr4ts/Decorators"; +import { NoViableAltException } from "antlr4ts/NoViableAltException"; +import { Override } from "antlr4ts/Decorators"; +import { Parser } from "antlr4ts/Parser"; +import { ParserRuleContext } from "antlr4ts/ParserRuleContext"; +import { ParserATNSimulator } from "antlr4ts/atn/ParserATNSimulator"; +import { ParseTreeListener } from "antlr4ts/tree/ParseTreeListener"; +import { ParseTreeVisitor } from "antlr4ts/tree/ParseTreeVisitor"; +import { RecognitionException } from "antlr4ts/RecognitionException"; +import { RuleContext } from "antlr4ts/RuleContext"; +//import { RuleVersion } from "antlr4ts/RuleVersion"; +import { TerminalNode } from "antlr4ts/tree/TerminalNode"; +import { Token } from "antlr4ts/Token"; +import { TokenStream } from "antlr4ts/TokenStream"; +import { Vocabulary } from "antlr4ts/Vocabulary"; +import { VocabularyImpl } from "antlr4ts/VocabularyImpl"; + +import * as Utils from "antlr4ts/misc/Utils"; + +import { OpenSearchPPLParserListener } from "./OpenSearchPPLParserListener"; +import { OpenSearchPPLParserVisitor } from "./OpenSearchPPLParserVisitor"; + + +export class OpenSearchPPLParser extends Parser { + public static readonly SEARCH = 1; + public static readonly DESCRIBE = 2; + public static readonly SHOW = 3; + public static readonly FROM = 4; + public static readonly WHERE = 5; + public static readonly FIELDS = 6; + public static readonly RENAME = 7; + public static readonly STATS = 8; + public static readonly DEDUP = 9; + public static readonly SORT = 10; + public static readonly EVAL = 11; + public static readonly HEAD = 12; + public static readonly TOP = 13; + public static readonly RARE = 14; + public static readonly PARSE = 15; + public static readonly METHOD = 16; + public static readonly REGEX = 17; + public static readonly PUNCT = 18; + public static readonly GROK = 19; + public static readonly PATTERN = 20; + public static readonly PATTERNS = 21; + public static readonly NEW_FIELD = 22; + public static readonly KMEANS = 23; + public static readonly AD = 24; + public static readonly ML = 25; + public static readonly AS = 26; + public static readonly BY = 27; + public static readonly SOURCE = 28; + public static readonly INDEX = 29; + public static readonly D = 30; + public static readonly DESC = 31; + public static readonly CATALOGS = 32; + public static readonly SORTBY = 33; + public static readonly AUTO = 34; + public static readonly STR = 35; + public static readonly IP = 36; + public static readonly NUM = 37; + public static readonly KEEPEMPTY = 38; + public static readonly CONSECUTIVE = 39; + public static readonly DEDUP_SPLITVALUES = 40; + public static readonly PARTITIONS = 41; + public static readonly ALLNUM = 42; + public static readonly DELIM = 43; + public static readonly CENTROIDS = 44; + public static readonly ITERATIONS = 45; + public static readonly DISTANCE_TYPE = 46; + public static readonly NUMBER_OF_TREES = 47; + public static readonly SHINGLE_SIZE = 48; + public static readonly SAMPLE_SIZE = 49; + public static readonly OUTPUT_AFTER = 50; + public static readonly TIME_DECAY = 51; + public static readonly ANOMALY_RATE = 52; + public static readonly CATEGORY_FIELD = 53; + public static readonly TIME_FIELD = 54; + public static readonly TIME_ZONE = 55; + public static readonly TRAINING_DATA_SIZE = 56; + public static readonly ANOMALY_SCORE_THRESHOLD = 57; + public static readonly CASE = 58; + public static readonly IN = 59; + public static readonly NOT = 60; + public static readonly OR = 61; + public static readonly AND = 62; + public static readonly XOR = 63; + public static readonly TRUE = 64; + public static readonly FALSE = 65; + public static readonly REGEXP = 66; + public static readonly DATETIME = 67; + public static readonly INTERVAL = 68; + public static readonly MICROSECOND = 69; + public static readonly MILLISECOND = 70; + public static readonly SECOND = 71; + public static readonly MINUTE = 72; + public static readonly HOUR = 73; + public static readonly DAY = 74; + public static readonly WEEK = 75; + public static readonly MONTH = 76; + public static readonly QUARTER = 77; + public static readonly YEAR = 78; + public static readonly SECOND_MICROSECOND = 79; + public static readonly MINUTE_MICROSECOND = 80; + public static readonly MINUTE_SECOND = 81; + public static readonly HOUR_MICROSECOND = 82; + public static readonly HOUR_SECOND = 83; + public static readonly HOUR_MINUTE = 84; + public static readonly DAY_MICROSECOND = 85; + public static readonly DAY_SECOND = 86; + public static readonly DAY_MINUTE = 87; + public static readonly DAY_HOUR = 88; + public static readonly YEAR_MONTH = 89; + public static readonly CONVERT_TZ = 90; + public static readonly DATAMODEL = 91; + public static readonly LOOKUP = 92; + public static readonly SAVEDSEARCH = 93; + public static readonly INT = 94; + public static readonly INTEGER = 95; + public static readonly DOUBLE = 96; + public static readonly LONG = 97; + public static readonly FLOAT = 98; + public static readonly STRING = 99; + public static readonly BOOLEAN = 100; + public static readonly PIPE = 101; + public static readonly COMMA = 102; + public static readonly DOT = 103; + public static readonly EQUAL = 104; + public static readonly GREATER = 105; + public static readonly LESS = 106; + public static readonly NOT_GREATER = 107; + public static readonly NOT_LESS = 108; + public static readonly NOT_EQUAL = 109; + public static readonly PLUS = 110; + public static readonly MINUS = 111; + public static readonly STAR = 112; + public static readonly DIVIDE = 113; + public static readonly MODULE = 114; + public static readonly EXCLAMATION_SYMBOL = 115; + public static readonly COLON = 116; + public static readonly LT_PRTHS = 117; + public static readonly RT_PRTHS = 118; + public static readonly LT_SQR_PRTHS = 119; + public static readonly RT_SQR_PRTHS = 120; + public static readonly SINGLE_QUOTE = 121; + public static readonly DOUBLE_QUOTE = 122; + public static readonly BACKTICK = 123; + public static readonly BIT_NOT_OP = 124; + public static readonly BIT_AND_OP = 125; + public static readonly BIT_XOR_OP = 126; + public static readonly AVG = 127; + public static readonly COUNT = 128; + public static readonly DISTINCT_COUNT = 129; + public static readonly ESTDC = 130; + public static readonly ESTDC_ERROR = 131; + public static readonly MAX = 132; + public static readonly MEAN = 133; + public static readonly MEDIAN = 134; + public static readonly MIN = 135; + public static readonly MODE = 136; + public static readonly RANGE = 137; + public static readonly STDEV = 138; + public static readonly STDEVP = 139; + public static readonly SUM = 140; + public static readonly SUMSQ = 141; + public static readonly VAR_SAMP = 142; + public static readonly VAR_POP = 143; + public static readonly STDDEV_SAMP = 144; + public static readonly STDDEV_POP = 145; + public static readonly PERCENTILE = 146; + public static readonly TAKE = 147; + public static readonly FIRST = 148; + public static readonly LAST = 149; + public static readonly LIST = 150; + public static readonly VALUES = 151; + public static readonly EARLIEST = 152; + public static readonly EARLIEST_TIME = 153; + public static readonly LATEST = 154; + public static readonly LATEST_TIME = 155; + public static readonly PER_DAY = 156; + public static readonly PER_HOUR = 157; + public static readonly PER_MINUTE = 158; + public static readonly PER_SECOND = 159; + public static readonly RATE = 160; + public static readonly SPARKLINE = 161; + public static readonly C = 162; + public static readonly DC = 163; + public static readonly ABS = 164; + public static readonly CEIL = 165; + public static readonly CEILING = 166; + public static readonly CONV = 167; + public static readonly CRC32 = 168; + public static readonly E = 169; + public static readonly EXP = 170; + public static readonly FLOOR = 171; + public static readonly LN = 172; + public static readonly LOG = 173; + public static readonly LOG10 = 174; + public static readonly LOG2 = 175; + public static readonly MOD = 176; + public static readonly PI = 177; + public static readonly POW = 178; + public static readonly POWER = 179; + public static readonly RAND = 180; + public static readonly ROUND = 181; + public static readonly SIGN = 182; + public static readonly SQRT = 183; + public static readonly TRUNCATE = 184; + public static readonly ACOS = 185; + public static readonly ASIN = 186; + public static readonly ATAN = 187; + public static readonly ATAN2 = 188; + public static readonly COS = 189; + public static readonly COT = 190; + public static readonly DEGREES = 191; + public static readonly RADIANS = 192; + public static readonly SIN = 193; + public static readonly TAN = 194; + public static readonly ADDDATE = 195; + public static readonly CURDATE = 196; + public static readonly CURRENT_DATE = 197; + public static readonly CURRENT_TIME = 198; + public static readonly CURRENT_TIMESTAMP = 199; + public static readonly CURTIME = 200; + public static readonly DATE = 201; + public static readonly DATE_ADD = 202; + public static readonly DATE_FORMAT = 203; + public static readonly DATE_SUB = 204; + public static readonly DAYNAME = 205; + public static readonly DAYOFMONTH = 206; + public static readonly DAYOFWEEK = 207; + public static readonly DAYOFYEAR = 208; + public static readonly FROM_DAYS = 209; + public static readonly LOCALTIME = 210; + public static readonly LOCALTIMESTAMP = 211; + public static readonly FROM_UNIXTIME = 212; + public static readonly MAKEDATE = 213; + public static readonly MAKETIME = 214; + public static readonly MONTHNAME = 215; + public static readonly NOW = 216; + public static readonly PERIOD_ADD = 217; + public static readonly PERIOD_DIFF = 218; + public static readonly SUBDATE = 219; + public static readonly SYSDATE = 220; + public static readonly TIME = 221; + public static readonly TIME_TO_SEC = 222; + public static readonly TIMESTAMP = 223; + public static readonly TO_DAYS = 224; + public static readonly UTC_DATE = 225; + public static readonly UTC_TIME = 226; + public static readonly UTC_TIMESTAMP = 227; + public static readonly UNIX_TIMESTAMP = 228; + public static readonly SUBSTR = 229; + public static readonly SUBSTRING = 230; + public static readonly LTRIM = 231; + public static readonly RTRIM = 232; + public static readonly TRIM = 233; + public static readonly TO = 234; + public static readonly LOWER = 235; + public static readonly UPPER = 236; + public static readonly CONCAT = 237; + public static readonly CONCAT_WS = 238; + public static readonly LENGTH = 239; + public static readonly STRCMP = 240; + public static readonly RIGHT = 241; + public static readonly LEFT = 242; + public static readonly ASCII = 243; + public static readonly LOCATE = 244; + public static readonly REPLACE = 245; + public static readonly CAST = 246; + public static readonly LIKE = 247; + public static readonly ISNULL = 248; + public static readonly ISNOTNULL = 249; + public static readonly IFNULL = 250; + public static readonly NULLIF = 251; + public static readonly IF = 252; + public static readonly TYPEOF = 253; + public static readonly MATCH = 254; + public static readonly MATCH_PHRASE = 255; + public static readonly MATCH_PHRASE_PREFIX = 256; + public static readonly MATCH_BOOL_PREFIX = 257; + public static readonly SIMPLE_QUERY_STRING = 258; + public static readonly MULTI_MATCH = 259; + public static readonly QUERY_STRING = 260; + public static readonly ALLOW_LEADING_WILDCARD = 261; + public static readonly ANALYZE_WILDCARD = 262; + public static readonly ANALYZER = 263; + public static readonly AUTO_GENERATE_SYNONYMS_PHRASE_QUERY = 264; + public static readonly BOOST = 265; + public static readonly CUTOFF_FREQUENCY = 266; + public static readonly DEFAULT_FIELD = 267; + public static readonly DEFAULT_OPERATOR = 268; + public static readonly ENABLE_POSITION_INCREMENTS = 269; + public static readonly ESCAPE = 270; + public static readonly FLAGS = 271; + public static readonly FUZZY_MAX_EXPANSIONS = 272; + public static readonly FUZZY_PREFIX_LENGTH = 273; + public static readonly FUZZY_TRANSPOSITIONS = 274; + public static readonly FUZZY_REWRITE = 275; + public static readonly FUZZINESS = 276; + public static readonly LENIENT = 277; + public static readonly LOW_FREQ_OPERATOR = 278; + public static readonly MAX_DETERMINIZED_STATES = 279; + public static readonly MAX_EXPANSIONS = 280; + public static readonly MINIMUM_SHOULD_MATCH = 281; + public static readonly OPERATOR = 282; + public static readonly PHRASE_SLOP = 283; + public static readonly PREFIX_LENGTH = 284; + public static readonly QUOTE_ANALYZER = 285; + public static readonly QUOTE_FIELD_SUFFIX = 286; + public static readonly REWRITE = 287; + public static readonly SLOP = 288; + public static readonly TIE_BREAKER = 289; + public static readonly TYPE = 290; + public static readonly ZERO_TERMS_QUERY = 291; + public static readonly SPAN = 292; + public static readonly MS = 293; + public static readonly S = 294; + public static readonly M = 295; + public static readonly H = 296; + public static readonly W = 297; + public static readonly Q = 298; + public static readonly Y = 299; + public static readonly ID = 300; + public static readonly INTEGER_LITERAL = 301; + public static readonly DECIMAL_LITERAL = 302; + public static readonly ID_DATE_SUFFIX = 303; + public static readonly DQUOTA_STRING = 304; + public static readonly SQUOTA_STRING = 305; + public static readonly BQUOTA_STRING = 306; + public static readonly ERROR_RECOGNITION = 307; + public static readonly RULE_root = 0; + public static readonly RULE_pplStatement = 1; + public static readonly RULE_pplCommands = 2; + public static readonly RULE_commands = 3; + public static readonly RULE_searchCommand = 4; + public static readonly RULE_describeCommand = 5; + public static readonly RULE_showCatalogsCommand = 6; + public static readonly RULE_whereCommand = 7; + public static readonly RULE_fieldsCommand = 8; + public static readonly RULE_renameCommand = 9; + public static readonly RULE_statsCommand = 10; + public static readonly RULE_dedupCommand = 11; + public static readonly RULE_sortCommand = 12; + public static readonly RULE_evalCommand = 13; + public static readonly RULE_headCommand = 14; + public static readonly RULE_topCommand = 15; + public static readonly RULE_rareCommand = 16; + public static readonly RULE_grokCommand = 17; + public static readonly RULE_parseCommand = 18; + public static readonly RULE_patternsCommand = 19; + public static readonly RULE_patternsParameter = 20; + public static readonly RULE_patternsMethod = 21; + public static readonly RULE_kmeansCommand = 22; + public static readonly RULE_kmeansParameter = 23; + public static readonly RULE_adCommand = 24; + public static readonly RULE_adParameter = 25; + public static readonly RULE_mlCommand = 26; + public static readonly RULE_mlArg = 27; + public static readonly RULE_fromClause = 28; + public static readonly RULE_tableSourceClause = 29; + public static readonly RULE_renameClasue = 30; + public static readonly RULE_byClause = 31; + public static readonly RULE_statsByClause = 32; + public static readonly RULE_bySpanClause = 33; + public static readonly RULE_spanClause = 34; + public static readonly RULE_sortbyClause = 35; + public static readonly RULE_evalClause = 36; + public static readonly RULE_statsAggTerm = 37; + public static readonly RULE_statsFunction = 38; + public static readonly RULE_statsFunctionName = 39; + public static readonly RULE_takeAggFunction = 40; + public static readonly RULE_percentileAggFunction = 41; + public static readonly RULE_expression = 42; + public static readonly RULE_logicalExpression = 43; + public static readonly RULE_comparisonExpression = 44; + public static readonly RULE_valueExpression = 45; + public static readonly RULE_primaryExpression = 46; + public static readonly RULE_constantFunction = 47; + public static readonly RULE_booleanExpression = 48; + public static readonly RULE_relevanceExpression = 49; + public static readonly RULE_singleFieldRelevanceFunction = 50; + public static readonly RULE_multiFieldRelevanceFunction = 51; + public static readonly RULE_tableSource = 52; + public static readonly RULE_tableFunction = 53; + public static readonly RULE_fieldList = 54; + public static readonly RULE_wcFieldList = 55; + public static readonly RULE_sortField = 56; + public static readonly RULE_sortFieldExpression = 57; + public static readonly RULE_fieldExpression = 58; + public static readonly RULE_wcFieldExpression = 59; + public static readonly RULE_evalFunctionCall = 60; + public static readonly RULE_dataTypeFunctionCall = 61; + public static readonly RULE_booleanFunctionCall = 62; + public static readonly RULE_convertedDataType = 63; + public static readonly RULE_evalFunctionName = 64; + public static readonly RULE_functionArgs = 65; + public static readonly RULE_functionArg = 66; + public static readonly RULE_relevanceArg = 67; + public static readonly RULE_relevanceArgName = 68; + public static readonly RULE_relevanceFieldAndWeight = 69; + public static readonly RULE_relevanceFieldWeight = 70; + public static readonly RULE_relevanceField = 71; + public static readonly RULE_relevanceQuery = 72; + public static readonly RULE_relevanceArgValue = 73; + public static readonly RULE_mathematicalFunctionBase = 74; + public static readonly RULE_trigonometricFunctionName = 75; + public static readonly RULE_dateAndTimeFunctionBase = 76; + public static readonly RULE_constantFunctionName = 77; + public static readonly RULE_conditionFunctionBase = 78; + public static readonly RULE_systemFunctionBase = 79; + public static readonly RULE_textFunctionBase = 80; + public static readonly RULE_comparisonOperator = 81; + public static readonly RULE_binaryOperator = 82; + public static readonly RULE_singleFieldRelevanceFunctionName = 83; + public static readonly RULE_multiFieldRelevanceFunctionName = 84; + public static readonly RULE_literalValue = 85; + public static readonly RULE_intervalLiteral = 86; + public static readonly RULE_stringLiteral = 87; + public static readonly RULE_integerLiteral = 88; + public static readonly RULE_decimalLiteral = 89; + public static readonly RULE_booleanLiteral = 90; + public static readonly RULE_datetimeLiteral = 91; + public static readonly RULE_dateLiteral = 92; + public static readonly RULE_timeLiteral = 93; + public static readonly RULE_timestampLiteral = 94; + public static readonly RULE_intervalUnit = 95; + public static readonly RULE_timespanUnit = 96; + public static readonly RULE_valueList = 97; + public static readonly RULE_qualifiedName = 98; + public static readonly RULE_wcQualifiedName = 99; + public static readonly RULE_ident = 100; + public static readonly RULE_wildcard = 101; + public static readonly RULE_keywordsCanBeId = 102; + // tslint:disable:no-trailing-whitespace + public static readonly ruleNames: string[] = [ + "root", "pplStatement", "pplCommands", "commands", "searchCommand", "describeCommand", + "showCatalogsCommand", "whereCommand", "fieldsCommand", "renameCommand", + "statsCommand", "dedupCommand", "sortCommand", "evalCommand", "headCommand", + "topCommand", "rareCommand", "grokCommand", "parseCommand", "patternsCommand", + "patternsParameter", "patternsMethod", "kmeansCommand", "kmeansParameter", + "adCommand", "adParameter", "mlCommand", "mlArg", "fromClause", "tableSourceClause", + "renameClasue", "byClause", "statsByClause", "bySpanClause", "spanClause", + "sortbyClause", "evalClause", "statsAggTerm", "statsFunction", "statsFunctionName", + "takeAggFunction", "percentileAggFunction", "expression", "logicalExpression", + "comparisonExpression", "valueExpression", "primaryExpression", "constantFunction", + "booleanExpression", "relevanceExpression", "singleFieldRelevanceFunction", + "multiFieldRelevanceFunction", "tableSource", "tableFunction", "fieldList", + "wcFieldList", "sortField", "sortFieldExpression", "fieldExpression", + "wcFieldExpression", "evalFunctionCall", "dataTypeFunctionCall", "booleanFunctionCall", + "convertedDataType", "evalFunctionName", "functionArgs", "functionArg", + "relevanceArg", "relevanceArgName", "relevanceFieldAndWeight", "relevanceFieldWeight", + "relevanceField", "relevanceQuery", "relevanceArgValue", "mathematicalFunctionBase", + "trigonometricFunctionName", "dateAndTimeFunctionBase", "constantFunctionName", + "conditionFunctionBase", "systemFunctionBase", "textFunctionBase", "comparisonOperator", + "binaryOperator", "singleFieldRelevanceFunctionName", "multiFieldRelevanceFunctionName", + "literalValue", "intervalLiteral", "stringLiteral", "integerLiteral", + "decimalLiteral", "booleanLiteral", "datetimeLiteral", "dateLiteral", + "timeLiteral", "timestampLiteral", "intervalUnit", "timespanUnit", "valueList", + "qualifiedName", "wcQualifiedName", "ident", "wildcard", "keywordsCanBeId", + ]; + + private static readonly _LITERAL_NAMES: Array = [ + undefined, "'SEARCH'", "'DESCRIBE'", "'SHOW'", "'FROM'", "'WHERE'", "'FIELDS'", + "'RENAME'", "'STATS'", "'DEDUP'", "'SORT'", "'EVAL'", "'HEAD'", "'TOP'", + "'RARE'", "'PARSE'", "'METHOD'", "'REGEX'", "'PUNCT'", "'GROK'", "'PATTERN'", + "'PATTERNS'", "'NEW_FIELD'", "'KMEANS'", "'AD'", "'ML'", "'AS'", "'BY'", + "'SOURCE'", "'INDEX'", "'D'", "'DESC'", "'CATALOGS'", "'SORTBY'", "'AUTO'", + "'STR'", "'IP'", "'NUM'", "'KEEPEMPTY'", "'CONSECUTIVE'", "'DEDUP_SPLITVALUES'", + "'PARTITIONS'", "'ALLNUM'", "'DELIM'", "'CENTROIDS'", "'ITERATIONS'", + "'DISTANCE_TYPE'", "'NUMBER_OF_TREES'", "'SHINGLE_SIZE'", "'SAMPLE_SIZE'", + "'OUTPUT_AFTER'", "'TIME_DECAY'", "'ANOMALY_RATE'", "'CATEGORY_FIELD'", + "'TIME_FIELD'", "'TIME_ZONE'", "'TRAINING_DATA_SIZE'", "'ANOMALY_SCORE_THRESHOLD'", + "'CASE'", "'IN'", "'NOT'", "'OR'", "'AND'", "'XOR'", "'TRUE'", "'FALSE'", + "'REGEXP'", "'DATETIME'", "'INTERVAL'", "'MICROSECOND'", "'MILLISECOND'", + "'SECOND'", "'MINUTE'", "'HOUR'", "'DAY'", "'WEEK'", "'MONTH'", "'QUARTER'", + "'YEAR'", "'SECOND_MICROSECOND'", "'MINUTE_MICROSECOND'", "'MINUTE_SECOND'", + "'HOUR_MICROSECOND'", "'HOUR_SECOND'", "'HOUR_MINUTE'", "'DAY_MICROSECOND'", + "'DAY_SECOND'", "'DAY_MINUTE'", "'DAY_HOUR'", "'YEAR_MONTH'", "'CONVERT_TZ'", + "'DATAMODEL'", "'LOOKUP'", "'SAVEDSEARCH'", "'INT'", "'INTEGER'", "'DOUBLE'", + "'LONG'", "'FLOAT'", "'STRING'", "'BOOLEAN'", "'|'", "','", "'.'", "'='", + "'>'", "'<'", undefined, undefined, undefined, "'+'", "'-'", "'*'", "'/'", + "'%'", "'!'", "':'", "'('", "')'", "'['", "']'", "'''", "'\"'", "'`'", + "'~'", "'&'", "'^'", "'AVG'", "'COUNT'", "'DISTINCT_COUNT'", "'ESTDC'", + "'ESTDC_ERROR'", "'MAX'", "'MEAN'", "'MEDIAN'", "'MIN'", "'MODE'", "'RANGE'", + "'STDEV'", "'STDEVP'", "'SUM'", "'SUMSQ'", "'VAR_SAMP'", "'VAR_POP'", + "'STDDEV_SAMP'", "'STDDEV_POP'", "'PERCENTILE'", "'TAKE'", "'FIRST'", + "'LAST'", "'LIST'", "'VALUES'", "'EARLIEST'", "'EARLIEST_TIME'", "'LATEST'", + "'LATEST_TIME'", "'PER_DAY'", "'PER_HOUR'", "'PER_MINUTE'", "'PER_SECOND'", + "'RATE'", "'SPARKLINE'", "'C'", "'DC'", "'ABS'", "'CEIL'", "'CEILING'", + "'CONV'", "'CRC32'", "'E'", "'EXP'", "'FLOOR'", "'LN'", "'LOG'", "'LOG10'", + "'LOG2'", "'MOD'", "'PI'", "'POW'", "'POWER'", "'RAND'", "'ROUND'", "'SIGN'", + "'SQRT'", "'TRUNCATE'", "'ACOS'", "'ASIN'", "'ATAN'", "'ATAN2'", "'COS'", + "'COT'", "'DEGREES'", "'RADIANS'", "'SIN'", "'TAN'", "'ADDDATE'", "'CURDATE'", + "'CURRENT_DATE'", "'CURRENT_TIME'", "'CURRENT_TIMESTAMP'", "'CURTIME'", + "'DATE'", "'DATE_ADD'", "'DATE_FORMAT'", "'DATE_SUB'", "'DAYNAME'", "'DAYOFMONTH'", + "'DAYOFWEEK'", "'DAYOFYEAR'", "'FROM_DAYS'", "'LOCALTIME'", "'LOCALTIMESTAMP'", + "'FROM_UNIXTIME'", "'MAKEDATE'", "'MAKETIME'", "'MONTHNAME'", "'NOW'", + "'PERIOD_ADD'", "'PERIOD_DIFF'", "'SUBDATE'", "'SYSDATE'", "'TIME'", "'TIME_TO_SEC'", + "'TIMESTAMP'", "'TO_DAYS'", "'UTC_DATE'", "'UTC_TIME'", "'UTC_TIMESTAMP'", + "'UNIX_TIMESTAMP'", "'SUBSTR'", "'SUBSTRING'", "'LTRIM'", "'RTRIM'", "'TRIM'", + "'TO'", "'LOWER'", "'UPPER'", "'CONCAT'", "'CONCAT_WS'", "'LENGTH'", "'STRCMP'", + "'RIGHT'", "'LEFT'", "'ASCII'", "'LOCATE'", "'REPLACE'", "'CAST'", "'LIKE'", + "'ISNULL'", "'ISNOTNULL'", "'IFNULL'", "'NULLIF'", "'IF'", "'TYPEOF'", + "'MATCH'", "'MATCH_PHRASE'", "'MATCH_PHRASE_PREFIX'", "'MATCH_BOOL_PREFIX'", + "'SIMPLE_QUERY_STRING'", "'MULTI_MATCH'", "'QUERY_STRING'", "'ALLOW_LEADING_WILDCARD'", + "'ANALYZE_WILDCARD'", "'ANALYZER'", "'AUTO_GENERATE_SYNONYMS_PHRASE_QUERY'", + "'BOOST'", "'CUTOFF_FREQUENCY'", "'DEFAULT_FIELD'", "'DEFAULT_OPERATOR'", + "'ENABLE_POSITION_INCREMENTS'", "'ESCAPE'", "'FLAGS'", "'FUZZY_MAX_EXPANSIONS'", + "'FUZZY_PREFIX_LENGTH'", "'FUZZY_TRANSPOSITIONS'", "'FUZZY_REWRITE'", + "'FUZZINESS'", "'LENIENT'", "'LOW_FREQ_OPERATOR'", "'MAX_DETERMINIZED_STATES'", + "'MAX_EXPANSIONS'", "'MINIMUM_SHOULD_MATCH'", "'OPERATOR'", "'PHRASE_SLOP'", + "'PREFIX_LENGTH'", "'QUOTE_ANALYZER'", "'QUOTE_FIELD_SUFFIX'", "'REWRITE'", + "'SLOP'", "'TIE_BREAKER'", "'TYPE'", "'ZERO_TERMS_QUERY'", "'SPAN'", "'MS'", + "'S'", "'M'", "'H'", "'W'", "'Q'", "'Y'", + ]; + private static readonly _SYMBOLIC_NAMES: Array = [ + undefined, "SEARCH", "DESCRIBE", "SHOW", "FROM", "WHERE", "FIELDS", "RENAME", + "STATS", "DEDUP", "SORT", "EVAL", "HEAD", "TOP", "RARE", "PARSE", "METHOD", + "REGEX", "PUNCT", "GROK", "PATTERN", "PATTERNS", "NEW_FIELD", "KMEANS", + "AD", "ML", "AS", "BY", "SOURCE", "INDEX", "D", "DESC", "CATALOGS", "SORTBY", + "AUTO", "STR", "IP", "NUM", "KEEPEMPTY", "CONSECUTIVE", "DEDUP_SPLITVALUES", + "PARTITIONS", "ALLNUM", "DELIM", "CENTROIDS", "ITERATIONS", "DISTANCE_TYPE", + "NUMBER_OF_TREES", "SHINGLE_SIZE", "SAMPLE_SIZE", "OUTPUT_AFTER", "TIME_DECAY", + "ANOMALY_RATE", "CATEGORY_FIELD", "TIME_FIELD", "TIME_ZONE", "TRAINING_DATA_SIZE", + "ANOMALY_SCORE_THRESHOLD", "CASE", "IN", "NOT", "OR", "AND", "XOR", "TRUE", + "FALSE", "REGEXP", "DATETIME", "INTERVAL", "MICROSECOND", "MILLISECOND", + "SECOND", "MINUTE", "HOUR", "DAY", "WEEK", "MONTH", "QUARTER", "YEAR", + "SECOND_MICROSECOND", "MINUTE_MICROSECOND", "MINUTE_SECOND", "HOUR_MICROSECOND", + "HOUR_SECOND", "HOUR_MINUTE", "DAY_MICROSECOND", "DAY_SECOND", "DAY_MINUTE", + "DAY_HOUR", "YEAR_MONTH", "CONVERT_TZ", "DATAMODEL", "LOOKUP", "SAVEDSEARCH", + "INT", "INTEGER", "DOUBLE", "LONG", "FLOAT", "STRING", "BOOLEAN", "PIPE", + "COMMA", "DOT", "EQUAL", "GREATER", "LESS", "NOT_GREATER", "NOT_LESS", + "NOT_EQUAL", "PLUS", "MINUS", "STAR", "DIVIDE", "MODULE", "EXCLAMATION_SYMBOL", + "COLON", "LT_PRTHS", "RT_PRTHS", "LT_SQR_PRTHS", "RT_SQR_PRTHS", "SINGLE_QUOTE", + "DOUBLE_QUOTE", "BACKTICK", "BIT_NOT_OP", "BIT_AND_OP", "BIT_XOR_OP", + "AVG", "COUNT", "DISTINCT_COUNT", "ESTDC", "ESTDC_ERROR", "MAX", "MEAN", + "MEDIAN", "MIN", "MODE", "RANGE", "STDEV", "STDEVP", "SUM", "SUMSQ", "VAR_SAMP", + "VAR_POP", "STDDEV_SAMP", "STDDEV_POP", "PERCENTILE", "TAKE", "FIRST", + "LAST", "LIST", "VALUES", "EARLIEST", "EARLIEST_TIME", "LATEST", "LATEST_TIME", + "PER_DAY", "PER_HOUR", "PER_MINUTE", "PER_SECOND", "RATE", "SPARKLINE", + "C", "DC", "ABS", "CEIL", "CEILING", "CONV", "CRC32", "E", "EXP", "FLOOR", + "LN", "LOG", "LOG10", "LOG2", "MOD", "PI", "POW", "POWER", "RAND", "ROUND", + "SIGN", "SQRT", "TRUNCATE", "ACOS", "ASIN", "ATAN", "ATAN2", "COS", "COT", + "DEGREES", "RADIANS", "SIN", "TAN", "ADDDATE", "CURDATE", "CURRENT_DATE", + "CURRENT_TIME", "CURRENT_TIMESTAMP", "CURTIME", "DATE", "DATE_ADD", "DATE_FORMAT", + "DATE_SUB", "DAYNAME", "DAYOFMONTH", "DAYOFWEEK", "DAYOFYEAR", "FROM_DAYS", + "LOCALTIME", "LOCALTIMESTAMP", "FROM_UNIXTIME", "MAKEDATE", "MAKETIME", + "MONTHNAME", "NOW", "PERIOD_ADD", "PERIOD_DIFF", "SUBDATE", "SYSDATE", + "TIME", "TIME_TO_SEC", "TIMESTAMP", "TO_DAYS", "UTC_DATE", "UTC_TIME", + "UTC_TIMESTAMP", "UNIX_TIMESTAMP", "SUBSTR", "SUBSTRING", "LTRIM", "RTRIM", + "TRIM", "TO", "LOWER", "UPPER", "CONCAT", "CONCAT_WS", "LENGTH", "STRCMP", + "RIGHT", "LEFT", "ASCII", "LOCATE", "REPLACE", "CAST", "LIKE", "ISNULL", + "ISNOTNULL", "IFNULL", "NULLIF", "IF", "TYPEOF", "MATCH", "MATCH_PHRASE", + "MATCH_PHRASE_PREFIX", "MATCH_BOOL_PREFIX", "SIMPLE_QUERY_STRING", "MULTI_MATCH", + "QUERY_STRING", "ALLOW_LEADING_WILDCARD", "ANALYZE_WILDCARD", "ANALYZER", + "AUTO_GENERATE_SYNONYMS_PHRASE_QUERY", "BOOST", "CUTOFF_FREQUENCY", "DEFAULT_FIELD", + "DEFAULT_OPERATOR", "ENABLE_POSITION_INCREMENTS", "ESCAPE", "FLAGS", "FUZZY_MAX_EXPANSIONS", + "FUZZY_PREFIX_LENGTH", "FUZZY_TRANSPOSITIONS", "FUZZY_REWRITE", "FUZZINESS", + "LENIENT", "LOW_FREQ_OPERATOR", "MAX_DETERMINIZED_STATES", "MAX_EXPANSIONS", + "MINIMUM_SHOULD_MATCH", "OPERATOR", "PHRASE_SLOP", "PREFIX_LENGTH", "QUOTE_ANALYZER", + "QUOTE_FIELD_SUFFIX", "REWRITE", "SLOP", "TIE_BREAKER", "TYPE", "ZERO_TERMS_QUERY", + "SPAN", "MS", "S", "M", "H", "W", "Q", "Y", "ID", "INTEGER_LITERAL", "DECIMAL_LITERAL", + "ID_DATE_SUFFIX", "DQUOTA_STRING", "SQUOTA_STRING", "BQUOTA_STRING", "ERROR_RECOGNITION", + ]; + public static readonly VOCABULARY: Vocabulary = new VocabularyImpl(OpenSearchPPLParser._LITERAL_NAMES, OpenSearchPPLParser._SYMBOLIC_NAMES, []); + + // @Override + // @NotNull + public get vocabulary(): Vocabulary { + return OpenSearchPPLParser.VOCABULARY; + } + // tslint:enable:no-trailing-whitespace + + // @Override + public get grammarFileName(): string { return "OpenSearchPPLParser.g4"; } + + // @Override + public get ruleNames(): string[] { return OpenSearchPPLParser.ruleNames; } + + // @Override + public get serializedATN(): string { return OpenSearchPPLParser._serializedATN; } + + protected createFailedPredicateException(predicate?: string, message?: string): FailedPredicateException { + return new FailedPredicateException(this, predicate, message); + } + + constructor(input: TokenStream) { + super(input); + this._interp = new ParserATNSimulator(OpenSearchPPLParser._ATN, this); + } + // @RuleVersion(0) + public root(): RootContext { + let _localctx: RootContext = new RootContext(this._ctx, this.state); + this.enterRule(_localctx, 0, OpenSearchPPLParser.RULE_root); + let _la: number; + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 207; + this._errHandler.sync(this); + _la = this._input.LA(1); + if ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << OpenSearchPPLParser.SEARCH) | (1 << OpenSearchPPLParser.DESCRIBE) | (1 << OpenSearchPPLParser.SHOW) | (1 << OpenSearchPPLParser.SOURCE) | (1 << OpenSearchPPLParser.INDEX) | (1 << OpenSearchPPLParser.D))) !== 0) || ((((_la - 60)) & ~0x1F) === 0 && ((1 << (_la - 60)) & ((1 << (OpenSearchPPLParser.NOT - 60)) | (1 << (OpenSearchPPLParser.TRUE - 60)) | (1 << (OpenSearchPPLParser.FALSE - 60)) | (1 << (OpenSearchPPLParser.DATETIME - 60)) | (1 << (OpenSearchPPLParser.INTERVAL - 60)) | (1 << (OpenSearchPPLParser.MICROSECOND - 60)) | (1 << (OpenSearchPPLParser.MILLISECOND - 60)) | (1 << (OpenSearchPPLParser.SECOND - 60)) | (1 << (OpenSearchPPLParser.MINUTE - 60)) | (1 << (OpenSearchPPLParser.HOUR - 60)) | (1 << (OpenSearchPPLParser.DAY - 60)) | (1 << (OpenSearchPPLParser.WEEK - 60)) | (1 << (OpenSearchPPLParser.MONTH - 60)) | (1 << (OpenSearchPPLParser.QUARTER - 60)) | (1 << (OpenSearchPPLParser.YEAR - 60)) | (1 << (OpenSearchPPLParser.CONVERT_TZ - 60)))) !== 0) || ((((_la - 103)) & ~0x1F) === 0 && ((1 << (_la - 103)) & ((1 << (OpenSearchPPLParser.DOT - 103)) | (1 << (OpenSearchPPLParser.PLUS - 103)) | (1 << (OpenSearchPPLParser.MINUS - 103)) | (1 << (OpenSearchPPLParser.LT_PRTHS - 103)) | (1 << (OpenSearchPPLParser.BACKTICK - 103)) | (1 << (OpenSearchPPLParser.AVG - 103)) | (1 << (OpenSearchPPLParser.COUNT - 103)) | (1 << (OpenSearchPPLParser.MAX - 103)))) !== 0) || ((((_la - 135)) & ~0x1F) === 0 && ((1 << (_la - 135)) & ((1 << (OpenSearchPPLParser.MIN - 135)) | (1 << (OpenSearchPPLParser.SUM - 135)) | (1 << (OpenSearchPPLParser.VAR_SAMP - 135)) | (1 << (OpenSearchPPLParser.VAR_POP - 135)) | (1 << (OpenSearchPPLParser.STDDEV_SAMP - 135)) | (1 << (OpenSearchPPLParser.STDDEV_POP - 135)) | (1 << (OpenSearchPPLParser.FIRST - 135)) | (1 << (OpenSearchPPLParser.LAST - 135)) | (1 << (OpenSearchPPLParser.ABS - 135)) | (1 << (OpenSearchPPLParser.CEIL - 135)) | (1 << (OpenSearchPPLParser.CEILING - 135)))) !== 0) || ((((_la - 167)) & ~0x1F) === 0 && ((1 << (_la - 167)) & ((1 << (OpenSearchPPLParser.CONV - 167)) | (1 << (OpenSearchPPLParser.CRC32 - 167)) | (1 << (OpenSearchPPLParser.E - 167)) | (1 << (OpenSearchPPLParser.EXP - 167)) | (1 << (OpenSearchPPLParser.FLOOR - 167)) | (1 << (OpenSearchPPLParser.LN - 167)) | (1 << (OpenSearchPPLParser.LOG - 167)) | (1 << (OpenSearchPPLParser.LOG10 - 167)) | (1 << (OpenSearchPPLParser.LOG2 - 167)) | (1 << (OpenSearchPPLParser.MOD - 167)) | (1 << (OpenSearchPPLParser.PI - 167)) | (1 << (OpenSearchPPLParser.POW - 167)) | (1 << (OpenSearchPPLParser.POWER - 167)) | (1 << (OpenSearchPPLParser.RAND - 167)) | (1 << (OpenSearchPPLParser.ROUND - 167)) | (1 << (OpenSearchPPLParser.SIGN - 167)) | (1 << (OpenSearchPPLParser.SQRT - 167)) | (1 << (OpenSearchPPLParser.TRUNCATE - 167)) | (1 << (OpenSearchPPLParser.ACOS - 167)) | (1 << (OpenSearchPPLParser.ASIN - 167)) | (1 << (OpenSearchPPLParser.ATAN - 167)) | (1 << (OpenSearchPPLParser.ATAN2 - 167)) | (1 << (OpenSearchPPLParser.COS - 167)) | (1 << (OpenSearchPPLParser.COT - 167)) | (1 << (OpenSearchPPLParser.DEGREES - 167)) | (1 << (OpenSearchPPLParser.RADIANS - 167)) | (1 << (OpenSearchPPLParser.SIN - 167)) | (1 << (OpenSearchPPLParser.TAN - 167)) | (1 << (OpenSearchPPLParser.ADDDATE - 167)) | (1 << (OpenSearchPPLParser.CURDATE - 167)) | (1 << (OpenSearchPPLParser.CURRENT_DATE - 167)) | (1 << (OpenSearchPPLParser.CURRENT_TIME - 167)))) !== 0) || ((((_la - 199)) & ~0x1F) === 0 && ((1 << (_la - 199)) & ((1 << (OpenSearchPPLParser.CURRENT_TIMESTAMP - 199)) | (1 << (OpenSearchPPLParser.CURTIME - 199)) | (1 << (OpenSearchPPLParser.DATE - 199)) | (1 << (OpenSearchPPLParser.DATE_ADD - 199)) | (1 << (OpenSearchPPLParser.DATE_FORMAT - 199)) | (1 << (OpenSearchPPLParser.DATE_SUB - 199)) | (1 << (OpenSearchPPLParser.DAYNAME - 199)) | (1 << (OpenSearchPPLParser.DAYOFMONTH - 199)) | (1 << (OpenSearchPPLParser.DAYOFWEEK - 199)) | (1 << (OpenSearchPPLParser.DAYOFYEAR - 199)) | (1 << (OpenSearchPPLParser.FROM_DAYS - 199)) | (1 << (OpenSearchPPLParser.LOCALTIME - 199)) | (1 << (OpenSearchPPLParser.LOCALTIMESTAMP - 199)) | (1 << (OpenSearchPPLParser.FROM_UNIXTIME - 199)) | (1 << (OpenSearchPPLParser.MAKEDATE - 199)) | (1 << (OpenSearchPPLParser.MAKETIME - 199)) | (1 << (OpenSearchPPLParser.MONTHNAME - 199)) | (1 << (OpenSearchPPLParser.NOW - 199)) | (1 << (OpenSearchPPLParser.PERIOD_ADD - 199)) | (1 << (OpenSearchPPLParser.PERIOD_DIFF - 199)) | (1 << (OpenSearchPPLParser.SUBDATE - 199)) | (1 << (OpenSearchPPLParser.SYSDATE - 199)) | (1 << (OpenSearchPPLParser.TIME - 199)) | (1 << (OpenSearchPPLParser.TIME_TO_SEC - 199)) | (1 << (OpenSearchPPLParser.TIMESTAMP - 199)) | (1 << (OpenSearchPPLParser.TO_DAYS - 199)) | (1 << (OpenSearchPPLParser.UTC_DATE - 199)) | (1 << (OpenSearchPPLParser.UTC_TIME - 199)) | (1 << (OpenSearchPPLParser.UTC_TIMESTAMP - 199)) | (1 << (OpenSearchPPLParser.UNIX_TIMESTAMP - 199)) | (1 << (OpenSearchPPLParser.SUBSTR - 199)) | (1 << (OpenSearchPPLParser.SUBSTRING - 199)))) !== 0) || ((((_la - 231)) & ~0x1F) === 0 && ((1 << (_la - 231)) & ((1 << (OpenSearchPPLParser.LTRIM - 231)) | (1 << (OpenSearchPPLParser.RTRIM - 231)) | (1 << (OpenSearchPPLParser.TRIM - 231)) | (1 << (OpenSearchPPLParser.LOWER - 231)) | (1 << (OpenSearchPPLParser.UPPER - 231)) | (1 << (OpenSearchPPLParser.CONCAT - 231)) | (1 << (OpenSearchPPLParser.CONCAT_WS - 231)) | (1 << (OpenSearchPPLParser.LENGTH - 231)) | (1 << (OpenSearchPPLParser.STRCMP - 231)) | (1 << (OpenSearchPPLParser.RIGHT - 231)) | (1 << (OpenSearchPPLParser.LEFT - 231)) | (1 << (OpenSearchPPLParser.ASCII - 231)) | (1 << (OpenSearchPPLParser.LOCATE - 231)) | (1 << (OpenSearchPPLParser.REPLACE - 231)) | (1 << (OpenSearchPPLParser.CAST - 231)) | (1 << (OpenSearchPPLParser.LIKE - 231)) | (1 << (OpenSearchPPLParser.ISNULL - 231)) | (1 << (OpenSearchPPLParser.ISNOTNULL - 231)) | (1 << (OpenSearchPPLParser.IFNULL - 231)) | (1 << (OpenSearchPPLParser.NULLIF - 231)) | (1 << (OpenSearchPPLParser.IF - 231)) | (1 << (OpenSearchPPLParser.TYPEOF - 231)) | (1 << (OpenSearchPPLParser.MATCH - 231)) | (1 << (OpenSearchPPLParser.MATCH_PHRASE - 231)) | (1 << (OpenSearchPPLParser.MATCH_PHRASE_PREFIX - 231)) | (1 << (OpenSearchPPLParser.MATCH_BOOL_PREFIX - 231)) | (1 << (OpenSearchPPLParser.SIMPLE_QUERY_STRING - 231)) | (1 << (OpenSearchPPLParser.MULTI_MATCH - 231)) | (1 << (OpenSearchPPLParser.QUERY_STRING - 231)))) !== 0) || ((((_la - 292)) & ~0x1F) === 0 && ((1 << (_la - 292)) & ((1 << (OpenSearchPPLParser.SPAN - 292)) | (1 << (OpenSearchPPLParser.MS - 292)) | (1 << (OpenSearchPPLParser.S - 292)) | (1 << (OpenSearchPPLParser.M - 292)) | (1 << (OpenSearchPPLParser.H - 292)) | (1 << (OpenSearchPPLParser.W - 292)) | (1 << (OpenSearchPPLParser.Q - 292)) | (1 << (OpenSearchPPLParser.Y - 292)) | (1 << (OpenSearchPPLParser.ID - 292)) | (1 << (OpenSearchPPLParser.INTEGER_LITERAL - 292)) | (1 << (OpenSearchPPLParser.DECIMAL_LITERAL - 292)) | (1 << (OpenSearchPPLParser.DQUOTA_STRING - 292)) | (1 << (OpenSearchPPLParser.SQUOTA_STRING - 292)) | (1 << (OpenSearchPPLParser.BQUOTA_STRING - 292)))) !== 0)) { + { + this.state = 206; + this.pplStatement(); + } + } + + this.state = 209; + this.match(OpenSearchPPLParser.EOF); + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public pplStatement(): PplStatementContext { + let _localctx: PplStatementContext = new PplStatementContext(this._ctx, this.state); + this.enterRule(_localctx, 2, OpenSearchPPLParser.RULE_pplStatement); + let _la: number; + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 211; + this.pplCommands(); + this.state = 216; + this._errHandler.sync(this); + _la = this._input.LA(1); + while (_la === OpenSearchPPLParser.PIPE) { + { + { + this.state = 212; + this.match(OpenSearchPPLParser.PIPE); + this.state = 213; + this.commands(); + } + } + this.state = 218; + this._errHandler.sync(this); + _la = this._input.LA(1); + } + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public pplCommands(): PplCommandsContext { + let _localctx: PplCommandsContext = new PplCommandsContext(this._ctx, this.state); + this.enterRule(_localctx, 4, OpenSearchPPLParser.RULE_pplCommands); + try { + this.state = 222; + this._errHandler.sync(this); + switch (this._input.LA(1)) { + case OpenSearchPPLParser.SEARCH: + case OpenSearchPPLParser.SOURCE: + case OpenSearchPPLParser.INDEX: + case OpenSearchPPLParser.D: + case OpenSearchPPLParser.NOT: + case OpenSearchPPLParser.TRUE: + case OpenSearchPPLParser.FALSE: + case OpenSearchPPLParser.DATETIME: + case OpenSearchPPLParser.INTERVAL: + case OpenSearchPPLParser.MICROSECOND: + case OpenSearchPPLParser.MILLISECOND: + case OpenSearchPPLParser.SECOND: + case OpenSearchPPLParser.MINUTE: + case OpenSearchPPLParser.HOUR: + case OpenSearchPPLParser.DAY: + case OpenSearchPPLParser.WEEK: + case OpenSearchPPLParser.MONTH: + case OpenSearchPPLParser.QUARTER: + case OpenSearchPPLParser.YEAR: + case OpenSearchPPLParser.CONVERT_TZ: + case OpenSearchPPLParser.DOT: + case OpenSearchPPLParser.PLUS: + case OpenSearchPPLParser.MINUS: + case OpenSearchPPLParser.LT_PRTHS: + case OpenSearchPPLParser.BACKTICK: + case OpenSearchPPLParser.AVG: + case OpenSearchPPLParser.COUNT: + case OpenSearchPPLParser.MAX: + case OpenSearchPPLParser.MIN: + case OpenSearchPPLParser.SUM: + case OpenSearchPPLParser.VAR_SAMP: + case OpenSearchPPLParser.VAR_POP: + case OpenSearchPPLParser.STDDEV_SAMP: + case OpenSearchPPLParser.STDDEV_POP: + case OpenSearchPPLParser.FIRST: + case OpenSearchPPLParser.LAST: + case OpenSearchPPLParser.ABS: + case OpenSearchPPLParser.CEIL: + case OpenSearchPPLParser.CEILING: + case OpenSearchPPLParser.CONV: + case OpenSearchPPLParser.CRC32: + case OpenSearchPPLParser.E: + case OpenSearchPPLParser.EXP: + case OpenSearchPPLParser.FLOOR: + case OpenSearchPPLParser.LN: + case OpenSearchPPLParser.LOG: + case OpenSearchPPLParser.LOG10: + case OpenSearchPPLParser.LOG2: + case OpenSearchPPLParser.MOD: + case OpenSearchPPLParser.PI: + case OpenSearchPPLParser.POW: + case OpenSearchPPLParser.POWER: + case OpenSearchPPLParser.RAND: + case OpenSearchPPLParser.ROUND: + case OpenSearchPPLParser.SIGN: + case OpenSearchPPLParser.SQRT: + case OpenSearchPPLParser.TRUNCATE: + case OpenSearchPPLParser.ACOS: + case OpenSearchPPLParser.ASIN: + case OpenSearchPPLParser.ATAN: + case OpenSearchPPLParser.ATAN2: + case OpenSearchPPLParser.COS: + case OpenSearchPPLParser.COT: + case OpenSearchPPLParser.DEGREES: + case OpenSearchPPLParser.RADIANS: + case OpenSearchPPLParser.SIN: + case OpenSearchPPLParser.TAN: + case OpenSearchPPLParser.ADDDATE: + case OpenSearchPPLParser.CURDATE: + case OpenSearchPPLParser.CURRENT_DATE: + case OpenSearchPPLParser.CURRENT_TIME: + case OpenSearchPPLParser.CURRENT_TIMESTAMP: + case OpenSearchPPLParser.CURTIME: + case OpenSearchPPLParser.DATE: + case OpenSearchPPLParser.DATE_ADD: + case OpenSearchPPLParser.DATE_FORMAT: + case OpenSearchPPLParser.DATE_SUB: + case OpenSearchPPLParser.DAYNAME: + case OpenSearchPPLParser.DAYOFMONTH: + case OpenSearchPPLParser.DAYOFWEEK: + case OpenSearchPPLParser.DAYOFYEAR: + case OpenSearchPPLParser.FROM_DAYS: + case OpenSearchPPLParser.LOCALTIME: + case OpenSearchPPLParser.LOCALTIMESTAMP: + case OpenSearchPPLParser.FROM_UNIXTIME: + case OpenSearchPPLParser.MAKEDATE: + case OpenSearchPPLParser.MAKETIME: + case OpenSearchPPLParser.MONTHNAME: + case OpenSearchPPLParser.NOW: + case OpenSearchPPLParser.PERIOD_ADD: + case OpenSearchPPLParser.PERIOD_DIFF: + case OpenSearchPPLParser.SUBDATE: + case OpenSearchPPLParser.SYSDATE: + case OpenSearchPPLParser.TIME: + case OpenSearchPPLParser.TIME_TO_SEC: + case OpenSearchPPLParser.TIMESTAMP: + case OpenSearchPPLParser.TO_DAYS: + case OpenSearchPPLParser.UTC_DATE: + case OpenSearchPPLParser.UTC_TIME: + case OpenSearchPPLParser.UTC_TIMESTAMP: + case OpenSearchPPLParser.UNIX_TIMESTAMP: + case OpenSearchPPLParser.SUBSTR: + case OpenSearchPPLParser.SUBSTRING: + case OpenSearchPPLParser.LTRIM: + case OpenSearchPPLParser.RTRIM: + case OpenSearchPPLParser.TRIM: + case OpenSearchPPLParser.LOWER: + case OpenSearchPPLParser.UPPER: + case OpenSearchPPLParser.CONCAT: + case OpenSearchPPLParser.CONCAT_WS: + case OpenSearchPPLParser.LENGTH: + case OpenSearchPPLParser.STRCMP: + case OpenSearchPPLParser.RIGHT: + case OpenSearchPPLParser.LEFT: + case OpenSearchPPLParser.ASCII: + case OpenSearchPPLParser.LOCATE: + case OpenSearchPPLParser.REPLACE: + case OpenSearchPPLParser.CAST: + case OpenSearchPPLParser.LIKE: + case OpenSearchPPLParser.ISNULL: + case OpenSearchPPLParser.ISNOTNULL: + case OpenSearchPPLParser.IFNULL: + case OpenSearchPPLParser.NULLIF: + case OpenSearchPPLParser.IF: + case OpenSearchPPLParser.TYPEOF: + case OpenSearchPPLParser.MATCH: + case OpenSearchPPLParser.MATCH_PHRASE: + case OpenSearchPPLParser.MATCH_PHRASE_PREFIX: + case OpenSearchPPLParser.MATCH_BOOL_PREFIX: + case OpenSearchPPLParser.SIMPLE_QUERY_STRING: + case OpenSearchPPLParser.MULTI_MATCH: + case OpenSearchPPLParser.QUERY_STRING: + case OpenSearchPPLParser.SPAN: + case OpenSearchPPLParser.MS: + case OpenSearchPPLParser.S: + case OpenSearchPPLParser.M: + case OpenSearchPPLParser.H: + case OpenSearchPPLParser.W: + case OpenSearchPPLParser.Q: + case OpenSearchPPLParser.Y: + case OpenSearchPPLParser.ID: + case OpenSearchPPLParser.INTEGER_LITERAL: + case OpenSearchPPLParser.DECIMAL_LITERAL: + case OpenSearchPPLParser.DQUOTA_STRING: + case OpenSearchPPLParser.SQUOTA_STRING: + case OpenSearchPPLParser.BQUOTA_STRING: + this.enterOuterAlt(_localctx, 1); + { + this.state = 219; + this.searchCommand(); + } + break; + case OpenSearchPPLParser.DESCRIBE: + this.enterOuterAlt(_localctx, 2); + { + this.state = 220; + this.describeCommand(); + } + break; + case OpenSearchPPLParser.SHOW: + this.enterOuterAlt(_localctx, 3); + { + this.state = 221; + this.showCatalogsCommand(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public commands(): CommandsContext { + let _localctx: CommandsContext = new CommandsContext(this._ctx, this.state); + this.enterRule(_localctx, 6, OpenSearchPPLParser.RULE_commands); + try { + this.state = 240; + this._errHandler.sync(this); + switch (this._input.LA(1)) { + case OpenSearchPPLParser.WHERE: + this.enterOuterAlt(_localctx, 1); + { + this.state = 224; + this.whereCommand(); + } + break; + case OpenSearchPPLParser.FIELDS: + this.enterOuterAlt(_localctx, 2); + { + this.state = 225; + this.fieldsCommand(); + } + break; + case OpenSearchPPLParser.RENAME: + this.enterOuterAlt(_localctx, 3); + { + this.state = 226; + this.renameCommand(); + } + break; + case OpenSearchPPLParser.STATS: + this.enterOuterAlt(_localctx, 4); + { + this.state = 227; + this.statsCommand(); + } + break; + case OpenSearchPPLParser.DEDUP: + this.enterOuterAlt(_localctx, 5); + { + this.state = 228; + this.dedupCommand(); + } + break; + case OpenSearchPPLParser.SORT: + this.enterOuterAlt(_localctx, 6); + { + this.state = 229; + this.sortCommand(); + } + break; + case OpenSearchPPLParser.EVAL: + this.enterOuterAlt(_localctx, 7); + { + this.state = 230; + this.evalCommand(); + } + break; + case OpenSearchPPLParser.HEAD: + this.enterOuterAlt(_localctx, 8); + { + this.state = 231; + this.headCommand(); + } + break; + case OpenSearchPPLParser.TOP: + this.enterOuterAlt(_localctx, 9); + { + this.state = 232; + this.topCommand(); + } + break; + case OpenSearchPPLParser.RARE: + this.enterOuterAlt(_localctx, 10); + { + this.state = 233; + this.rareCommand(); + } + break; + case OpenSearchPPLParser.GROK: + this.enterOuterAlt(_localctx, 11); + { + this.state = 234; + this.grokCommand(); + } + break; + case OpenSearchPPLParser.PARSE: + this.enterOuterAlt(_localctx, 12); + { + this.state = 235; + this.parseCommand(); + } + break; + case OpenSearchPPLParser.PATTERNS: + this.enterOuterAlt(_localctx, 13); + { + this.state = 236; + this.patternsCommand(); + } + break; + case OpenSearchPPLParser.KMEANS: + this.enterOuterAlt(_localctx, 14); + { + this.state = 237; + this.kmeansCommand(); + } + break; + case OpenSearchPPLParser.AD: + this.enterOuterAlt(_localctx, 15); + { + this.state = 238; + this.adCommand(); + } + break; + case OpenSearchPPLParser.ML: + this.enterOuterAlt(_localctx, 16); + { + this.state = 239; + this.mlCommand(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public searchCommand(): SearchCommandContext { + let _localctx: SearchCommandContext = new SearchCommandContext(this._ctx, this.state); + this.enterRule(_localctx, 8, OpenSearchPPLParser.RULE_searchCommand); + let _la: number; + try { + this.state = 258; + this._errHandler.sync(this); + switch ( this.interpreter.adaptivePredict(this._input, 7, this._ctx) ) { + case 1: + _localctx = new SearchFromContext(_localctx); + this.enterOuterAlt(_localctx, 1); + { + this.state = 243; + this._errHandler.sync(this); + _la = this._input.LA(1); + if (_la === OpenSearchPPLParser.SEARCH) { + { + this.state = 242; + this.match(OpenSearchPPLParser.SEARCH); + } + } + + this.state = 245; + this.fromClause(); + } + break; + + case 2: + _localctx = new SearchFromFilterContext(_localctx); + this.enterOuterAlt(_localctx, 2); + { + this.state = 247; + this._errHandler.sync(this); + _la = this._input.LA(1); + if (_la === OpenSearchPPLParser.SEARCH) { + { + this.state = 246; + this.match(OpenSearchPPLParser.SEARCH); + } + } + + this.state = 249; + this.fromClause(); + this.state = 250; + this.logicalExpression(0); + } + break; + + case 3: + _localctx = new SearchFilterFromContext(_localctx); + this.enterOuterAlt(_localctx, 3); + { + this.state = 253; + this._errHandler.sync(this); + _la = this._input.LA(1); + if (_la === OpenSearchPPLParser.SEARCH) { + { + this.state = 252; + this.match(OpenSearchPPLParser.SEARCH); + } + } + + this.state = 255; + this.logicalExpression(0); + this.state = 256; + this.fromClause(); + } + break; + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public describeCommand(): DescribeCommandContext { + let _localctx: DescribeCommandContext = new DescribeCommandContext(this._ctx, this.state); + this.enterRule(_localctx, 10, OpenSearchPPLParser.RULE_describeCommand); + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 260; + this.match(OpenSearchPPLParser.DESCRIBE); + this.state = 261; + this.tableSourceClause(); + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public showCatalogsCommand(): ShowCatalogsCommandContext { + let _localctx: ShowCatalogsCommandContext = new ShowCatalogsCommandContext(this._ctx, this.state); + this.enterRule(_localctx, 12, OpenSearchPPLParser.RULE_showCatalogsCommand); + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 263; + this.match(OpenSearchPPLParser.SHOW); + this.state = 264; + this.match(OpenSearchPPLParser.CATALOGS); + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public whereCommand(): WhereCommandContext { + let _localctx: WhereCommandContext = new WhereCommandContext(this._ctx, this.state); + this.enterRule(_localctx, 14, OpenSearchPPLParser.RULE_whereCommand); + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 266; + this.match(OpenSearchPPLParser.WHERE); + this.state = 267; + this.logicalExpression(0); + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public fieldsCommand(): FieldsCommandContext { + let _localctx: FieldsCommandContext = new FieldsCommandContext(this._ctx, this.state); + this.enterRule(_localctx, 16, OpenSearchPPLParser.RULE_fieldsCommand); + let _la: number; + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 269; + this.match(OpenSearchPPLParser.FIELDS); + this.state = 271; + this._errHandler.sync(this); + _la = this._input.LA(1); + if (_la === OpenSearchPPLParser.PLUS || _la === OpenSearchPPLParser.MINUS) { + { + this.state = 270; + _la = this._input.LA(1); + if (!(_la === OpenSearchPPLParser.PLUS || _la === OpenSearchPPLParser.MINUS)) { + this._errHandler.recoverInline(this); + } else { + if (this._input.LA(1) === Token.EOF) { + this.matchedEOF = true; + } + + this._errHandler.reportMatch(this); + this.consume(); + } + } + } + + this.state = 273; + this.fieldList(); + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public renameCommand(): RenameCommandContext { + let _localctx: RenameCommandContext = new RenameCommandContext(this._ctx, this.state); + this.enterRule(_localctx, 18, OpenSearchPPLParser.RULE_renameCommand); + let _la: number; + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 275; + this.match(OpenSearchPPLParser.RENAME); + this.state = 276; + this.renameClasue(); + this.state = 281; + this._errHandler.sync(this); + _la = this._input.LA(1); + while (_la === OpenSearchPPLParser.COMMA) { + { + { + this.state = 277; + this.match(OpenSearchPPLParser.COMMA); + this.state = 278; + this.renameClasue(); + } + } + this.state = 283; + this._errHandler.sync(this); + _la = this._input.LA(1); + } + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public statsCommand(): StatsCommandContext { + let _localctx: StatsCommandContext = new StatsCommandContext(this._ctx, this.state); + this.enterRule(_localctx, 20, OpenSearchPPLParser.RULE_statsCommand); + let _la: number; + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 284; + this.match(OpenSearchPPLParser.STATS); + this.state = 288; + this._errHandler.sync(this); + _la = this._input.LA(1); + if (_la === OpenSearchPPLParser.PARTITIONS) { + { + this.state = 285; + this.match(OpenSearchPPLParser.PARTITIONS); + this.state = 286; + this.match(OpenSearchPPLParser.EQUAL); + this.state = 287; + _localctx._partitions = this.integerLiteral(); + } + } + + this.state = 293; + this._errHandler.sync(this); + _la = this._input.LA(1); + if (_la === OpenSearchPPLParser.ALLNUM) { + { + this.state = 290; + this.match(OpenSearchPPLParser.ALLNUM); + this.state = 291; + this.match(OpenSearchPPLParser.EQUAL); + this.state = 292; + _localctx._allnum = this.booleanLiteral(); + } + } + + this.state = 298; + this._errHandler.sync(this); + _la = this._input.LA(1); + if (_la === OpenSearchPPLParser.DELIM) { + { + this.state = 295; + this.match(OpenSearchPPLParser.DELIM); + this.state = 296; + this.match(OpenSearchPPLParser.EQUAL); + this.state = 297; + _localctx._delim = this.stringLiteral(); + } + } + + this.state = 300; + this.statsAggTerm(); + this.state = 305; + this._errHandler.sync(this); + _la = this._input.LA(1); + while (_la === OpenSearchPPLParser.COMMA) { + { + { + this.state = 301; + this.match(OpenSearchPPLParser.COMMA); + this.state = 302; + this.statsAggTerm(); + } + } + this.state = 307; + this._errHandler.sync(this); + _la = this._input.LA(1); + } + this.state = 309; + this._errHandler.sync(this); + _la = this._input.LA(1); + if (_la === OpenSearchPPLParser.BY) { + { + this.state = 308; + this.statsByClause(); + } + } + + this.state = 314; + this._errHandler.sync(this); + _la = this._input.LA(1); + if (_la === OpenSearchPPLParser.DEDUP_SPLITVALUES) { + { + this.state = 311; + this.match(OpenSearchPPLParser.DEDUP_SPLITVALUES); + this.state = 312; + this.match(OpenSearchPPLParser.EQUAL); + this.state = 313; + _localctx._dedupsplit = this.booleanLiteral(); + } + } + + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public dedupCommand(): DedupCommandContext { + let _localctx: DedupCommandContext = new DedupCommandContext(this._ctx, this.state); + this.enterRule(_localctx, 22, OpenSearchPPLParser.RULE_dedupCommand); + let _la: number; + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 316; + this.match(OpenSearchPPLParser.DEDUP); + this.state = 318; + this._errHandler.sync(this); + _la = this._input.LA(1); + if (_la === OpenSearchPPLParser.PLUS || _la === OpenSearchPPLParser.MINUS || _la === OpenSearchPPLParser.INTEGER_LITERAL) { + { + this.state = 317; + _localctx._number = this.integerLiteral(); + } + } + + this.state = 320; + this.fieldList(); + this.state = 324; + this._errHandler.sync(this); + _la = this._input.LA(1); + if (_la === OpenSearchPPLParser.KEEPEMPTY) { + { + this.state = 321; + this.match(OpenSearchPPLParser.KEEPEMPTY); + this.state = 322; + this.match(OpenSearchPPLParser.EQUAL); + this.state = 323; + _localctx._keepempty = this.booleanLiteral(); + } + } + + this.state = 329; + this._errHandler.sync(this); + _la = this._input.LA(1); + if (_la === OpenSearchPPLParser.CONSECUTIVE) { + { + this.state = 326; + this.match(OpenSearchPPLParser.CONSECUTIVE); + this.state = 327; + this.match(OpenSearchPPLParser.EQUAL); + this.state = 328; + _localctx._consecutive = this.booleanLiteral(); + } + } + + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public sortCommand(): SortCommandContext { + let _localctx: SortCommandContext = new SortCommandContext(this._ctx, this.state); + this.enterRule(_localctx, 24, OpenSearchPPLParser.RULE_sortCommand); + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 331; + this.match(OpenSearchPPLParser.SORT); + this.state = 332; + this.sortbyClause(); + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public evalCommand(): EvalCommandContext { + let _localctx: EvalCommandContext = new EvalCommandContext(this._ctx, this.state); + this.enterRule(_localctx, 26, OpenSearchPPLParser.RULE_evalCommand); + let _la: number; + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 334; + this.match(OpenSearchPPLParser.EVAL); + this.state = 335; + this.evalClause(); + this.state = 340; + this._errHandler.sync(this); + _la = this._input.LA(1); + while (_la === OpenSearchPPLParser.COMMA) { + { + { + this.state = 336; + this.match(OpenSearchPPLParser.COMMA); + this.state = 337; + this.evalClause(); + } + } + this.state = 342; + this._errHandler.sync(this); + _la = this._input.LA(1); + } + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public headCommand(): HeadCommandContext { + let _localctx: HeadCommandContext = new HeadCommandContext(this._ctx, this.state); + this.enterRule(_localctx, 28, OpenSearchPPLParser.RULE_headCommand); + let _la: number; + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 343; + this.match(OpenSearchPPLParser.HEAD); + this.state = 345; + this._errHandler.sync(this); + _la = this._input.LA(1); + if (_la === OpenSearchPPLParser.PLUS || _la === OpenSearchPPLParser.MINUS || _la === OpenSearchPPLParser.INTEGER_LITERAL) { + { + this.state = 344; + _localctx._number = this.integerLiteral(); + } + } + + this.state = 349; + this._errHandler.sync(this); + _la = this._input.LA(1); + if (_la === OpenSearchPPLParser.FROM) { + { + this.state = 347; + this.match(OpenSearchPPLParser.FROM); + this.state = 348; + _localctx._from = this.integerLiteral(); + } + } + + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public topCommand(): TopCommandContext { + let _localctx: TopCommandContext = new TopCommandContext(this._ctx, this.state); + this.enterRule(_localctx, 30, OpenSearchPPLParser.RULE_topCommand); + let _la: number; + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 351; + this.match(OpenSearchPPLParser.TOP); + this.state = 353; + this._errHandler.sync(this); + _la = this._input.LA(1); + if (_la === OpenSearchPPLParser.PLUS || _la === OpenSearchPPLParser.MINUS || _la === OpenSearchPPLParser.INTEGER_LITERAL) { + { + this.state = 352; + _localctx._number = this.integerLiteral(); + } + } + + this.state = 355; + this.fieldList(); + this.state = 357; + this._errHandler.sync(this); + _la = this._input.LA(1); + if (_la === OpenSearchPPLParser.BY) { + { + this.state = 356; + this.byClause(); + } + } + + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public rareCommand(): RareCommandContext { + let _localctx: RareCommandContext = new RareCommandContext(this._ctx, this.state); + this.enterRule(_localctx, 32, OpenSearchPPLParser.RULE_rareCommand); + let _la: number; + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 359; + this.match(OpenSearchPPLParser.RARE); + this.state = 360; + this.fieldList(); + this.state = 362; + this._errHandler.sync(this); + _la = this._input.LA(1); + if (_la === OpenSearchPPLParser.BY) { + { + this.state = 361; + this.byClause(); + } + } + + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public grokCommand(): GrokCommandContext { + let _localctx: GrokCommandContext = new GrokCommandContext(this._ctx, this.state); + this.enterRule(_localctx, 34, OpenSearchPPLParser.RULE_grokCommand); + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 364; + this.match(OpenSearchPPLParser.GROK); + { + this.state = 365; + _localctx._source_field = this.expression(); + } + { + this.state = 366; + _localctx._pattern = this.stringLiteral(); + } + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public parseCommand(): ParseCommandContext { + let _localctx: ParseCommandContext = new ParseCommandContext(this._ctx, this.state); + this.enterRule(_localctx, 36, OpenSearchPPLParser.RULE_parseCommand); + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 368; + this.match(OpenSearchPPLParser.PARSE); + { + this.state = 369; + _localctx._source_field = this.expression(); + } + { + this.state = 370; + _localctx._pattern = this.stringLiteral(); + } + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public patternsCommand(): PatternsCommandContext { + let _localctx: PatternsCommandContext = new PatternsCommandContext(this._ctx, this.state); + this.enterRule(_localctx, 38, OpenSearchPPLParser.RULE_patternsCommand); + let _la: number; + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 372; + this.match(OpenSearchPPLParser.PATTERNS); + this.state = 376; + this._errHandler.sync(this); + _la = this._input.LA(1); + while (_la === OpenSearchPPLParser.PATTERN || _la === OpenSearchPPLParser.NEW_FIELD) { + { + { + this.state = 373; + this.patternsParameter(); + } + } + this.state = 378; + this._errHandler.sync(this); + _la = this._input.LA(1); + } + { + this.state = 379; + _localctx._source_field = this.expression(); + } + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public patternsParameter(): PatternsParameterContext { + let _localctx: PatternsParameterContext = new PatternsParameterContext(this._ctx, this.state); + this.enterRule(_localctx, 40, OpenSearchPPLParser.RULE_patternsParameter); + try { + this.state = 387; + this._errHandler.sync(this); + switch (this._input.LA(1)) { + case OpenSearchPPLParser.NEW_FIELD: + this.enterOuterAlt(_localctx, 1); + { + { + this.state = 381; + this.match(OpenSearchPPLParser.NEW_FIELD); + this.state = 382; + this.match(OpenSearchPPLParser.EQUAL); + this.state = 383; + _localctx._new_field = this.stringLiteral(); + } + } + break; + case OpenSearchPPLParser.PATTERN: + this.enterOuterAlt(_localctx, 2); + { + { + this.state = 384; + this.match(OpenSearchPPLParser.PATTERN); + this.state = 385; + this.match(OpenSearchPPLParser.EQUAL); + this.state = 386; + _localctx._pattern = this.stringLiteral(); + } + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public patternsMethod(): PatternsMethodContext { + let _localctx: PatternsMethodContext = new PatternsMethodContext(this._ctx, this.state); + this.enterRule(_localctx, 42, OpenSearchPPLParser.RULE_patternsMethod); + let _la: number; + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 389; + _la = this._input.LA(1); + if (!(_la === OpenSearchPPLParser.REGEX || _la === OpenSearchPPLParser.PUNCT)) { + this._errHandler.recoverInline(this); + } else { + if (this._input.LA(1) === Token.EOF) { + this.matchedEOF = true; + } + + this._errHandler.reportMatch(this); + this.consume(); + } + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public kmeansCommand(): KmeansCommandContext { + let _localctx: KmeansCommandContext = new KmeansCommandContext(this._ctx, this.state); + this.enterRule(_localctx, 44, OpenSearchPPLParser.RULE_kmeansCommand); + let _la: number; + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 391; + this.match(OpenSearchPPLParser.KMEANS); + this.state = 395; + this._errHandler.sync(this); + _la = this._input.LA(1); + while (((((_la - 44)) & ~0x1F) === 0 && ((1 << (_la - 44)) & ((1 << (OpenSearchPPLParser.CENTROIDS - 44)) | (1 << (OpenSearchPPLParser.ITERATIONS - 44)) | (1 << (OpenSearchPPLParser.DISTANCE_TYPE - 44)))) !== 0)) { + { + { + this.state = 392; + this.kmeansParameter(); + } + } + this.state = 397; + this._errHandler.sync(this); + _la = this._input.LA(1); + } + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public kmeansParameter(): KmeansParameterContext { + let _localctx: KmeansParameterContext = new KmeansParameterContext(this._ctx, this.state); + this.enterRule(_localctx, 46, OpenSearchPPLParser.RULE_kmeansParameter); + try { + this.state = 407; + this._errHandler.sync(this); + switch (this._input.LA(1)) { + case OpenSearchPPLParser.CENTROIDS: + this.enterOuterAlt(_localctx, 1); + { + { + this.state = 398; + this.match(OpenSearchPPLParser.CENTROIDS); + this.state = 399; + this.match(OpenSearchPPLParser.EQUAL); + this.state = 400; + _localctx._centroids = this.integerLiteral(); + } + } + break; + case OpenSearchPPLParser.ITERATIONS: + this.enterOuterAlt(_localctx, 2); + { + { + this.state = 401; + this.match(OpenSearchPPLParser.ITERATIONS); + this.state = 402; + this.match(OpenSearchPPLParser.EQUAL); + this.state = 403; + _localctx._iterations = this.integerLiteral(); + } + } + break; + case OpenSearchPPLParser.DISTANCE_TYPE: + this.enterOuterAlt(_localctx, 3); + { + { + this.state = 404; + this.match(OpenSearchPPLParser.DISTANCE_TYPE); + this.state = 405; + this.match(OpenSearchPPLParser.EQUAL); + this.state = 406; + _localctx._distance_type = this.stringLiteral(); + } + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public adCommand(): AdCommandContext { + let _localctx: AdCommandContext = new AdCommandContext(this._ctx, this.state); + this.enterRule(_localctx, 48, OpenSearchPPLParser.RULE_adCommand); + let _la: number; + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 409; + this.match(OpenSearchPPLParser.AD); + this.state = 413; + this._errHandler.sync(this); + _la = this._input.LA(1); + while (((((_la - 47)) & ~0x1F) === 0 && ((1 << (_la - 47)) & ((1 << (OpenSearchPPLParser.NUMBER_OF_TREES - 47)) | (1 << (OpenSearchPPLParser.SHINGLE_SIZE - 47)) | (1 << (OpenSearchPPLParser.SAMPLE_SIZE - 47)) | (1 << (OpenSearchPPLParser.OUTPUT_AFTER - 47)) | (1 << (OpenSearchPPLParser.TIME_DECAY - 47)) | (1 << (OpenSearchPPLParser.ANOMALY_RATE - 47)) | (1 << (OpenSearchPPLParser.CATEGORY_FIELD - 47)) | (1 << (OpenSearchPPLParser.TIME_FIELD - 47)) | (1 << (OpenSearchPPLParser.TIME_ZONE - 47)) | (1 << (OpenSearchPPLParser.TRAINING_DATA_SIZE - 47)) | (1 << (OpenSearchPPLParser.ANOMALY_SCORE_THRESHOLD - 47)))) !== 0) || _la === OpenSearchPPLParser.DATE_FORMAT) { + { + { + this.state = 410; + this.adParameter(); + } + } + this.state = 415; + this._errHandler.sync(this); + _la = this._input.LA(1); + } + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public adParameter(): AdParameterContext { + let _localctx: AdParameterContext = new AdParameterContext(this._ctx, this.state); + this.enterRule(_localctx, 50, OpenSearchPPLParser.RULE_adParameter); + try { + this.state = 452; + this._errHandler.sync(this); + switch (this._input.LA(1)) { + case OpenSearchPPLParser.NUMBER_OF_TREES: + this.enterOuterAlt(_localctx, 1); + { + { + this.state = 416; + this.match(OpenSearchPPLParser.NUMBER_OF_TREES); + this.state = 417; + this.match(OpenSearchPPLParser.EQUAL); + this.state = 418; + _localctx._number_of_trees = this.integerLiteral(); + } + } + break; + case OpenSearchPPLParser.SHINGLE_SIZE: + this.enterOuterAlt(_localctx, 2); + { + { + this.state = 419; + this.match(OpenSearchPPLParser.SHINGLE_SIZE); + this.state = 420; + this.match(OpenSearchPPLParser.EQUAL); + this.state = 421; + _localctx._shingle_size = this.integerLiteral(); + } + } + break; + case OpenSearchPPLParser.SAMPLE_SIZE: + this.enterOuterAlt(_localctx, 3); + { + { + this.state = 422; + this.match(OpenSearchPPLParser.SAMPLE_SIZE); + this.state = 423; + this.match(OpenSearchPPLParser.EQUAL); + this.state = 424; + _localctx._sample_size = this.integerLiteral(); + } + } + break; + case OpenSearchPPLParser.OUTPUT_AFTER: + this.enterOuterAlt(_localctx, 4); + { + { + this.state = 425; + this.match(OpenSearchPPLParser.OUTPUT_AFTER); + this.state = 426; + this.match(OpenSearchPPLParser.EQUAL); + this.state = 427; + _localctx._output_after = this.integerLiteral(); + } + } + break; + case OpenSearchPPLParser.TIME_DECAY: + this.enterOuterAlt(_localctx, 5); + { + { + this.state = 428; + this.match(OpenSearchPPLParser.TIME_DECAY); + this.state = 429; + this.match(OpenSearchPPLParser.EQUAL); + this.state = 430; + _localctx._time_decay = this.decimalLiteral(); + } + } + break; + case OpenSearchPPLParser.ANOMALY_RATE: + this.enterOuterAlt(_localctx, 6); + { + { + this.state = 431; + this.match(OpenSearchPPLParser.ANOMALY_RATE); + this.state = 432; + this.match(OpenSearchPPLParser.EQUAL); + this.state = 433; + _localctx._anomaly_rate = this.decimalLiteral(); + } + } + break; + case OpenSearchPPLParser.CATEGORY_FIELD: + this.enterOuterAlt(_localctx, 7); + { + { + this.state = 434; + this.match(OpenSearchPPLParser.CATEGORY_FIELD); + this.state = 435; + this.match(OpenSearchPPLParser.EQUAL); + this.state = 436; + _localctx._category_field = this.stringLiteral(); + } + } + break; + case OpenSearchPPLParser.TIME_FIELD: + this.enterOuterAlt(_localctx, 8); + { + { + this.state = 437; + this.match(OpenSearchPPLParser.TIME_FIELD); + this.state = 438; + this.match(OpenSearchPPLParser.EQUAL); + this.state = 439; + _localctx._time_field = this.stringLiteral(); + } + } + break; + case OpenSearchPPLParser.DATE_FORMAT: + this.enterOuterAlt(_localctx, 9); + { + { + this.state = 440; + this.match(OpenSearchPPLParser.DATE_FORMAT); + this.state = 441; + this.match(OpenSearchPPLParser.EQUAL); + this.state = 442; + _localctx._date_format = this.stringLiteral(); + } + } + break; + case OpenSearchPPLParser.TIME_ZONE: + this.enterOuterAlt(_localctx, 10); + { + { + this.state = 443; + this.match(OpenSearchPPLParser.TIME_ZONE); + this.state = 444; + this.match(OpenSearchPPLParser.EQUAL); + this.state = 445; + _localctx._time_zone = this.stringLiteral(); + } + } + break; + case OpenSearchPPLParser.TRAINING_DATA_SIZE: + this.enterOuterAlt(_localctx, 11); + { + { + this.state = 446; + this.match(OpenSearchPPLParser.TRAINING_DATA_SIZE); + this.state = 447; + this.match(OpenSearchPPLParser.EQUAL); + this.state = 448; + _localctx._training_data_size = this.integerLiteral(); + } + } + break; + case OpenSearchPPLParser.ANOMALY_SCORE_THRESHOLD: + this.enterOuterAlt(_localctx, 12); + { + { + this.state = 449; + this.match(OpenSearchPPLParser.ANOMALY_SCORE_THRESHOLD); + this.state = 450; + this.match(OpenSearchPPLParser.EQUAL); + this.state = 451; + _localctx._anomaly_score_threshold = this.decimalLiteral(); + } + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public mlCommand(): MlCommandContext { + let _localctx: MlCommandContext = new MlCommandContext(this._ctx, this.state); + this.enterRule(_localctx, 52, OpenSearchPPLParser.RULE_mlCommand); + let _la: number; + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 454; + this.match(OpenSearchPPLParser.ML); + this.state = 458; + this._errHandler.sync(this); + _la = this._input.LA(1); + while (_la === OpenSearchPPLParser.D || ((((_la - 67)) & ~0x1F) === 0 && ((1 << (_la - 67)) & ((1 << (OpenSearchPPLParser.DATETIME - 67)) | (1 << (OpenSearchPPLParser.MICROSECOND - 67)) | (1 << (OpenSearchPPLParser.MILLISECOND - 67)) | (1 << (OpenSearchPPLParser.SECOND - 67)) | (1 << (OpenSearchPPLParser.MINUTE - 67)) | (1 << (OpenSearchPPLParser.HOUR - 67)) | (1 << (OpenSearchPPLParser.DAY - 67)) | (1 << (OpenSearchPPLParser.WEEK - 67)) | (1 << (OpenSearchPPLParser.MONTH - 67)) | (1 << (OpenSearchPPLParser.QUARTER - 67)) | (1 << (OpenSearchPPLParser.YEAR - 67)) | (1 << (OpenSearchPPLParser.CONVERT_TZ - 67)))) !== 0) || ((((_la - 103)) & ~0x1F) === 0 && ((1 << (_la - 103)) & ((1 << (OpenSearchPPLParser.DOT - 103)) | (1 << (OpenSearchPPLParser.BACKTICK - 103)) | (1 << (OpenSearchPPLParser.AVG - 103)) | (1 << (OpenSearchPPLParser.COUNT - 103)) | (1 << (OpenSearchPPLParser.MAX - 103)))) !== 0) || ((((_la - 135)) & ~0x1F) === 0 && ((1 << (_la - 135)) & ((1 << (OpenSearchPPLParser.MIN - 135)) | (1 << (OpenSearchPPLParser.SUM - 135)) | (1 << (OpenSearchPPLParser.VAR_SAMP - 135)) | (1 << (OpenSearchPPLParser.VAR_POP - 135)) | (1 << (OpenSearchPPLParser.STDDEV_SAMP - 135)) | (1 << (OpenSearchPPLParser.STDDEV_POP - 135)) | (1 << (OpenSearchPPLParser.FIRST - 135)) | (1 << (OpenSearchPPLParser.LAST - 135)) | (1 << (OpenSearchPPLParser.ABS - 135)) | (1 << (OpenSearchPPLParser.CEIL - 135)) | (1 << (OpenSearchPPLParser.CEILING - 135)))) !== 0) || ((((_la - 167)) & ~0x1F) === 0 && ((1 << (_la - 167)) & ((1 << (OpenSearchPPLParser.CONV - 167)) | (1 << (OpenSearchPPLParser.CRC32 - 167)) | (1 << (OpenSearchPPLParser.E - 167)) | (1 << (OpenSearchPPLParser.EXP - 167)) | (1 << (OpenSearchPPLParser.FLOOR - 167)) | (1 << (OpenSearchPPLParser.LN - 167)) | (1 << (OpenSearchPPLParser.LOG - 167)) | (1 << (OpenSearchPPLParser.LOG10 - 167)) | (1 << (OpenSearchPPLParser.LOG2 - 167)) | (1 << (OpenSearchPPLParser.MOD - 167)) | (1 << (OpenSearchPPLParser.PI - 167)) | (1 << (OpenSearchPPLParser.POW - 167)) | (1 << (OpenSearchPPLParser.POWER - 167)) | (1 << (OpenSearchPPLParser.RAND - 167)) | (1 << (OpenSearchPPLParser.ROUND - 167)) | (1 << (OpenSearchPPLParser.SIGN - 167)) | (1 << (OpenSearchPPLParser.SQRT - 167)) | (1 << (OpenSearchPPLParser.TRUNCATE - 167)) | (1 << (OpenSearchPPLParser.ACOS - 167)) | (1 << (OpenSearchPPLParser.ASIN - 167)) | (1 << (OpenSearchPPLParser.ATAN - 167)) | (1 << (OpenSearchPPLParser.ATAN2 - 167)) | (1 << (OpenSearchPPLParser.COS - 167)) | (1 << (OpenSearchPPLParser.COT - 167)) | (1 << (OpenSearchPPLParser.DEGREES - 167)) | (1 << (OpenSearchPPLParser.RADIANS - 167)) | (1 << (OpenSearchPPLParser.SIN - 167)) | (1 << (OpenSearchPPLParser.TAN - 167)) | (1 << (OpenSearchPPLParser.ADDDATE - 167)) | (1 << (OpenSearchPPLParser.CURDATE - 167)) | (1 << (OpenSearchPPLParser.CURRENT_DATE - 167)) | (1 << (OpenSearchPPLParser.CURRENT_TIME - 167)))) !== 0) || ((((_la - 199)) & ~0x1F) === 0 && ((1 << (_la - 199)) & ((1 << (OpenSearchPPLParser.CURRENT_TIMESTAMP - 199)) | (1 << (OpenSearchPPLParser.CURTIME - 199)) | (1 << (OpenSearchPPLParser.DATE - 199)) | (1 << (OpenSearchPPLParser.DATE_ADD - 199)) | (1 << (OpenSearchPPLParser.DATE_FORMAT - 199)) | (1 << (OpenSearchPPLParser.DATE_SUB - 199)) | (1 << (OpenSearchPPLParser.DAYNAME - 199)) | (1 << (OpenSearchPPLParser.DAYOFMONTH - 199)) | (1 << (OpenSearchPPLParser.DAYOFWEEK - 199)) | (1 << (OpenSearchPPLParser.DAYOFYEAR - 199)) | (1 << (OpenSearchPPLParser.FROM_DAYS - 199)) | (1 << (OpenSearchPPLParser.LOCALTIME - 199)) | (1 << (OpenSearchPPLParser.LOCALTIMESTAMP - 199)) | (1 << (OpenSearchPPLParser.FROM_UNIXTIME - 199)) | (1 << (OpenSearchPPLParser.MAKEDATE - 199)) | (1 << (OpenSearchPPLParser.MAKETIME - 199)) | (1 << (OpenSearchPPLParser.MONTHNAME - 199)) | (1 << (OpenSearchPPLParser.NOW - 199)) | (1 << (OpenSearchPPLParser.PERIOD_ADD - 199)) | (1 << (OpenSearchPPLParser.PERIOD_DIFF - 199)) | (1 << (OpenSearchPPLParser.SUBDATE - 199)) | (1 << (OpenSearchPPLParser.SYSDATE - 199)) | (1 << (OpenSearchPPLParser.TIME - 199)) | (1 << (OpenSearchPPLParser.TIME_TO_SEC - 199)) | (1 << (OpenSearchPPLParser.TIMESTAMP - 199)) | (1 << (OpenSearchPPLParser.TO_DAYS - 199)) | (1 << (OpenSearchPPLParser.UTC_DATE - 199)) | (1 << (OpenSearchPPLParser.UTC_TIME - 199)) | (1 << (OpenSearchPPLParser.UTC_TIMESTAMP - 199)) | (1 << (OpenSearchPPLParser.UNIX_TIMESTAMP - 199)) | (1 << (OpenSearchPPLParser.SUBSTR - 199)) | (1 << (OpenSearchPPLParser.SUBSTRING - 199)))) !== 0) || ((((_la - 231)) & ~0x1F) === 0 && ((1 << (_la - 231)) & ((1 << (OpenSearchPPLParser.LTRIM - 231)) | (1 << (OpenSearchPPLParser.RTRIM - 231)) | (1 << (OpenSearchPPLParser.TRIM - 231)) | (1 << (OpenSearchPPLParser.LOWER - 231)) | (1 << (OpenSearchPPLParser.UPPER - 231)) | (1 << (OpenSearchPPLParser.CONCAT - 231)) | (1 << (OpenSearchPPLParser.CONCAT_WS - 231)) | (1 << (OpenSearchPPLParser.LENGTH - 231)) | (1 << (OpenSearchPPLParser.STRCMP - 231)) | (1 << (OpenSearchPPLParser.RIGHT - 231)) | (1 << (OpenSearchPPLParser.LEFT - 231)) | (1 << (OpenSearchPPLParser.ASCII - 231)) | (1 << (OpenSearchPPLParser.LOCATE - 231)) | (1 << (OpenSearchPPLParser.REPLACE - 231)))) !== 0) || ((((_la - 292)) & ~0x1F) === 0 && ((1 << (_la - 292)) & ((1 << (OpenSearchPPLParser.SPAN - 292)) | (1 << (OpenSearchPPLParser.MS - 292)) | (1 << (OpenSearchPPLParser.S - 292)) | (1 << (OpenSearchPPLParser.M - 292)) | (1 << (OpenSearchPPLParser.H - 292)) | (1 << (OpenSearchPPLParser.W - 292)) | (1 << (OpenSearchPPLParser.Q - 292)) | (1 << (OpenSearchPPLParser.Y - 292)) | (1 << (OpenSearchPPLParser.ID - 292)) | (1 << (OpenSearchPPLParser.BQUOTA_STRING - 292)))) !== 0)) { + { + { + this.state = 455; + this.mlArg(); + } + } + this.state = 460; + this._errHandler.sync(this); + _la = this._input.LA(1); + } + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public mlArg(): MlArgContext { + let _localctx: MlArgContext = new MlArgContext(this._ctx, this.state); + this.enterRule(_localctx, 54, OpenSearchPPLParser.RULE_mlArg); + try { + this.enterOuterAlt(_localctx, 1); + { + { + this.state = 461; + _localctx._argName = this.ident(); + this.state = 462; + this.match(OpenSearchPPLParser.EQUAL); + this.state = 463; + _localctx._argValue = this.literalValue(); + } + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public fromClause(): FromClauseContext { + let _localctx: FromClauseContext = new FromClauseContext(this._ctx, this.state); + this.enterRule(_localctx, 56, OpenSearchPPLParser.RULE_fromClause); + try { + this.state = 477; + this._errHandler.sync(this); + switch ( this.interpreter.adaptivePredict(this._input, 32, this._ctx) ) { + case 1: + this.enterOuterAlt(_localctx, 1); + { + this.state = 465; + this.match(OpenSearchPPLParser.SOURCE); + this.state = 466; + this.match(OpenSearchPPLParser.EQUAL); + this.state = 467; + this.tableSourceClause(); + } + break; + + case 2: + this.enterOuterAlt(_localctx, 2); + { + this.state = 468; + this.match(OpenSearchPPLParser.INDEX); + this.state = 469; + this.match(OpenSearchPPLParser.EQUAL); + this.state = 470; + this.tableSourceClause(); + } + break; + + case 3: + this.enterOuterAlt(_localctx, 3); + { + this.state = 471; + this.match(OpenSearchPPLParser.SOURCE); + this.state = 472; + this.match(OpenSearchPPLParser.EQUAL); + this.state = 473; + this.tableFunction(); + } + break; + + case 4: + this.enterOuterAlt(_localctx, 4); + { + this.state = 474; + this.match(OpenSearchPPLParser.INDEX); + this.state = 475; + this.match(OpenSearchPPLParser.EQUAL); + this.state = 476; + this.tableFunction(); + } + break; + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public tableSourceClause(): TableSourceClauseContext { + let _localctx: TableSourceClauseContext = new TableSourceClauseContext(this._ctx, this.state); + this.enterRule(_localctx, 58, OpenSearchPPLParser.RULE_tableSourceClause); + let _la: number; + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 479; + this.tableSource(); + this.state = 484; + this._errHandler.sync(this); + _la = this._input.LA(1); + while (_la === OpenSearchPPLParser.COMMA) { + { + { + this.state = 480; + this.match(OpenSearchPPLParser.COMMA); + this.state = 481; + this.tableSource(); + } + } + this.state = 486; + this._errHandler.sync(this); + _la = this._input.LA(1); + } + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public renameClasue(): RenameClasueContext { + let _localctx: RenameClasueContext = new RenameClasueContext(this._ctx, this.state); + this.enterRule(_localctx, 60, OpenSearchPPLParser.RULE_renameClasue); + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 487; + _localctx._orignalField = this.wcFieldExpression(); + this.state = 488; + this.match(OpenSearchPPLParser.AS); + this.state = 489; + _localctx._renamedField = this.wcFieldExpression(); + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public byClause(): ByClauseContext { + let _localctx: ByClauseContext = new ByClauseContext(this._ctx, this.state); + this.enterRule(_localctx, 62, OpenSearchPPLParser.RULE_byClause); + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 491; + this.match(OpenSearchPPLParser.BY); + this.state = 492; + this.fieldList(); + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public statsByClause(): StatsByClauseContext { + let _localctx: StatsByClauseContext = new StatsByClauseContext(this._ctx, this.state); + this.enterRule(_localctx, 64, OpenSearchPPLParser.RULE_statsByClause); + try { + this.state = 503; + this._errHandler.sync(this); + switch ( this.interpreter.adaptivePredict(this._input, 34, this._ctx) ) { + case 1: + this.enterOuterAlt(_localctx, 1); + { + this.state = 494; + this.match(OpenSearchPPLParser.BY); + this.state = 495; + this.fieldList(); + } + break; + + case 2: + this.enterOuterAlt(_localctx, 2); + { + this.state = 496; + this.match(OpenSearchPPLParser.BY); + this.state = 497; + this.bySpanClause(); + } + break; + + case 3: + this.enterOuterAlt(_localctx, 3); + { + this.state = 498; + this.match(OpenSearchPPLParser.BY); + this.state = 499; + this.bySpanClause(); + this.state = 500; + this.match(OpenSearchPPLParser.COMMA); + this.state = 501; + this.fieldList(); + } + break; + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public bySpanClause(): BySpanClauseContext { + let _localctx: BySpanClauseContext = new BySpanClauseContext(this._ctx, this.state); + this.enterRule(_localctx, 66, OpenSearchPPLParser.RULE_bySpanClause); + let _la: number; + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 505; + this.spanClause(); + this.state = 508; + this._errHandler.sync(this); + _la = this._input.LA(1); + if (_la === OpenSearchPPLParser.AS) { + { + this.state = 506; + this.match(OpenSearchPPLParser.AS); + this.state = 507; + _localctx._alias = this.qualifiedName(); + } + } + + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public spanClause(): SpanClauseContext { + let _localctx: SpanClauseContext = new SpanClauseContext(this._ctx, this.state); + this.enterRule(_localctx, 68, OpenSearchPPLParser.RULE_spanClause); + let _la: number; + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 510; + this.match(OpenSearchPPLParser.SPAN); + this.state = 511; + this.match(OpenSearchPPLParser.LT_PRTHS); + this.state = 512; + this.fieldExpression(); + this.state = 513; + this.match(OpenSearchPPLParser.COMMA); + this.state = 514; + _localctx._value = this.literalValue(); + this.state = 516; + this._errHandler.sync(this); + _la = this._input.LA(1); + if (_la === OpenSearchPPLParser.D || ((((_la - 70)) & ~0x1F) === 0 && ((1 << (_la - 70)) & ((1 << (OpenSearchPPLParser.MILLISECOND - 70)) | (1 << (OpenSearchPPLParser.SECOND - 70)) | (1 << (OpenSearchPPLParser.MINUTE - 70)) | (1 << (OpenSearchPPLParser.HOUR - 70)) | (1 << (OpenSearchPPLParser.DAY - 70)) | (1 << (OpenSearchPPLParser.WEEK - 70)) | (1 << (OpenSearchPPLParser.MONTH - 70)) | (1 << (OpenSearchPPLParser.QUARTER - 70)) | (1 << (OpenSearchPPLParser.YEAR - 70)))) !== 0) || ((((_la - 293)) & ~0x1F) === 0 && ((1 << (_la - 293)) & ((1 << (OpenSearchPPLParser.MS - 293)) | (1 << (OpenSearchPPLParser.S - 293)) | (1 << (OpenSearchPPLParser.M - 293)) | (1 << (OpenSearchPPLParser.H - 293)) | (1 << (OpenSearchPPLParser.W - 293)) | (1 << (OpenSearchPPLParser.Q - 293)) | (1 << (OpenSearchPPLParser.Y - 293)))) !== 0)) { + { + this.state = 515; + _localctx._unit = this.timespanUnit(); + } + } + + this.state = 518; + this.match(OpenSearchPPLParser.RT_PRTHS); + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public sortbyClause(): SortbyClauseContext { + let _localctx: SortbyClauseContext = new SortbyClauseContext(this._ctx, this.state); + this.enterRule(_localctx, 70, OpenSearchPPLParser.RULE_sortbyClause); + let _la: number; + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 520; + this.sortField(); + this.state = 525; + this._errHandler.sync(this); + _la = this._input.LA(1); + while (_la === OpenSearchPPLParser.COMMA) { + { + { + this.state = 521; + this.match(OpenSearchPPLParser.COMMA); + this.state = 522; + this.sortField(); + } + } + this.state = 527; + this._errHandler.sync(this); + _la = this._input.LA(1); + } + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public evalClause(): EvalClauseContext { + let _localctx: EvalClauseContext = new EvalClauseContext(this._ctx, this.state); + this.enterRule(_localctx, 72, OpenSearchPPLParser.RULE_evalClause); + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 528; + this.fieldExpression(); + this.state = 529; + this.match(OpenSearchPPLParser.EQUAL); + this.state = 530; + this.expression(); + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public statsAggTerm(): StatsAggTermContext { + let _localctx: StatsAggTermContext = new StatsAggTermContext(this._ctx, this.state); + this.enterRule(_localctx, 74, OpenSearchPPLParser.RULE_statsAggTerm); + let _la: number; + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 532; + this.statsFunction(); + this.state = 535; + this._errHandler.sync(this); + _la = this._input.LA(1); + if (_la === OpenSearchPPLParser.AS) { + { + this.state = 533; + this.match(OpenSearchPPLParser.AS); + this.state = 534; + _localctx._alias = this.wcFieldExpression(); + } + } + + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public statsFunction(): StatsFunctionContext { + let _localctx: StatsFunctionContext = new StatsFunctionContext(this._ctx, this.state); + this.enterRule(_localctx, 76, OpenSearchPPLParser.RULE_statsFunction); + let _la: number; + try { + this.state = 552; + this._errHandler.sync(this); + switch ( this.interpreter.adaptivePredict(this._input, 39, this._ctx) ) { + case 1: + _localctx = new StatsFunctionCallContext(_localctx); + this.enterOuterAlt(_localctx, 1); + { + this.state = 537; + this.statsFunctionName(); + this.state = 538; + this.match(OpenSearchPPLParser.LT_PRTHS); + this.state = 539; + this.valueExpression(0); + this.state = 540; + this.match(OpenSearchPPLParser.RT_PRTHS); + } + break; + + case 2: + _localctx = new CountAllFunctionCallContext(_localctx); + this.enterOuterAlt(_localctx, 2); + { + this.state = 542; + this.match(OpenSearchPPLParser.COUNT); + this.state = 543; + this.match(OpenSearchPPLParser.LT_PRTHS); + this.state = 544; + this.match(OpenSearchPPLParser.RT_PRTHS); + } + break; + + case 3: + _localctx = new DistinctCountFunctionCallContext(_localctx); + this.enterOuterAlt(_localctx, 3); + { + this.state = 545; + _la = this._input.LA(1); + if (!(_la === OpenSearchPPLParser.DISTINCT_COUNT || _la === OpenSearchPPLParser.DC)) { + this._errHandler.recoverInline(this); + } else { + if (this._input.LA(1) === Token.EOF) { + this.matchedEOF = true; + } + + this._errHandler.reportMatch(this); + this.consume(); + } + this.state = 546; + this.match(OpenSearchPPLParser.LT_PRTHS); + this.state = 547; + this.valueExpression(0); + this.state = 548; + this.match(OpenSearchPPLParser.RT_PRTHS); + } + break; + + case 4: + _localctx = new PercentileAggFunctionCallContext(_localctx); + this.enterOuterAlt(_localctx, 4); + { + this.state = 550; + this.percentileAggFunction(); + } + break; + + case 5: + _localctx = new TakeAggFunctionCallContext(_localctx); + this.enterOuterAlt(_localctx, 5); + { + this.state = 551; + this.takeAggFunction(); + } + break; + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public statsFunctionName(): StatsFunctionNameContext { + let _localctx: StatsFunctionNameContext = new StatsFunctionNameContext(this._ctx, this.state); + this.enterRule(_localctx, 78, OpenSearchPPLParser.RULE_statsFunctionName); + let _la: number; + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 554; + _la = this._input.LA(1); + if (!(((((_la - 127)) & ~0x1F) === 0 && ((1 << (_la - 127)) & ((1 << (OpenSearchPPLParser.AVG - 127)) | (1 << (OpenSearchPPLParser.COUNT - 127)) | (1 << (OpenSearchPPLParser.MAX - 127)) | (1 << (OpenSearchPPLParser.MIN - 127)) | (1 << (OpenSearchPPLParser.SUM - 127)) | (1 << (OpenSearchPPLParser.VAR_SAMP - 127)) | (1 << (OpenSearchPPLParser.VAR_POP - 127)) | (1 << (OpenSearchPPLParser.STDDEV_SAMP - 127)) | (1 << (OpenSearchPPLParser.STDDEV_POP - 127)))) !== 0))) { + this._errHandler.recoverInline(this); + } else { + if (this._input.LA(1) === Token.EOF) { + this.matchedEOF = true; + } + + this._errHandler.reportMatch(this); + this.consume(); + } + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public takeAggFunction(): TakeAggFunctionContext { + let _localctx: TakeAggFunctionContext = new TakeAggFunctionContext(this._ctx, this.state); + this.enterRule(_localctx, 80, OpenSearchPPLParser.RULE_takeAggFunction); + let _la: number; + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 556; + this.match(OpenSearchPPLParser.TAKE); + this.state = 557; + this.match(OpenSearchPPLParser.LT_PRTHS); + this.state = 558; + this.fieldExpression(); + this.state = 561; + this._errHandler.sync(this); + _la = this._input.LA(1); + if (_la === OpenSearchPPLParser.COMMA) { + { + this.state = 559; + this.match(OpenSearchPPLParser.COMMA); + this.state = 560; + _localctx._size = this.integerLiteral(); + } + } + + this.state = 563; + this.match(OpenSearchPPLParser.RT_PRTHS); + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public percentileAggFunction(): PercentileAggFunctionContext { + let _localctx: PercentileAggFunctionContext = new PercentileAggFunctionContext(this._ctx, this.state); + this.enterRule(_localctx, 82, OpenSearchPPLParser.RULE_percentileAggFunction); + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 565; + this.match(OpenSearchPPLParser.PERCENTILE); + this.state = 566; + this.match(OpenSearchPPLParser.LESS); + this.state = 567; + _localctx._value = this.integerLiteral(); + this.state = 568; + this.match(OpenSearchPPLParser.GREATER); + this.state = 569; + this.match(OpenSearchPPLParser.LT_PRTHS); + this.state = 570; + _localctx._aggField = this.fieldExpression(); + this.state = 571; + this.match(OpenSearchPPLParser.RT_PRTHS); + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public expression(): ExpressionContext { + let _localctx: ExpressionContext = new ExpressionContext(this._ctx, this.state); + this.enterRule(_localctx, 84, OpenSearchPPLParser.RULE_expression); + try { + this.state = 576; + this._errHandler.sync(this); + switch ( this.interpreter.adaptivePredict(this._input, 41, this._ctx) ) { + case 1: + this.enterOuterAlt(_localctx, 1); + { + this.state = 573; + this.logicalExpression(0); + } + break; + + case 2: + this.enterOuterAlt(_localctx, 2); + { + this.state = 574; + this.comparisonExpression(); + } + break; + + case 3: + this.enterOuterAlt(_localctx, 3); + { + this.state = 575; + this.valueExpression(0); + } + break; + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + + public logicalExpression(): LogicalExpressionContext; + public logicalExpression(_p: number): LogicalExpressionContext; + // @RuleVersion(0) + public logicalExpression(_p?: number): LogicalExpressionContext { + if (_p === undefined) { + _p = 0; + } + + let _parentctx: ParserRuleContext = this._ctx; + let _parentState: number = this.state; + let _localctx: LogicalExpressionContext = new LogicalExpressionContext(this._ctx, _parentState); + let _prevctx: LogicalExpressionContext = _localctx; + let _startState: number = 86; + this.enterRecursionRule(_localctx, 86, OpenSearchPPLParser.RULE_logicalExpression, _p); + let _la: number; + try { + let _alt: number; + this.enterOuterAlt(_localctx, 1); + { + this.state = 584; + this._errHandler.sync(this); + switch ( this.interpreter.adaptivePredict(this._input, 42, this._ctx) ) { + case 1: + { + _localctx = new ComparsionContext(_localctx); + this._ctx = _localctx; + _prevctx = _localctx; + + this.state = 579; + this.comparisonExpression(); + } + break; + + case 2: + { + _localctx = new LogicalNotContext(_localctx); + this._ctx = _localctx; + _prevctx = _localctx; + this.state = 580; + this.match(OpenSearchPPLParser.NOT); + this.state = 581; + this.logicalExpression(6); + } + break; + + case 3: + { + _localctx = new BooleanExprContext(_localctx); + this._ctx = _localctx; + _prevctx = _localctx; + this.state = 582; + this.booleanExpression(); + } + break; + + case 4: + { + _localctx = new RelevanceExprContext(_localctx); + this._ctx = _localctx; + _prevctx = _localctx; + this.state = 583; + this.relevanceExpression(); + } + break; + } + this._ctx._stop = this._input.tryLT(-1); + this.state = 599; + this._errHandler.sync(this); + _alt = this.interpreter.adaptivePredict(this._input, 45, this._ctx); + while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { + if (_alt === 1) { + if (this._parseListeners != null) { + this.triggerExitRuleEvent(); + } + _prevctx = _localctx; + { + this.state = 597; + this._errHandler.sync(this); + switch ( this.interpreter.adaptivePredict(this._input, 44, this._ctx) ) { + case 1: + { + _localctx = new LogicalOrContext(new LogicalExpressionContext(_parentctx, _parentState)); + (_localctx as LogicalOrContext)._left = _prevctx; + this.pushNewRecursionContext(_localctx, _startState, OpenSearchPPLParser.RULE_logicalExpression); + this.state = 586; + if (!(this.precpred(this._ctx, 5))) { + throw this.createFailedPredicateException("this.precpred(this._ctx, 5)"); + } + this.state = 587; + this.match(OpenSearchPPLParser.OR); + this.state = 588; + (_localctx as LogicalOrContext)._right = this.logicalExpression(6); + } + break; + + case 2: + { + _localctx = new LogicalAndContext(new LogicalExpressionContext(_parentctx, _parentState)); + (_localctx as LogicalAndContext)._left = _prevctx; + this.pushNewRecursionContext(_localctx, _startState, OpenSearchPPLParser.RULE_logicalExpression); + this.state = 589; + if (!(this.precpred(this._ctx, 4))) { + throw this.createFailedPredicateException("this.precpred(this._ctx, 4)"); + } + this.state = 591; + this._errHandler.sync(this); + _la = this._input.LA(1); + if (_la === OpenSearchPPLParser.AND) { + { + this.state = 590; + this.match(OpenSearchPPLParser.AND); + } + } + + this.state = 593; + (_localctx as LogicalAndContext)._right = this.logicalExpression(5); + } + break; + + case 3: + { + _localctx = new LogicalXorContext(new LogicalExpressionContext(_parentctx, _parentState)); + (_localctx as LogicalXorContext)._left = _prevctx; + this.pushNewRecursionContext(_localctx, _startState, OpenSearchPPLParser.RULE_logicalExpression); + this.state = 594; + if (!(this.precpred(this._ctx, 3))) { + throw this.createFailedPredicateException("this.precpred(this._ctx, 3)"); + } + this.state = 595; + this.match(OpenSearchPPLParser.XOR); + this.state = 596; + (_localctx as LogicalXorContext)._right = this.logicalExpression(4); + } + break; + } + } + } + this.state = 601; + this._errHandler.sync(this); + _alt = this.interpreter.adaptivePredict(this._input, 45, this._ctx); + } + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.unrollRecursionContexts(_parentctx); + } + return _localctx; + } + // @RuleVersion(0) + public comparisonExpression(): ComparisonExpressionContext { + let _localctx: ComparisonExpressionContext = new ComparisonExpressionContext(this._ctx, this.state); + this.enterRule(_localctx, 88, OpenSearchPPLParser.RULE_comparisonExpression); + try { + this.state = 610; + this._errHandler.sync(this); + switch ( this.interpreter.adaptivePredict(this._input, 46, this._ctx) ) { + case 1: + _localctx = new CompareExprContext(_localctx); + this.enterOuterAlt(_localctx, 1); + { + this.state = 602; + (_localctx as CompareExprContext)._left = this.valueExpression(0); + this.state = 603; + this.comparisonOperator(); + this.state = 604; + (_localctx as CompareExprContext)._right = this.valueExpression(0); + } + break; + + case 2: + _localctx = new InExprContext(_localctx); + this.enterOuterAlt(_localctx, 2); + { + this.state = 606; + this.valueExpression(0); + this.state = 607; + this.match(OpenSearchPPLParser.IN); + this.state = 608; + this.valueList(); + } + break; + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + + public valueExpression(): ValueExpressionContext; + public valueExpression(_p: number): ValueExpressionContext; + // @RuleVersion(0) + public valueExpression(_p?: number): ValueExpressionContext { + if (_p === undefined) { + _p = 0; + } + + let _parentctx: ParserRuleContext = this._ctx; + let _parentState: number = this.state; + let _localctx: ValueExpressionContext = new ValueExpressionContext(this._ctx, _parentState); + let _prevctx: ValueExpressionContext = _localctx; + let _startState: number = 90; + this.enterRecursionRule(_localctx, 90, OpenSearchPPLParser.RULE_valueExpression, _p); + try { + let _alt: number; + this.enterOuterAlt(_localctx, 1); + { + this.state = 620; + this._errHandler.sync(this); + switch (this._input.LA(1)) { + case OpenSearchPPLParser.LT_PRTHS: + { + _localctx = new ParentheticBinaryArithmeticContext(_localctx); + this._ctx = _localctx; + _prevctx = _localctx; + + this.state = 613; + this.match(OpenSearchPPLParser.LT_PRTHS); + this.state = 614; + (_localctx as ParentheticBinaryArithmeticContext)._left = this.valueExpression(0); + this.state = 615; + this.binaryOperator(); + this.state = 616; + (_localctx as ParentheticBinaryArithmeticContext)._right = this.valueExpression(0); + this.state = 617; + this.match(OpenSearchPPLParser.RT_PRTHS); + } + break; + case OpenSearchPPLParser.D: + case OpenSearchPPLParser.TRUE: + case OpenSearchPPLParser.FALSE: + case OpenSearchPPLParser.DATETIME: + case OpenSearchPPLParser.INTERVAL: + case OpenSearchPPLParser.MICROSECOND: + case OpenSearchPPLParser.MILLISECOND: + case OpenSearchPPLParser.SECOND: + case OpenSearchPPLParser.MINUTE: + case OpenSearchPPLParser.HOUR: + case OpenSearchPPLParser.DAY: + case OpenSearchPPLParser.WEEK: + case OpenSearchPPLParser.MONTH: + case OpenSearchPPLParser.QUARTER: + case OpenSearchPPLParser.YEAR: + case OpenSearchPPLParser.CONVERT_TZ: + case OpenSearchPPLParser.DOT: + case OpenSearchPPLParser.PLUS: + case OpenSearchPPLParser.MINUS: + case OpenSearchPPLParser.BACKTICK: + case OpenSearchPPLParser.AVG: + case OpenSearchPPLParser.COUNT: + case OpenSearchPPLParser.MAX: + case OpenSearchPPLParser.MIN: + case OpenSearchPPLParser.SUM: + case OpenSearchPPLParser.VAR_SAMP: + case OpenSearchPPLParser.VAR_POP: + case OpenSearchPPLParser.STDDEV_SAMP: + case OpenSearchPPLParser.STDDEV_POP: + case OpenSearchPPLParser.FIRST: + case OpenSearchPPLParser.LAST: + case OpenSearchPPLParser.ABS: + case OpenSearchPPLParser.CEIL: + case OpenSearchPPLParser.CEILING: + case OpenSearchPPLParser.CONV: + case OpenSearchPPLParser.CRC32: + case OpenSearchPPLParser.E: + case OpenSearchPPLParser.EXP: + case OpenSearchPPLParser.FLOOR: + case OpenSearchPPLParser.LN: + case OpenSearchPPLParser.LOG: + case OpenSearchPPLParser.LOG10: + case OpenSearchPPLParser.LOG2: + case OpenSearchPPLParser.MOD: + case OpenSearchPPLParser.PI: + case OpenSearchPPLParser.POW: + case OpenSearchPPLParser.POWER: + case OpenSearchPPLParser.RAND: + case OpenSearchPPLParser.ROUND: + case OpenSearchPPLParser.SIGN: + case OpenSearchPPLParser.SQRT: + case OpenSearchPPLParser.TRUNCATE: + case OpenSearchPPLParser.ACOS: + case OpenSearchPPLParser.ASIN: + case OpenSearchPPLParser.ATAN: + case OpenSearchPPLParser.ATAN2: + case OpenSearchPPLParser.COS: + case OpenSearchPPLParser.COT: + case OpenSearchPPLParser.DEGREES: + case OpenSearchPPLParser.RADIANS: + case OpenSearchPPLParser.SIN: + case OpenSearchPPLParser.TAN: + case OpenSearchPPLParser.ADDDATE: + case OpenSearchPPLParser.CURDATE: + case OpenSearchPPLParser.CURRENT_DATE: + case OpenSearchPPLParser.CURRENT_TIME: + case OpenSearchPPLParser.CURRENT_TIMESTAMP: + case OpenSearchPPLParser.CURTIME: + case OpenSearchPPLParser.DATE: + case OpenSearchPPLParser.DATE_ADD: + case OpenSearchPPLParser.DATE_FORMAT: + case OpenSearchPPLParser.DATE_SUB: + case OpenSearchPPLParser.DAYNAME: + case OpenSearchPPLParser.DAYOFMONTH: + case OpenSearchPPLParser.DAYOFWEEK: + case OpenSearchPPLParser.DAYOFYEAR: + case OpenSearchPPLParser.FROM_DAYS: + case OpenSearchPPLParser.LOCALTIME: + case OpenSearchPPLParser.LOCALTIMESTAMP: + case OpenSearchPPLParser.FROM_UNIXTIME: + case OpenSearchPPLParser.MAKEDATE: + case OpenSearchPPLParser.MAKETIME: + case OpenSearchPPLParser.MONTHNAME: + case OpenSearchPPLParser.NOW: + case OpenSearchPPLParser.PERIOD_ADD: + case OpenSearchPPLParser.PERIOD_DIFF: + case OpenSearchPPLParser.SUBDATE: + case OpenSearchPPLParser.SYSDATE: + case OpenSearchPPLParser.TIME: + case OpenSearchPPLParser.TIME_TO_SEC: + case OpenSearchPPLParser.TIMESTAMP: + case OpenSearchPPLParser.TO_DAYS: + case OpenSearchPPLParser.UTC_DATE: + case OpenSearchPPLParser.UTC_TIME: + case OpenSearchPPLParser.UTC_TIMESTAMP: + case OpenSearchPPLParser.UNIX_TIMESTAMP: + case OpenSearchPPLParser.SUBSTR: + case OpenSearchPPLParser.SUBSTRING: + case OpenSearchPPLParser.LTRIM: + case OpenSearchPPLParser.RTRIM: + case OpenSearchPPLParser.TRIM: + case OpenSearchPPLParser.LOWER: + case OpenSearchPPLParser.UPPER: + case OpenSearchPPLParser.CONCAT: + case OpenSearchPPLParser.CONCAT_WS: + case OpenSearchPPLParser.LENGTH: + case OpenSearchPPLParser.STRCMP: + case OpenSearchPPLParser.RIGHT: + case OpenSearchPPLParser.LEFT: + case OpenSearchPPLParser.ASCII: + case OpenSearchPPLParser.LOCATE: + case OpenSearchPPLParser.REPLACE: + case OpenSearchPPLParser.CAST: + case OpenSearchPPLParser.LIKE: + case OpenSearchPPLParser.ISNULL: + case OpenSearchPPLParser.ISNOTNULL: + case OpenSearchPPLParser.IFNULL: + case OpenSearchPPLParser.NULLIF: + case OpenSearchPPLParser.IF: + case OpenSearchPPLParser.TYPEOF: + case OpenSearchPPLParser.SPAN: + case OpenSearchPPLParser.MS: + case OpenSearchPPLParser.S: + case OpenSearchPPLParser.M: + case OpenSearchPPLParser.H: + case OpenSearchPPLParser.W: + case OpenSearchPPLParser.Q: + case OpenSearchPPLParser.Y: + case OpenSearchPPLParser.ID: + case OpenSearchPPLParser.INTEGER_LITERAL: + case OpenSearchPPLParser.DECIMAL_LITERAL: + case OpenSearchPPLParser.DQUOTA_STRING: + case OpenSearchPPLParser.SQUOTA_STRING: + case OpenSearchPPLParser.BQUOTA_STRING: + { + _localctx = new ValueExpressionDefaultContext(_localctx); + this._ctx = _localctx; + _prevctx = _localctx; + this.state = 619; + this.primaryExpression(); + } + break; + default: + throw new NoViableAltException(this); + } + this._ctx._stop = this._input.tryLT(-1); + this.state = 628; + this._errHandler.sync(this); + _alt = this.interpreter.adaptivePredict(this._input, 48, this._ctx); + while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { + if (_alt === 1) { + if (this._parseListeners != null) { + this.triggerExitRuleEvent(); + } + _prevctx = _localctx; + { + { + _localctx = new BinaryArithmeticContext(new ValueExpressionContext(_parentctx, _parentState)); + (_localctx as BinaryArithmeticContext)._left = _prevctx; + this.pushNewRecursionContext(_localctx, _startState, OpenSearchPPLParser.RULE_valueExpression); + this.state = 622; + if (!(this.precpred(this._ctx, 3))) { + throw this.createFailedPredicateException("this.precpred(this._ctx, 3)"); + } + this.state = 623; + this.binaryOperator(); + this.state = 624; + (_localctx as BinaryArithmeticContext)._right = this.valueExpression(4); + } + } + } + this.state = 630; + this._errHandler.sync(this); + _alt = this.interpreter.adaptivePredict(this._input, 48, this._ctx); + } + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.unrollRecursionContexts(_parentctx); + } + return _localctx; + } + // @RuleVersion(0) + public primaryExpression(): PrimaryExpressionContext { + let _localctx: PrimaryExpressionContext = new PrimaryExpressionContext(this._ctx, this.state); + this.enterRule(_localctx, 92, OpenSearchPPLParser.RULE_primaryExpression); + try { + this.state = 636; + this._errHandler.sync(this); + switch ( this.interpreter.adaptivePredict(this._input, 49, this._ctx) ) { + case 1: + this.enterOuterAlt(_localctx, 1); + { + this.state = 631; + this.evalFunctionCall(); + } + break; + + case 2: + this.enterOuterAlt(_localctx, 2); + { + this.state = 632; + this.dataTypeFunctionCall(); + } + break; + + case 3: + this.enterOuterAlt(_localctx, 3); + { + this.state = 633; + this.fieldExpression(); + } + break; + + case 4: + this.enterOuterAlt(_localctx, 4); + { + this.state = 634; + this.literalValue(); + } + break; + + case 5: + this.enterOuterAlt(_localctx, 5); + { + this.state = 635; + this.constantFunction(); + } + break; + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public constantFunction(): ConstantFunctionContext { + let _localctx: ConstantFunctionContext = new ConstantFunctionContext(this._ctx, this.state); + this.enterRule(_localctx, 94, OpenSearchPPLParser.RULE_constantFunction); + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 638; + this.constantFunctionName(); + this.state = 639; + this.match(OpenSearchPPLParser.LT_PRTHS); + this.state = 641; + this._errHandler.sync(this); + switch ( this.interpreter.adaptivePredict(this._input, 50, this._ctx) ) { + case 1: + { + this.state = 640; + this.functionArgs(); + } + break; + } + this.state = 643; + this.match(OpenSearchPPLParser.RT_PRTHS); + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public booleanExpression(): BooleanExpressionContext { + let _localctx: BooleanExpressionContext = new BooleanExpressionContext(this._ctx, this.state); + this.enterRule(_localctx, 96, OpenSearchPPLParser.RULE_booleanExpression); + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 645; + this.booleanFunctionCall(); + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public relevanceExpression(): RelevanceExpressionContext { + let _localctx: RelevanceExpressionContext = new RelevanceExpressionContext(this._ctx, this.state); + this.enterRule(_localctx, 98, OpenSearchPPLParser.RULE_relevanceExpression); + try { + this.state = 649; + this._errHandler.sync(this); + switch (this._input.LA(1)) { + case OpenSearchPPLParser.MATCH: + case OpenSearchPPLParser.MATCH_PHRASE: + case OpenSearchPPLParser.MATCH_PHRASE_PREFIX: + case OpenSearchPPLParser.MATCH_BOOL_PREFIX: + this.enterOuterAlt(_localctx, 1); + { + this.state = 647; + this.singleFieldRelevanceFunction(); + } + break; + case OpenSearchPPLParser.SIMPLE_QUERY_STRING: + case OpenSearchPPLParser.MULTI_MATCH: + case OpenSearchPPLParser.QUERY_STRING: + this.enterOuterAlt(_localctx, 2); + { + this.state = 648; + this.multiFieldRelevanceFunction(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public singleFieldRelevanceFunction(): SingleFieldRelevanceFunctionContext { + let _localctx: SingleFieldRelevanceFunctionContext = new SingleFieldRelevanceFunctionContext(this._ctx, this.state); + this.enterRule(_localctx, 100, OpenSearchPPLParser.RULE_singleFieldRelevanceFunction); + let _la: number; + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 651; + this.singleFieldRelevanceFunctionName(); + this.state = 652; + this.match(OpenSearchPPLParser.LT_PRTHS); + this.state = 653; + _localctx._field = this.relevanceField(); + this.state = 654; + this.match(OpenSearchPPLParser.COMMA); + this.state = 655; + _localctx._query = this.relevanceQuery(); + this.state = 660; + this._errHandler.sync(this); + _la = this._input.LA(1); + while (_la === OpenSearchPPLParser.COMMA) { + { + { + this.state = 656; + this.match(OpenSearchPPLParser.COMMA); + this.state = 657; + this.relevanceArg(); + } + } + this.state = 662; + this._errHandler.sync(this); + _la = this._input.LA(1); + } + this.state = 663; + this.match(OpenSearchPPLParser.RT_PRTHS); + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public multiFieldRelevanceFunction(): MultiFieldRelevanceFunctionContext { + let _localctx: MultiFieldRelevanceFunctionContext = new MultiFieldRelevanceFunctionContext(this._ctx, this.state); + this.enterRule(_localctx, 102, OpenSearchPPLParser.RULE_multiFieldRelevanceFunction); + let _la: number; + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 665; + this.multiFieldRelevanceFunctionName(); + this.state = 666; + this.match(OpenSearchPPLParser.LT_PRTHS); + this.state = 667; + this.match(OpenSearchPPLParser.LT_SQR_PRTHS); + this.state = 668; + _localctx._field = this.relevanceFieldAndWeight(); + this.state = 673; + this._errHandler.sync(this); + _la = this._input.LA(1); + while (_la === OpenSearchPPLParser.COMMA) { + { + { + this.state = 669; + this.match(OpenSearchPPLParser.COMMA); + this.state = 670; + _localctx._field = this.relevanceFieldAndWeight(); + } + } + this.state = 675; + this._errHandler.sync(this); + _la = this._input.LA(1); + } + this.state = 676; + this.match(OpenSearchPPLParser.RT_SQR_PRTHS); + this.state = 677; + this.match(OpenSearchPPLParser.COMMA); + this.state = 678; + _localctx._query = this.relevanceQuery(); + this.state = 683; + this._errHandler.sync(this); + _la = this._input.LA(1); + while (_la === OpenSearchPPLParser.COMMA) { + { + { + this.state = 679; + this.match(OpenSearchPPLParser.COMMA); + this.state = 680; + this.relevanceArg(); + } + } + this.state = 685; + this._errHandler.sync(this); + _la = this._input.LA(1); + } + this.state = 686; + this.match(OpenSearchPPLParser.RT_PRTHS); + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public tableSource(): TableSourceContext { + let _localctx: TableSourceContext = new TableSourceContext(this._ctx, this.state); + this.enterRule(_localctx, 104, OpenSearchPPLParser.RULE_tableSource); + try { + this.state = 690; + this._errHandler.sync(this); + switch (this._input.LA(1)) { + case OpenSearchPPLParser.D: + case OpenSearchPPLParser.DATETIME: + case OpenSearchPPLParser.MICROSECOND: + case OpenSearchPPLParser.MILLISECOND: + case OpenSearchPPLParser.SECOND: + case OpenSearchPPLParser.MINUTE: + case OpenSearchPPLParser.HOUR: + case OpenSearchPPLParser.DAY: + case OpenSearchPPLParser.WEEK: + case OpenSearchPPLParser.MONTH: + case OpenSearchPPLParser.QUARTER: + case OpenSearchPPLParser.YEAR: + case OpenSearchPPLParser.CONVERT_TZ: + case OpenSearchPPLParser.DOT: + case OpenSearchPPLParser.BACKTICK: + case OpenSearchPPLParser.AVG: + case OpenSearchPPLParser.COUNT: + case OpenSearchPPLParser.MAX: + case OpenSearchPPLParser.MIN: + case OpenSearchPPLParser.SUM: + case OpenSearchPPLParser.VAR_SAMP: + case OpenSearchPPLParser.VAR_POP: + case OpenSearchPPLParser.STDDEV_SAMP: + case OpenSearchPPLParser.STDDEV_POP: + case OpenSearchPPLParser.FIRST: + case OpenSearchPPLParser.LAST: + case OpenSearchPPLParser.ABS: + case OpenSearchPPLParser.CEIL: + case OpenSearchPPLParser.CEILING: + case OpenSearchPPLParser.CONV: + case OpenSearchPPLParser.CRC32: + case OpenSearchPPLParser.E: + case OpenSearchPPLParser.EXP: + case OpenSearchPPLParser.FLOOR: + case OpenSearchPPLParser.LN: + case OpenSearchPPLParser.LOG: + case OpenSearchPPLParser.LOG10: + case OpenSearchPPLParser.LOG2: + case OpenSearchPPLParser.MOD: + case OpenSearchPPLParser.PI: + case OpenSearchPPLParser.POW: + case OpenSearchPPLParser.POWER: + case OpenSearchPPLParser.RAND: + case OpenSearchPPLParser.ROUND: + case OpenSearchPPLParser.SIGN: + case OpenSearchPPLParser.SQRT: + case OpenSearchPPLParser.TRUNCATE: + case OpenSearchPPLParser.ACOS: + case OpenSearchPPLParser.ASIN: + case OpenSearchPPLParser.ATAN: + case OpenSearchPPLParser.ATAN2: + case OpenSearchPPLParser.COS: + case OpenSearchPPLParser.COT: + case OpenSearchPPLParser.DEGREES: + case OpenSearchPPLParser.RADIANS: + case OpenSearchPPLParser.SIN: + case OpenSearchPPLParser.TAN: + case OpenSearchPPLParser.ADDDATE: + case OpenSearchPPLParser.CURDATE: + case OpenSearchPPLParser.CURRENT_DATE: + case OpenSearchPPLParser.CURRENT_TIME: + case OpenSearchPPLParser.CURRENT_TIMESTAMP: + case OpenSearchPPLParser.CURTIME: + case OpenSearchPPLParser.DATE: + case OpenSearchPPLParser.DATE_ADD: + case OpenSearchPPLParser.DATE_FORMAT: + case OpenSearchPPLParser.DATE_SUB: + case OpenSearchPPLParser.DAYNAME: + case OpenSearchPPLParser.DAYOFMONTH: + case OpenSearchPPLParser.DAYOFWEEK: + case OpenSearchPPLParser.DAYOFYEAR: + case OpenSearchPPLParser.FROM_DAYS: + case OpenSearchPPLParser.LOCALTIME: + case OpenSearchPPLParser.LOCALTIMESTAMP: + case OpenSearchPPLParser.FROM_UNIXTIME: + case OpenSearchPPLParser.MAKEDATE: + case OpenSearchPPLParser.MAKETIME: + case OpenSearchPPLParser.MONTHNAME: + case OpenSearchPPLParser.NOW: + case OpenSearchPPLParser.PERIOD_ADD: + case OpenSearchPPLParser.PERIOD_DIFF: + case OpenSearchPPLParser.SUBDATE: + case OpenSearchPPLParser.SYSDATE: + case OpenSearchPPLParser.TIME: + case OpenSearchPPLParser.TIME_TO_SEC: + case OpenSearchPPLParser.TIMESTAMP: + case OpenSearchPPLParser.TO_DAYS: + case OpenSearchPPLParser.UTC_DATE: + case OpenSearchPPLParser.UTC_TIME: + case OpenSearchPPLParser.UTC_TIMESTAMP: + case OpenSearchPPLParser.UNIX_TIMESTAMP: + case OpenSearchPPLParser.SUBSTR: + case OpenSearchPPLParser.SUBSTRING: + case OpenSearchPPLParser.LTRIM: + case OpenSearchPPLParser.RTRIM: + case OpenSearchPPLParser.TRIM: + case OpenSearchPPLParser.LOWER: + case OpenSearchPPLParser.UPPER: + case OpenSearchPPLParser.CONCAT: + case OpenSearchPPLParser.CONCAT_WS: + case OpenSearchPPLParser.LENGTH: + case OpenSearchPPLParser.STRCMP: + case OpenSearchPPLParser.RIGHT: + case OpenSearchPPLParser.LEFT: + case OpenSearchPPLParser.ASCII: + case OpenSearchPPLParser.LOCATE: + case OpenSearchPPLParser.REPLACE: + case OpenSearchPPLParser.SPAN: + case OpenSearchPPLParser.MS: + case OpenSearchPPLParser.S: + case OpenSearchPPLParser.M: + case OpenSearchPPLParser.H: + case OpenSearchPPLParser.W: + case OpenSearchPPLParser.Q: + case OpenSearchPPLParser.Y: + case OpenSearchPPLParser.ID: + case OpenSearchPPLParser.BQUOTA_STRING: + this.enterOuterAlt(_localctx, 1); + { + this.state = 688; + this.qualifiedName(); + } + break; + case OpenSearchPPLParser.ID_DATE_SUFFIX: + this.enterOuterAlt(_localctx, 2); + { + this.state = 689; + this.match(OpenSearchPPLParser.ID_DATE_SUFFIX); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public tableFunction(): TableFunctionContext { + let _localctx: TableFunctionContext = new TableFunctionContext(this._ctx, this.state); + this.enterRule(_localctx, 106, OpenSearchPPLParser.RULE_tableFunction); + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 692; + this.qualifiedName(); + this.state = 693; + this.match(OpenSearchPPLParser.LT_PRTHS); + this.state = 694; + this.functionArgs(); + this.state = 695; + this.match(OpenSearchPPLParser.RT_PRTHS); + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public fieldList(): FieldListContext { + let _localctx: FieldListContext = new FieldListContext(this._ctx, this.state); + this.enterRule(_localctx, 108, OpenSearchPPLParser.RULE_fieldList); + let _la: number; + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 697; + this.fieldExpression(); + this.state = 702; + this._errHandler.sync(this); + _la = this._input.LA(1); + while (_la === OpenSearchPPLParser.COMMA) { + { + { + this.state = 698; + this.match(OpenSearchPPLParser.COMMA); + this.state = 699; + this.fieldExpression(); + } + } + this.state = 704; + this._errHandler.sync(this); + _la = this._input.LA(1); + } + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public wcFieldList(): WcFieldListContext { + let _localctx: WcFieldListContext = new WcFieldListContext(this._ctx, this.state); + this.enterRule(_localctx, 110, OpenSearchPPLParser.RULE_wcFieldList); + let _la: number; + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 705; + this.wcFieldExpression(); + this.state = 710; + this._errHandler.sync(this); + _la = this._input.LA(1); + while (_la === OpenSearchPPLParser.COMMA) { + { + { + this.state = 706; + this.match(OpenSearchPPLParser.COMMA); + this.state = 707; + this.wcFieldExpression(); + } + } + this.state = 712; + this._errHandler.sync(this); + _la = this._input.LA(1); + } + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public sortField(): SortFieldContext { + let _localctx: SortFieldContext = new SortFieldContext(this._ctx, this.state); + this.enterRule(_localctx, 112, OpenSearchPPLParser.RULE_sortField); + let _la: number; + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 714; + this._errHandler.sync(this); + _la = this._input.LA(1); + if (_la === OpenSearchPPLParser.PLUS || _la === OpenSearchPPLParser.MINUS) { + { + this.state = 713; + _la = this._input.LA(1); + if (!(_la === OpenSearchPPLParser.PLUS || _la === OpenSearchPPLParser.MINUS)) { + this._errHandler.recoverInline(this); + } else { + if (this._input.LA(1) === Token.EOF) { + this.matchedEOF = true; + } + + this._errHandler.reportMatch(this); + this.consume(); + } + } + } + + this.state = 716; + this.sortFieldExpression(); + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public sortFieldExpression(): SortFieldExpressionContext { + let _localctx: SortFieldExpressionContext = new SortFieldExpressionContext(this._ctx, this.state); + this.enterRule(_localctx, 114, OpenSearchPPLParser.RULE_sortFieldExpression); + try { + this.state = 739; + this._errHandler.sync(this); + switch (this._input.LA(1)) { + case OpenSearchPPLParser.D: + case OpenSearchPPLParser.DATETIME: + case OpenSearchPPLParser.MICROSECOND: + case OpenSearchPPLParser.MILLISECOND: + case OpenSearchPPLParser.SECOND: + case OpenSearchPPLParser.MINUTE: + case OpenSearchPPLParser.HOUR: + case OpenSearchPPLParser.DAY: + case OpenSearchPPLParser.WEEK: + case OpenSearchPPLParser.MONTH: + case OpenSearchPPLParser.QUARTER: + case OpenSearchPPLParser.YEAR: + case OpenSearchPPLParser.CONVERT_TZ: + case OpenSearchPPLParser.DOT: + case OpenSearchPPLParser.BACKTICK: + case OpenSearchPPLParser.AVG: + case OpenSearchPPLParser.COUNT: + case OpenSearchPPLParser.MAX: + case OpenSearchPPLParser.MIN: + case OpenSearchPPLParser.SUM: + case OpenSearchPPLParser.VAR_SAMP: + case OpenSearchPPLParser.VAR_POP: + case OpenSearchPPLParser.STDDEV_SAMP: + case OpenSearchPPLParser.STDDEV_POP: + case OpenSearchPPLParser.FIRST: + case OpenSearchPPLParser.LAST: + case OpenSearchPPLParser.ABS: + case OpenSearchPPLParser.CEIL: + case OpenSearchPPLParser.CEILING: + case OpenSearchPPLParser.CONV: + case OpenSearchPPLParser.CRC32: + case OpenSearchPPLParser.E: + case OpenSearchPPLParser.EXP: + case OpenSearchPPLParser.FLOOR: + case OpenSearchPPLParser.LN: + case OpenSearchPPLParser.LOG: + case OpenSearchPPLParser.LOG10: + case OpenSearchPPLParser.LOG2: + case OpenSearchPPLParser.MOD: + case OpenSearchPPLParser.PI: + case OpenSearchPPLParser.POW: + case OpenSearchPPLParser.POWER: + case OpenSearchPPLParser.RAND: + case OpenSearchPPLParser.ROUND: + case OpenSearchPPLParser.SIGN: + case OpenSearchPPLParser.SQRT: + case OpenSearchPPLParser.TRUNCATE: + case OpenSearchPPLParser.ACOS: + case OpenSearchPPLParser.ASIN: + case OpenSearchPPLParser.ATAN: + case OpenSearchPPLParser.ATAN2: + case OpenSearchPPLParser.COS: + case OpenSearchPPLParser.COT: + case OpenSearchPPLParser.DEGREES: + case OpenSearchPPLParser.RADIANS: + case OpenSearchPPLParser.SIN: + case OpenSearchPPLParser.TAN: + case OpenSearchPPLParser.ADDDATE: + case OpenSearchPPLParser.CURDATE: + case OpenSearchPPLParser.CURRENT_DATE: + case OpenSearchPPLParser.CURRENT_TIME: + case OpenSearchPPLParser.CURRENT_TIMESTAMP: + case OpenSearchPPLParser.CURTIME: + case OpenSearchPPLParser.DATE: + case OpenSearchPPLParser.DATE_ADD: + case OpenSearchPPLParser.DATE_FORMAT: + case OpenSearchPPLParser.DATE_SUB: + case OpenSearchPPLParser.DAYNAME: + case OpenSearchPPLParser.DAYOFMONTH: + case OpenSearchPPLParser.DAYOFWEEK: + case OpenSearchPPLParser.DAYOFYEAR: + case OpenSearchPPLParser.FROM_DAYS: + case OpenSearchPPLParser.LOCALTIME: + case OpenSearchPPLParser.LOCALTIMESTAMP: + case OpenSearchPPLParser.FROM_UNIXTIME: + case OpenSearchPPLParser.MAKEDATE: + case OpenSearchPPLParser.MAKETIME: + case OpenSearchPPLParser.MONTHNAME: + case OpenSearchPPLParser.NOW: + case OpenSearchPPLParser.PERIOD_ADD: + case OpenSearchPPLParser.PERIOD_DIFF: + case OpenSearchPPLParser.SUBDATE: + case OpenSearchPPLParser.SYSDATE: + case OpenSearchPPLParser.TIME: + case OpenSearchPPLParser.TIME_TO_SEC: + case OpenSearchPPLParser.TIMESTAMP: + case OpenSearchPPLParser.TO_DAYS: + case OpenSearchPPLParser.UTC_DATE: + case OpenSearchPPLParser.UTC_TIME: + case OpenSearchPPLParser.UTC_TIMESTAMP: + case OpenSearchPPLParser.UNIX_TIMESTAMP: + case OpenSearchPPLParser.SUBSTR: + case OpenSearchPPLParser.SUBSTRING: + case OpenSearchPPLParser.LTRIM: + case OpenSearchPPLParser.RTRIM: + case OpenSearchPPLParser.TRIM: + case OpenSearchPPLParser.LOWER: + case OpenSearchPPLParser.UPPER: + case OpenSearchPPLParser.CONCAT: + case OpenSearchPPLParser.CONCAT_WS: + case OpenSearchPPLParser.LENGTH: + case OpenSearchPPLParser.STRCMP: + case OpenSearchPPLParser.RIGHT: + case OpenSearchPPLParser.LEFT: + case OpenSearchPPLParser.ASCII: + case OpenSearchPPLParser.LOCATE: + case OpenSearchPPLParser.REPLACE: + case OpenSearchPPLParser.SPAN: + case OpenSearchPPLParser.MS: + case OpenSearchPPLParser.S: + case OpenSearchPPLParser.M: + case OpenSearchPPLParser.H: + case OpenSearchPPLParser.W: + case OpenSearchPPLParser.Q: + case OpenSearchPPLParser.Y: + case OpenSearchPPLParser.ID: + case OpenSearchPPLParser.BQUOTA_STRING: + this.enterOuterAlt(_localctx, 1); + { + this.state = 718; + this.fieldExpression(); + } + break; + case OpenSearchPPLParser.AUTO: + this.enterOuterAlt(_localctx, 2); + { + this.state = 719; + this.match(OpenSearchPPLParser.AUTO); + this.state = 720; + this.match(OpenSearchPPLParser.LT_PRTHS); + this.state = 721; + this.fieldExpression(); + this.state = 722; + this.match(OpenSearchPPLParser.RT_PRTHS); + } + break; + case OpenSearchPPLParser.STR: + this.enterOuterAlt(_localctx, 3); + { + this.state = 724; + this.match(OpenSearchPPLParser.STR); + this.state = 725; + this.match(OpenSearchPPLParser.LT_PRTHS); + this.state = 726; + this.fieldExpression(); + this.state = 727; + this.match(OpenSearchPPLParser.RT_PRTHS); + } + break; + case OpenSearchPPLParser.IP: + this.enterOuterAlt(_localctx, 4); + { + this.state = 729; + this.match(OpenSearchPPLParser.IP); + this.state = 730; + this.match(OpenSearchPPLParser.LT_PRTHS); + this.state = 731; + this.fieldExpression(); + this.state = 732; + this.match(OpenSearchPPLParser.RT_PRTHS); + } + break; + case OpenSearchPPLParser.NUM: + this.enterOuterAlt(_localctx, 5); + { + this.state = 734; + this.match(OpenSearchPPLParser.NUM); + this.state = 735; + this.match(OpenSearchPPLParser.LT_PRTHS); + this.state = 736; + this.fieldExpression(); + this.state = 737; + this.match(OpenSearchPPLParser.RT_PRTHS); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public fieldExpression(): FieldExpressionContext { + let _localctx: FieldExpressionContext = new FieldExpressionContext(this._ctx, this.state); + this.enterRule(_localctx, 116, OpenSearchPPLParser.RULE_fieldExpression); + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 741; + this.qualifiedName(); + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public wcFieldExpression(): WcFieldExpressionContext { + let _localctx: WcFieldExpressionContext = new WcFieldExpressionContext(this._ctx, this.state); + this.enterRule(_localctx, 118, OpenSearchPPLParser.RULE_wcFieldExpression); + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 743; + this.wcQualifiedName(); + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public evalFunctionCall(): EvalFunctionCallContext { + let _localctx: EvalFunctionCallContext = new EvalFunctionCallContext(this._ctx, this.state); + this.enterRule(_localctx, 120, OpenSearchPPLParser.RULE_evalFunctionCall); + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 745; + this.evalFunctionName(); + this.state = 746; + this.match(OpenSearchPPLParser.LT_PRTHS); + this.state = 747; + this.functionArgs(); + this.state = 748; + this.match(OpenSearchPPLParser.RT_PRTHS); + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public dataTypeFunctionCall(): DataTypeFunctionCallContext { + let _localctx: DataTypeFunctionCallContext = new DataTypeFunctionCallContext(this._ctx, this.state); + this.enterRule(_localctx, 122, OpenSearchPPLParser.RULE_dataTypeFunctionCall); + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 750; + this.match(OpenSearchPPLParser.CAST); + this.state = 751; + this.match(OpenSearchPPLParser.LT_PRTHS); + this.state = 752; + this.expression(); + this.state = 753; + this.match(OpenSearchPPLParser.AS); + this.state = 754; + this.convertedDataType(); + this.state = 755; + this.match(OpenSearchPPLParser.RT_PRTHS); + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public booleanFunctionCall(): BooleanFunctionCallContext { + let _localctx: BooleanFunctionCallContext = new BooleanFunctionCallContext(this._ctx, this.state); + this.enterRule(_localctx, 124, OpenSearchPPLParser.RULE_booleanFunctionCall); + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 757; + this.conditionFunctionBase(); + this.state = 758; + this.match(OpenSearchPPLParser.LT_PRTHS); + this.state = 759; + this.functionArgs(); + this.state = 760; + this.match(OpenSearchPPLParser.RT_PRTHS); + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public convertedDataType(): ConvertedDataTypeContext { + let _localctx: ConvertedDataTypeContext = new ConvertedDataTypeContext(this._ctx, this.state); + this.enterRule(_localctx, 126, OpenSearchPPLParser.RULE_convertedDataType); + try { + this.state = 772; + this._errHandler.sync(this); + switch (this._input.LA(1)) { + case OpenSearchPPLParser.DATE: + this.enterOuterAlt(_localctx, 1); + { + this.state = 762; + _localctx._typeName = this.match(OpenSearchPPLParser.DATE); + } + break; + case OpenSearchPPLParser.TIME: + this.enterOuterAlt(_localctx, 2); + { + this.state = 763; + _localctx._typeName = this.match(OpenSearchPPLParser.TIME); + } + break; + case OpenSearchPPLParser.TIMESTAMP: + this.enterOuterAlt(_localctx, 3); + { + this.state = 764; + _localctx._typeName = this.match(OpenSearchPPLParser.TIMESTAMP); + } + break; + case OpenSearchPPLParser.INT: + this.enterOuterAlt(_localctx, 4); + { + this.state = 765; + _localctx._typeName = this.match(OpenSearchPPLParser.INT); + } + break; + case OpenSearchPPLParser.INTEGER: + this.enterOuterAlt(_localctx, 5); + { + this.state = 766; + _localctx._typeName = this.match(OpenSearchPPLParser.INTEGER); + } + break; + case OpenSearchPPLParser.DOUBLE: + this.enterOuterAlt(_localctx, 6); + { + this.state = 767; + _localctx._typeName = this.match(OpenSearchPPLParser.DOUBLE); + } + break; + case OpenSearchPPLParser.LONG: + this.enterOuterAlt(_localctx, 7); + { + this.state = 768; + _localctx._typeName = this.match(OpenSearchPPLParser.LONG); + } + break; + case OpenSearchPPLParser.FLOAT: + this.enterOuterAlt(_localctx, 8); + { + this.state = 769; + _localctx._typeName = this.match(OpenSearchPPLParser.FLOAT); + } + break; + case OpenSearchPPLParser.STRING: + this.enterOuterAlt(_localctx, 9); + { + this.state = 770; + _localctx._typeName = this.match(OpenSearchPPLParser.STRING); + } + break; + case OpenSearchPPLParser.BOOLEAN: + this.enterOuterAlt(_localctx, 10); + { + this.state = 771; + _localctx._typeName = this.match(OpenSearchPPLParser.BOOLEAN); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public evalFunctionName(): EvalFunctionNameContext { + let _localctx: EvalFunctionNameContext = new EvalFunctionNameContext(this._ctx, this.state); + this.enterRule(_localctx, 128, OpenSearchPPLParser.RULE_evalFunctionName); + try { + this.state = 779; + this._errHandler.sync(this); + switch (this._input.LA(1)) { + case OpenSearchPPLParser.ABS: + case OpenSearchPPLParser.CEIL: + case OpenSearchPPLParser.CEILING: + case OpenSearchPPLParser.CONV: + case OpenSearchPPLParser.CRC32: + case OpenSearchPPLParser.E: + case OpenSearchPPLParser.EXP: + case OpenSearchPPLParser.FLOOR: + case OpenSearchPPLParser.LN: + case OpenSearchPPLParser.LOG: + case OpenSearchPPLParser.LOG10: + case OpenSearchPPLParser.LOG2: + case OpenSearchPPLParser.MOD: + case OpenSearchPPLParser.PI: + case OpenSearchPPLParser.POW: + case OpenSearchPPLParser.POWER: + case OpenSearchPPLParser.RAND: + case OpenSearchPPLParser.ROUND: + case OpenSearchPPLParser.SIGN: + case OpenSearchPPLParser.SQRT: + case OpenSearchPPLParser.TRUNCATE: + case OpenSearchPPLParser.ACOS: + case OpenSearchPPLParser.ASIN: + case OpenSearchPPLParser.ATAN: + case OpenSearchPPLParser.ATAN2: + case OpenSearchPPLParser.COS: + case OpenSearchPPLParser.COT: + case OpenSearchPPLParser.DEGREES: + case OpenSearchPPLParser.RADIANS: + case OpenSearchPPLParser.SIN: + case OpenSearchPPLParser.TAN: + this.enterOuterAlt(_localctx, 1); + { + this.state = 774; + this.mathematicalFunctionBase(); + } + break; + case OpenSearchPPLParser.DATETIME: + case OpenSearchPPLParser.MICROSECOND: + case OpenSearchPPLParser.SECOND: + case OpenSearchPPLParser.MINUTE: + case OpenSearchPPLParser.HOUR: + case OpenSearchPPLParser.DAY: + case OpenSearchPPLParser.WEEK: + case OpenSearchPPLParser.MONTH: + case OpenSearchPPLParser.QUARTER: + case OpenSearchPPLParser.YEAR: + case OpenSearchPPLParser.CONVERT_TZ: + case OpenSearchPPLParser.ADDDATE: + case OpenSearchPPLParser.DATE: + case OpenSearchPPLParser.DATE_ADD: + case OpenSearchPPLParser.DATE_FORMAT: + case OpenSearchPPLParser.DATE_SUB: + case OpenSearchPPLParser.DAYNAME: + case OpenSearchPPLParser.DAYOFMONTH: + case OpenSearchPPLParser.DAYOFWEEK: + case OpenSearchPPLParser.DAYOFYEAR: + case OpenSearchPPLParser.FROM_DAYS: + case OpenSearchPPLParser.FROM_UNIXTIME: + case OpenSearchPPLParser.MAKEDATE: + case OpenSearchPPLParser.MAKETIME: + case OpenSearchPPLParser.MONTHNAME: + case OpenSearchPPLParser.PERIOD_ADD: + case OpenSearchPPLParser.PERIOD_DIFF: + case OpenSearchPPLParser.SUBDATE: + case OpenSearchPPLParser.SYSDATE: + case OpenSearchPPLParser.TIME: + case OpenSearchPPLParser.TIME_TO_SEC: + case OpenSearchPPLParser.TIMESTAMP: + case OpenSearchPPLParser.TO_DAYS: + case OpenSearchPPLParser.UNIX_TIMESTAMP: + this.enterOuterAlt(_localctx, 2); + { + this.state = 775; + this.dateAndTimeFunctionBase(); + } + break; + case OpenSearchPPLParser.SUBSTR: + case OpenSearchPPLParser.SUBSTRING: + case OpenSearchPPLParser.LTRIM: + case OpenSearchPPLParser.RTRIM: + case OpenSearchPPLParser.TRIM: + case OpenSearchPPLParser.LOWER: + case OpenSearchPPLParser.UPPER: + case OpenSearchPPLParser.CONCAT: + case OpenSearchPPLParser.CONCAT_WS: + case OpenSearchPPLParser.LENGTH: + case OpenSearchPPLParser.STRCMP: + case OpenSearchPPLParser.RIGHT: + case OpenSearchPPLParser.LEFT: + case OpenSearchPPLParser.ASCII: + case OpenSearchPPLParser.LOCATE: + case OpenSearchPPLParser.REPLACE: + this.enterOuterAlt(_localctx, 3); + { + this.state = 776; + this.textFunctionBase(); + } + break; + case OpenSearchPPLParser.LIKE: + case OpenSearchPPLParser.ISNULL: + case OpenSearchPPLParser.ISNOTNULL: + case OpenSearchPPLParser.IFNULL: + case OpenSearchPPLParser.NULLIF: + case OpenSearchPPLParser.IF: + this.enterOuterAlt(_localctx, 4); + { + this.state = 777; + this.conditionFunctionBase(); + } + break; + case OpenSearchPPLParser.TYPEOF: + this.enterOuterAlt(_localctx, 5); + { + this.state = 778; + this.systemFunctionBase(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public functionArgs(): FunctionArgsContext { + let _localctx: FunctionArgsContext = new FunctionArgsContext(this._ctx, this.state); + this.enterRule(_localctx, 130, OpenSearchPPLParser.RULE_functionArgs); + let _la: number; + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 789; + this._errHandler.sync(this); + _la = this._input.LA(1); + if (_la === OpenSearchPPLParser.D || ((((_la - 64)) & ~0x1F) === 0 && ((1 << (_la - 64)) & ((1 << (OpenSearchPPLParser.TRUE - 64)) | (1 << (OpenSearchPPLParser.FALSE - 64)) | (1 << (OpenSearchPPLParser.DATETIME - 64)) | (1 << (OpenSearchPPLParser.INTERVAL - 64)) | (1 << (OpenSearchPPLParser.MICROSECOND - 64)) | (1 << (OpenSearchPPLParser.MILLISECOND - 64)) | (1 << (OpenSearchPPLParser.SECOND - 64)) | (1 << (OpenSearchPPLParser.MINUTE - 64)) | (1 << (OpenSearchPPLParser.HOUR - 64)) | (1 << (OpenSearchPPLParser.DAY - 64)) | (1 << (OpenSearchPPLParser.WEEK - 64)) | (1 << (OpenSearchPPLParser.MONTH - 64)) | (1 << (OpenSearchPPLParser.QUARTER - 64)) | (1 << (OpenSearchPPLParser.YEAR - 64)) | (1 << (OpenSearchPPLParser.CONVERT_TZ - 64)))) !== 0) || ((((_la - 103)) & ~0x1F) === 0 && ((1 << (_la - 103)) & ((1 << (OpenSearchPPLParser.DOT - 103)) | (1 << (OpenSearchPPLParser.PLUS - 103)) | (1 << (OpenSearchPPLParser.MINUS - 103)) | (1 << (OpenSearchPPLParser.LT_PRTHS - 103)) | (1 << (OpenSearchPPLParser.BACKTICK - 103)) | (1 << (OpenSearchPPLParser.AVG - 103)) | (1 << (OpenSearchPPLParser.COUNT - 103)) | (1 << (OpenSearchPPLParser.MAX - 103)))) !== 0) || ((((_la - 135)) & ~0x1F) === 0 && ((1 << (_la - 135)) & ((1 << (OpenSearchPPLParser.MIN - 135)) | (1 << (OpenSearchPPLParser.SUM - 135)) | (1 << (OpenSearchPPLParser.VAR_SAMP - 135)) | (1 << (OpenSearchPPLParser.VAR_POP - 135)) | (1 << (OpenSearchPPLParser.STDDEV_SAMP - 135)) | (1 << (OpenSearchPPLParser.STDDEV_POP - 135)) | (1 << (OpenSearchPPLParser.FIRST - 135)) | (1 << (OpenSearchPPLParser.LAST - 135)) | (1 << (OpenSearchPPLParser.ABS - 135)) | (1 << (OpenSearchPPLParser.CEIL - 135)) | (1 << (OpenSearchPPLParser.CEILING - 135)))) !== 0) || ((((_la - 167)) & ~0x1F) === 0 && ((1 << (_la - 167)) & ((1 << (OpenSearchPPLParser.CONV - 167)) | (1 << (OpenSearchPPLParser.CRC32 - 167)) | (1 << (OpenSearchPPLParser.E - 167)) | (1 << (OpenSearchPPLParser.EXP - 167)) | (1 << (OpenSearchPPLParser.FLOOR - 167)) | (1 << (OpenSearchPPLParser.LN - 167)) | (1 << (OpenSearchPPLParser.LOG - 167)) | (1 << (OpenSearchPPLParser.LOG10 - 167)) | (1 << (OpenSearchPPLParser.LOG2 - 167)) | (1 << (OpenSearchPPLParser.MOD - 167)) | (1 << (OpenSearchPPLParser.PI - 167)) | (1 << (OpenSearchPPLParser.POW - 167)) | (1 << (OpenSearchPPLParser.POWER - 167)) | (1 << (OpenSearchPPLParser.RAND - 167)) | (1 << (OpenSearchPPLParser.ROUND - 167)) | (1 << (OpenSearchPPLParser.SIGN - 167)) | (1 << (OpenSearchPPLParser.SQRT - 167)) | (1 << (OpenSearchPPLParser.TRUNCATE - 167)) | (1 << (OpenSearchPPLParser.ACOS - 167)) | (1 << (OpenSearchPPLParser.ASIN - 167)) | (1 << (OpenSearchPPLParser.ATAN - 167)) | (1 << (OpenSearchPPLParser.ATAN2 - 167)) | (1 << (OpenSearchPPLParser.COS - 167)) | (1 << (OpenSearchPPLParser.COT - 167)) | (1 << (OpenSearchPPLParser.DEGREES - 167)) | (1 << (OpenSearchPPLParser.RADIANS - 167)) | (1 << (OpenSearchPPLParser.SIN - 167)) | (1 << (OpenSearchPPLParser.TAN - 167)) | (1 << (OpenSearchPPLParser.ADDDATE - 167)) | (1 << (OpenSearchPPLParser.CURDATE - 167)) | (1 << (OpenSearchPPLParser.CURRENT_DATE - 167)) | (1 << (OpenSearchPPLParser.CURRENT_TIME - 167)))) !== 0) || ((((_la - 199)) & ~0x1F) === 0 && ((1 << (_la - 199)) & ((1 << (OpenSearchPPLParser.CURRENT_TIMESTAMP - 199)) | (1 << (OpenSearchPPLParser.CURTIME - 199)) | (1 << (OpenSearchPPLParser.DATE - 199)) | (1 << (OpenSearchPPLParser.DATE_ADD - 199)) | (1 << (OpenSearchPPLParser.DATE_FORMAT - 199)) | (1 << (OpenSearchPPLParser.DATE_SUB - 199)) | (1 << (OpenSearchPPLParser.DAYNAME - 199)) | (1 << (OpenSearchPPLParser.DAYOFMONTH - 199)) | (1 << (OpenSearchPPLParser.DAYOFWEEK - 199)) | (1 << (OpenSearchPPLParser.DAYOFYEAR - 199)) | (1 << (OpenSearchPPLParser.FROM_DAYS - 199)) | (1 << (OpenSearchPPLParser.LOCALTIME - 199)) | (1 << (OpenSearchPPLParser.LOCALTIMESTAMP - 199)) | (1 << (OpenSearchPPLParser.FROM_UNIXTIME - 199)) | (1 << (OpenSearchPPLParser.MAKEDATE - 199)) | (1 << (OpenSearchPPLParser.MAKETIME - 199)) | (1 << (OpenSearchPPLParser.MONTHNAME - 199)) | (1 << (OpenSearchPPLParser.NOW - 199)) | (1 << (OpenSearchPPLParser.PERIOD_ADD - 199)) | (1 << (OpenSearchPPLParser.PERIOD_DIFF - 199)) | (1 << (OpenSearchPPLParser.SUBDATE - 199)) | (1 << (OpenSearchPPLParser.SYSDATE - 199)) | (1 << (OpenSearchPPLParser.TIME - 199)) | (1 << (OpenSearchPPLParser.TIME_TO_SEC - 199)) | (1 << (OpenSearchPPLParser.TIMESTAMP - 199)) | (1 << (OpenSearchPPLParser.TO_DAYS - 199)) | (1 << (OpenSearchPPLParser.UTC_DATE - 199)) | (1 << (OpenSearchPPLParser.UTC_TIME - 199)) | (1 << (OpenSearchPPLParser.UTC_TIMESTAMP - 199)) | (1 << (OpenSearchPPLParser.UNIX_TIMESTAMP - 199)) | (1 << (OpenSearchPPLParser.SUBSTR - 199)) | (1 << (OpenSearchPPLParser.SUBSTRING - 199)))) !== 0) || ((((_la - 231)) & ~0x1F) === 0 && ((1 << (_la - 231)) & ((1 << (OpenSearchPPLParser.LTRIM - 231)) | (1 << (OpenSearchPPLParser.RTRIM - 231)) | (1 << (OpenSearchPPLParser.TRIM - 231)) | (1 << (OpenSearchPPLParser.LOWER - 231)) | (1 << (OpenSearchPPLParser.UPPER - 231)) | (1 << (OpenSearchPPLParser.CONCAT - 231)) | (1 << (OpenSearchPPLParser.CONCAT_WS - 231)) | (1 << (OpenSearchPPLParser.LENGTH - 231)) | (1 << (OpenSearchPPLParser.STRCMP - 231)) | (1 << (OpenSearchPPLParser.RIGHT - 231)) | (1 << (OpenSearchPPLParser.LEFT - 231)) | (1 << (OpenSearchPPLParser.ASCII - 231)) | (1 << (OpenSearchPPLParser.LOCATE - 231)) | (1 << (OpenSearchPPLParser.REPLACE - 231)) | (1 << (OpenSearchPPLParser.CAST - 231)) | (1 << (OpenSearchPPLParser.LIKE - 231)) | (1 << (OpenSearchPPLParser.ISNULL - 231)) | (1 << (OpenSearchPPLParser.ISNOTNULL - 231)) | (1 << (OpenSearchPPLParser.IFNULL - 231)) | (1 << (OpenSearchPPLParser.NULLIF - 231)) | (1 << (OpenSearchPPLParser.IF - 231)) | (1 << (OpenSearchPPLParser.TYPEOF - 231)))) !== 0) || ((((_la - 292)) & ~0x1F) === 0 && ((1 << (_la - 292)) & ((1 << (OpenSearchPPLParser.SPAN - 292)) | (1 << (OpenSearchPPLParser.MS - 292)) | (1 << (OpenSearchPPLParser.S - 292)) | (1 << (OpenSearchPPLParser.M - 292)) | (1 << (OpenSearchPPLParser.H - 292)) | (1 << (OpenSearchPPLParser.W - 292)) | (1 << (OpenSearchPPLParser.Q - 292)) | (1 << (OpenSearchPPLParser.Y - 292)) | (1 << (OpenSearchPPLParser.ID - 292)) | (1 << (OpenSearchPPLParser.INTEGER_LITERAL - 292)) | (1 << (OpenSearchPPLParser.DECIMAL_LITERAL - 292)) | (1 << (OpenSearchPPLParser.DQUOTA_STRING - 292)) | (1 << (OpenSearchPPLParser.SQUOTA_STRING - 292)) | (1 << (OpenSearchPPLParser.BQUOTA_STRING - 292)))) !== 0)) { + { + this.state = 781; + this.functionArg(); + this.state = 786; + this._errHandler.sync(this); + _la = this._input.LA(1); + while (_la === OpenSearchPPLParser.COMMA) { + { + { + this.state = 782; + this.match(OpenSearchPPLParser.COMMA); + this.state = 783; + this.functionArg(); + } + } + this.state = 788; + this._errHandler.sync(this); + _la = this._input.LA(1); + } + } + } + + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public functionArg(): FunctionArgContext { + let _localctx: FunctionArgContext = new FunctionArgContext(this._ctx, this.state); + this.enterRule(_localctx, 132, OpenSearchPPLParser.RULE_functionArg); + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 794; + this._errHandler.sync(this); + switch ( this.interpreter.adaptivePredict(this._input, 64, this._ctx) ) { + case 1: + { + this.state = 791; + this.ident(); + this.state = 792; + this.match(OpenSearchPPLParser.EQUAL); + } + break; + } + this.state = 796; + this.valueExpression(0); + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public relevanceArg(): RelevanceArgContext { + let _localctx: RelevanceArgContext = new RelevanceArgContext(this._ctx, this.state); + this.enterRule(_localctx, 134, OpenSearchPPLParser.RULE_relevanceArg); + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 798; + this.relevanceArgName(); + this.state = 799; + this.match(OpenSearchPPLParser.EQUAL); + this.state = 800; + this.relevanceArgValue(); + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public relevanceArgName(): RelevanceArgNameContext { + let _localctx: RelevanceArgNameContext = new RelevanceArgNameContext(this._ctx, this.state); + this.enterRule(_localctx, 136, OpenSearchPPLParser.RULE_relevanceArgName); + let _la: number; + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 802; + _la = this._input.LA(1); + if (!(_la === OpenSearchPPLParser.FIELDS || _la === OpenSearchPPLParser.TIME_ZONE || ((((_la - 261)) & ~0x1F) === 0 && ((1 << (_la - 261)) & ((1 << (OpenSearchPPLParser.ALLOW_LEADING_WILDCARD - 261)) | (1 << (OpenSearchPPLParser.ANALYZE_WILDCARD - 261)) | (1 << (OpenSearchPPLParser.ANALYZER - 261)) | (1 << (OpenSearchPPLParser.AUTO_GENERATE_SYNONYMS_PHRASE_QUERY - 261)) | (1 << (OpenSearchPPLParser.BOOST - 261)) | (1 << (OpenSearchPPLParser.CUTOFF_FREQUENCY - 261)) | (1 << (OpenSearchPPLParser.DEFAULT_FIELD - 261)) | (1 << (OpenSearchPPLParser.DEFAULT_OPERATOR - 261)) | (1 << (OpenSearchPPLParser.ENABLE_POSITION_INCREMENTS - 261)) | (1 << (OpenSearchPPLParser.ESCAPE - 261)) | (1 << (OpenSearchPPLParser.FLAGS - 261)) | (1 << (OpenSearchPPLParser.FUZZY_MAX_EXPANSIONS - 261)) | (1 << (OpenSearchPPLParser.FUZZY_PREFIX_LENGTH - 261)) | (1 << (OpenSearchPPLParser.FUZZY_TRANSPOSITIONS - 261)) | (1 << (OpenSearchPPLParser.FUZZY_REWRITE - 261)) | (1 << (OpenSearchPPLParser.FUZZINESS - 261)) | (1 << (OpenSearchPPLParser.LENIENT - 261)) | (1 << (OpenSearchPPLParser.LOW_FREQ_OPERATOR - 261)) | (1 << (OpenSearchPPLParser.MAX_DETERMINIZED_STATES - 261)) | (1 << (OpenSearchPPLParser.MAX_EXPANSIONS - 261)) | (1 << (OpenSearchPPLParser.MINIMUM_SHOULD_MATCH - 261)) | (1 << (OpenSearchPPLParser.OPERATOR - 261)) | (1 << (OpenSearchPPLParser.PHRASE_SLOP - 261)) | (1 << (OpenSearchPPLParser.PREFIX_LENGTH - 261)) | (1 << (OpenSearchPPLParser.QUOTE_ANALYZER - 261)) | (1 << (OpenSearchPPLParser.QUOTE_FIELD_SUFFIX - 261)) | (1 << (OpenSearchPPLParser.REWRITE - 261)) | (1 << (OpenSearchPPLParser.SLOP - 261)) | (1 << (OpenSearchPPLParser.TIE_BREAKER - 261)) | (1 << (OpenSearchPPLParser.TYPE - 261)) | (1 << (OpenSearchPPLParser.ZERO_TERMS_QUERY - 261)))) !== 0))) { + this._errHandler.recoverInline(this); + } else { + if (this._input.LA(1) === Token.EOF) { + this.matchedEOF = true; + } + + this._errHandler.reportMatch(this); + this.consume(); + } + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public relevanceFieldAndWeight(): RelevanceFieldAndWeightContext { + let _localctx: RelevanceFieldAndWeightContext = new RelevanceFieldAndWeightContext(this._ctx, this.state); + this.enterRule(_localctx, 138, OpenSearchPPLParser.RULE_relevanceFieldAndWeight); + try { + this.state = 812; + this._errHandler.sync(this); + switch ( this.interpreter.adaptivePredict(this._input, 65, this._ctx) ) { + case 1: + this.enterOuterAlt(_localctx, 1); + { + this.state = 804; + _localctx._field = this.relevanceField(); + } + break; + + case 2: + this.enterOuterAlt(_localctx, 2); + { + this.state = 805; + _localctx._field = this.relevanceField(); + this.state = 806; + _localctx._weight = this.relevanceFieldWeight(); + } + break; + + case 3: + this.enterOuterAlt(_localctx, 3); + { + this.state = 808; + _localctx._field = this.relevanceField(); + this.state = 809; + this.match(OpenSearchPPLParser.BIT_XOR_OP); + this.state = 810; + _localctx._weight = this.relevanceFieldWeight(); + } + break; + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public relevanceFieldWeight(): RelevanceFieldWeightContext { + let _localctx: RelevanceFieldWeightContext = new RelevanceFieldWeightContext(this._ctx, this.state); + this.enterRule(_localctx, 140, OpenSearchPPLParser.RULE_relevanceFieldWeight); + try { + this.state = 816; + this._errHandler.sync(this); + switch ( this.interpreter.adaptivePredict(this._input, 66, this._ctx) ) { + case 1: + this.enterOuterAlt(_localctx, 1); + { + this.state = 814; + this.integerLiteral(); + } + break; + + case 2: + this.enterOuterAlt(_localctx, 2); + { + this.state = 815; + this.decimalLiteral(); + } + break; + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public relevanceField(): RelevanceFieldContext { + let _localctx: RelevanceFieldContext = new RelevanceFieldContext(this._ctx, this.state); + this.enterRule(_localctx, 142, OpenSearchPPLParser.RULE_relevanceField); + try { + this.state = 820; + this._errHandler.sync(this); + switch (this._input.LA(1)) { + case OpenSearchPPLParser.D: + case OpenSearchPPLParser.DATETIME: + case OpenSearchPPLParser.MICROSECOND: + case OpenSearchPPLParser.MILLISECOND: + case OpenSearchPPLParser.SECOND: + case OpenSearchPPLParser.MINUTE: + case OpenSearchPPLParser.HOUR: + case OpenSearchPPLParser.DAY: + case OpenSearchPPLParser.WEEK: + case OpenSearchPPLParser.MONTH: + case OpenSearchPPLParser.QUARTER: + case OpenSearchPPLParser.YEAR: + case OpenSearchPPLParser.CONVERT_TZ: + case OpenSearchPPLParser.DOT: + case OpenSearchPPLParser.BACKTICK: + case OpenSearchPPLParser.AVG: + case OpenSearchPPLParser.COUNT: + case OpenSearchPPLParser.MAX: + case OpenSearchPPLParser.MIN: + case OpenSearchPPLParser.SUM: + case OpenSearchPPLParser.VAR_SAMP: + case OpenSearchPPLParser.VAR_POP: + case OpenSearchPPLParser.STDDEV_SAMP: + case OpenSearchPPLParser.STDDEV_POP: + case OpenSearchPPLParser.FIRST: + case OpenSearchPPLParser.LAST: + case OpenSearchPPLParser.ABS: + case OpenSearchPPLParser.CEIL: + case OpenSearchPPLParser.CEILING: + case OpenSearchPPLParser.CONV: + case OpenSearchPPLParser.CRC32: + case OpenSearchPPLParser.E: + case OpenSearchPPLParser.EXP: + case OpenSearchPPLParser.FLOOR: + case OpenSearchPPLParser.LN: + case OpenSearchPPLParser.LOG: + case OpenSearchPPLParser.LOG10: + case OpenSearchPPLParser.LOG2: + case OpenSearchPPLParser.MOD: + case OpenSearchPPLParser.PI: + case OpenSearchPPLParser.POW: + case OpenSearchPPLParser.POWER: + case OpenSearchPPLParser.RAND: + case OpenSearchPPLParser.ROUND: + case OpenSearchPPLParser.SIGN: + case OpenSearchPPLParser.SQRT: + case OpenSearchPPLParser.TRUNCATE: + case OpenSearchPPLParser.ACOS: + case OpenSearchPPLParser.ASIN: + case OpenSearchPPLParser.ATAN: + case OpenSearchPPLParser.ATAN2: + case OpenSearchPPLParser.COS: + case OpenSearchPPLParser.COT: + case OpenSearchPPLParser.DEGREES: + case OpenSearchPPLParser.RADIANS: + case OpenSearchPPLParser.SIN: + case OpenSearchPPLParser.TAN: + case OpenSearchPPLParser.ADDDATE: + case OpenSearchPPLParser.CURDATE: + case OpenSearchPPLParser.CURRENT_DATE: + case OpenSearchPPLParser.CURRENT_TIME: + case OpenSearchPPLParser.CURRENT_TIMESTAMP: + case OpenSearchPPLParser.CURTIME: + case OpenSearchPPLParser.DATE: + case OpenSearchPPLParser.DATE_ADD: + case OpenSearchPPLParser.DATE_FORMAT: + case OpenSearchPPLParser.DATE_SUB: + case OpenSearchPPLParser.DAYNAME: + case OpenSearchPPLParser.DAYOFMONTH: + case OpenSearchPPLParser.DAYOFWEEK: + case OpenSearchPPLParser.DAYOFYEAR: + case OpenSearchPPLParser.FROM_DAYS: + case OpenSearchPPLParser.LOCALTIME: + case OpenSearchPPLParser.LOCALTIMESTAMP: + case OpenSearchPPLParser.FROM_UNIXTIME: + case OpenSearchPPLParser.MAKEDATE: + case OpenSearchPPLParser.MAKETIME: + case OpenSearchPPLParser.MONTHNAME: + case OpenSearchPPLParser.NOW: + case OpenSearchPPLParser.PERIOD_ADD: + case OpenSearchPPLParser.PERIOD_DIFF: + case OpenSearchPPLParser.SUBDATE: + case OpenSearchPPLParser.SYSDATE: + case OpenSearchPPLParser.TIME: + case OpenSearchPPLParser.TIME_TO_SEC: + case OpenSearchPPLParser.TIMESTAMP: + case OpenSearchPPLParser.TO_DAYS: + case OpenSearchPPLParser.UTC_DATE: + case OpenSearchPPLParser.UTC_TIME: + case OpenSearchPPLParser.UTC_TIMESTAMP: + case OpenSearchPPLParser.UNIX_TIMESTAMP: + case OpenSearchPPLParser.SUBSTR: + case OpenSearchPPLParser.SUBSTRING: + case OpenSearchPPLParser.LTRIM: + case OpenSearchPPLParser.RTRIM: + case OpenSearchPPLParser.TRIM: + case OpenSearchPPLParser.LOWER: + case OpenSearchPPLParser.UPPER: + case OpenSearchPPLParser.CONCAT: + case OpenSearchPPLParser.CONCAT_WS: + case OpenSearchPPLParser.LENGTH: + case OpenSearchPPLParser.STRCMP: + case OpenSearchPPLParser.RIGHT: + case OpenSearchPPLParser.LEFT: + case OpenSearchPPLParser.ASCII: + case OpenSearchPPLParser.LOCATE: + case OpenSearchPPLParser.REPLACE: + case OpenSearchPPLParser.SPAN: + case OpenSearchPPLParser.MS: + case OpenSearchPPLParser.S: + case OpenSearchPPLParser.M: + case OpenSearchPPLParser.H: + case OpenSearchPPLParser.W: + case OpenSearchPPLParser.Q: + case OpenSearchPPLParser.Y: + case OpenSearchPPLParser.ID: + case OpenSearchPPLParser.BQUOTA_STRING: + this.enterOuterAlt(_localctx, 1); + { + this.state = 818; + this.qualifiedName(); + } + break; + case OpenSearchPPLParser.DQUOTA_STRING: + case OpenSearchPPLParser.SQUOTA_STRING: + this.enterOuterAlt(_localctx, 2); + { + this.state = 819; + this.stringLiteral(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public relevanceQuery(): RelevanceQueryContext { + let _localctx: RelevanceQueryContext = new RelevanceQueryContext(this._ctx, this.state); + this.enterRule(_localctx, 144, OpenSearchPPLParser.RULE_relevanceQuery); + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 822; + this.relevanceArgValue(); + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public relevanceArgValue(): RelevanceArgValueContext { + let _localctx: RelevanceArgValueContext = new RelevanceArgValueContext(this._ctx, this.state); + this.enterRule(_localctx, 146, OpenSearchPPLParser.RULE_relevanceArgValue); + try { + this.state = 826; + this._errHandler.sync(this); + switch ( this.interpreter.adaptivePredict(this._input, 68, this._ctx) ) { + case 1: + this.enterOuterAlt(_localctx, 1); + { + this.state = 824; + this.qualifiedName(); + } + break; + + case 2: + this.enterOuterAlt(_localctx, 2); + { + this.state = 825; + this.literalValue(); + } + break; + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public mathematicalFunctionBase(): MathematicalFunctionBaseContext { + let _localctx: MathematicalFunctionBaseContext = new MathematicalFunctionBaseContext(this._ctx, this.state); + this.enterRule(_localctx, 148, OpenSearchPPLParser.RULE_mathematicalFunctionBase); + try { + this.state = 850; + this._errHandler.sync(this); + switch (this._input.LA(1)) { + case OpenSearchPPLParser.ABS: + this.enterOuterAlt(_localctx, 1); + { + this.state = 828; + this.match(OpenSearchPPLParser.ABS); + } + break; + case OpenSearchPPLParser.CEIL: + this.enterOuterAlt(_localctx, 2); + { + this.state = 829; + this.match(OpenSearchPPLParser.CEIL); + } + break; + case OpenSearchPPLParser.CEILING: + this.enterOuterAlt(_localctx, 3); + { + this.state = 830; + this.match(OpenSearchPPLParser.CEILING); + } + break; + case OpenSearchPPLParser.CONV: + this.enterOuterAlt(_localctx, 4); + { + this.state = 831; + this.match(OpenSearchPPLParser.CONV); + } + break; + case OpenSearchPPLParser.CRC32: + this.enterOuterAlt(_localctx, 5); + { + this.state = 832; + this.match(OpenSearchPPLParser.CRC32); + } + break; + case OpenSearchPPLParser.E: + this.enterOuterAlt(_localctx, 6); + { + this.state = 833; + this.match(OpenSearchPPLParser.E); + } + break; + case OpenSearchPPLParser.EXP: + this.enterOuterAlt(_localctx, 7); + { + this.state = 834; + this.match(OpenSearchPPLParser.EXP); + } + break; + case OpenSearchPPLParser.FLOOR: + this.enterOuterAlt(_localctx, 8); + { + this.state = 835; + this.match(OpenSearchPPLParser.FLOOR); + } + break; + case OpenSearchPPLParser.LN: + this.enterOuterAlt(_localctx, 9); + { + this.state = 836; + this.match(OpenSearchPPLParser.LN); + } + break; + case OpenSearchPPLParser.LOG: + this.enterOuterAlt(_localctx, 10); + { + this.state = 837; + this.match(OpenSearchPPLParser.LOG); + } + break; + case OpenSearchPPLParser.LOG10: + this.enterOuterAlt(_localctx, 11); + { + this.state = 838; + this.match(OpenSearchPPLParser.LOG10); + } + break; + case OpenSearchPPLParser.LOG2: + this.enterOuterAlt(_localctx, 12); + { + this.state = 839; + this.match(OpenSearchPPLParser.LOG2); + } + break; + case OpenSearchPPLParser.MOD: + this.enterOuterAlt(_localctx, 13); + { + this.state = 840; + this.match(OpenSearchPPLParser.MOD); + } + break; + case OpenSearchPPLParser.PI: + this.enterOuterAlt(_localctx, 14); + { + this.state = 841; + this.match(OpenSearchPPLParser.PI); + } + break; + case OpenSearchPPLParser.POW: + this.enterOuterAlt(_localctx, 15); + { + this.state = 842; + this.match(OpenSearchPPLParser.POW); + } + break; + case OpenSearchPPLParser.POWER: + this.enterOuterAlt(_localctx, 16); + { + this.state = 843; + this.match(OpenSearchPPLParser.POWER); + } + break; + case OpenSearchPPLParser.RAND: + this.enterOuterAlt(_localctx, 17); + { + this.state = 844; + this.match(OpenSearchPPLParser.RAND); + } + break; + case OpenSearchPPLParser.ROUND: + this.enterOuterAlt(_localctx, 18); + { + this.state = 845; + this.match(OpenSearchPPLParser.ROUND); + } + break; + case OpenSearchPPLParser.SIGN: + this.enterOuterAlt(_localctx, 19); + { + this.state = 846; + this.match(OpenSearchPPLParser.SIGN); + } + break; + case OpenSearchPPLParser.SQRT: + this.enterOuterAlt(_localctx, 20); + { + this.state = 847; + this.match(OpenSearchPPLParser.SQRT); + } + break; + case OpenSearchPPLParser.TRUNCATE: + this.enterOuterAlt(_localctx, 21); + { + this.state = 848; + this.match(OpenSearchPPLParser.TRUNCATE); + } + break; + case OpenSearchPPLParser.ACOS: + case OpenSearchPPLParser.ASIN: + case OpenSearchPPLParser.ATAN: + case OpenSearchPPLParser.ATAN2: + case OpenSearchPPLParser.COS: + case OpenSearchPPLParser.COT: + case OpenSearchPPLParser.DEGREES: + case OpenSearchPPLParser.RADIANS: + case OpenSearchPPLParser.SIN: + case OpenSearchPPLParser.TAN: + this.enterOuterAlt(_localctx, 22); + { + this.state = 849; + this.trigonometricFunctionName(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public trigonometricFunctionName(): TrigonometricFunctionNameContext { + let _localctx: TrigonometricFunctionNameContext = new TrigonometricFunctionNameContext(this._ctx, this.state); + this.enterRule(_localctx, 150, OpenSearchPPLParser.RULE_trigonometricFunctionName); + let _la: number; + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 852; + _la = this._input.LA(1); + if (!(((((_la - 185)) & ~0x1F) === 0 && ((1 << (_la - 185)) & ((1 << (OpenSearchPPLParser.ACOS - 185)) | (1 << (OpenSearchPPLParser.ASIN - 185)) | (1 << (OpenSearchPPLParser.ATAN - 185)) | (1 << (OpenSearchPPLParser.ATAN2 - 185)) | (1 << (OpenSearchPPLParser.COS - 185)) | (1 << (OpenSearchPPLParser.COT - 185)) | (1 << (OpenSearchPPLParser.DEGREES - 185)) | (1 << (OpenSearchPPLParser.RADIANS - 185)) | (1 << (OpenSearchPPLParser.SIN - 185)) | (1 << (OpenSearchPPLParser.TAN - 185)))) !== 0))) { + this._errHandler.recoverInline(this); + } else { + if (this._input.LA(1) === Token.EOF) { + this.matchedEOF = true; + } + + this._errHandler.reportMatch(this); + this.consume(); + } + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public dateAndTimeFunctionBase(): DateAndTimeFunctionBaseContext { + let _localctx: DateAndTimeFunctionBaseContext = new DateAndTimeFunctionBaseContext(this._ctx, this.state); + this.enterRule(_localctx, 152, OpenSearchPPLParser.RULE_dateAndTimeFunctionBase); + let _la: number; + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 854; + _la = this._input.LA(1); + if (!(((((_la - 67)) & ~0x1F) === 0 && ((1 << (_la - 67)) & ((1 << (OpenSearchPPLParser.DATETIME - 67)) | (1 << (OpenSearchPPLParser.MICROSECOND - 67)) | (1 << (OpenSearchPPLParser.SECOND - 67)) | (1 << (OpenSearchPPLParser.MINUTE - 67)) | (1 << (OpenSearchPPLParser.HOUR - 67)) | (1 << (OpenSearchPPLParser.DAY - 67)) | (1 << (OpenSearchPPLParser.WEEK - 67)) | (1 << (OpenSearchPPLParser.MONTH - 67)) | (1 << (OpenSearchPPLParser.QUARTER - 67)) | (1 << (OpenSearchPPLParser.YEAR - 67)) | (1 << (OpenSearchPPLParser.CONVERT_TZ - 67)))) !== 0) || ((((_la - 195)) & ~0x1F) === 0 && ((1 << (_la - 195)) & ((1 << (OpenSearchPPLParser.ADDDATE - 195)) | (1 << (OpenSearchPPLParser.DATE - 195)) | (1 << (OpenSearchPPLParser.DATE_ADD - 195)) | (1 << (OpenSearchPPLParser.DATE_FORMAT - 195)) | (1 << (OpenSearchPPLParser.DATE_SUB - 195)) | (1 << (OpenSearchPPLParser.DAYNAME - 195)) | (1 << (OpenSearchPPLParser.DAYOFMONTH - 195)) | (1 << (OpenSearchPPLParser.DAYOFWEEK - 195)) | (1 << (OpenSearchPPLParser.DAYOFYEAR - 195)) | (1 << (OpenSearchPPLParser.FROM_DAYS - 195)) | (1 << (OpenSearchPPLParser.FROM_UNIXTIME - 195)) | (1 << (OpenSearchPPLParser.MAKEDATE - 195)) | (1 << (OpenSearchPPLParser.MAKETIME - 195)) | (1 << (OpenSearchPPLParser.MONTHNAME - 195)) | (1 << (OpenSearchPPLParser.PERIOD_ADD - 195)) | (1 << (OpenSearchPPLParser.PERIOD_DIFF - 195)) | (1 << (OpenSearchPPLParser.SUBDATE - 195)) | (1 << (OpenSearchPPLParser.SYSDATE - 195)) | (1 << (OpenSearchPPLParser.TIME - 195)) | (1 << (OpenSearchPPLParser.TIME_TO_SEC - 195)) | (1 << (OpenSearchPPLParser.TIMESTAMP - 195)) | (1 << (OpenSearchPPLParser.TO_DAYS - 195)))) !== 0) || _la === OpenSearchPPLParser.UNIX_TIMESTAMP)) { + this._errHandler.recoverInline(this); + } else { + if (this._input.LA(1) === Token.EOF) { + this.matchedEOF = true; + } + + this._errHandler.reportMatch(this); + this.consume(); + } + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public constantFunctionName(): ConstantFunctionNameContext { + let _localctx: ConstantFunctionNameContext = new ConstantFunctionNameContext(this._ctx, this.state); + this.enterRule(_localctx, 154, OpenSearchPPLParser.RULE_constantFunctionName); + let _la: number; + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 856; + _la = this._input.LA(1); + if (!(((((_la - 196)) & ~0x1F) === 0 && ((1 << (_la - 196)) & ((1 << (OpenSearchPPLParser.CURDATE - 196)) | (1 << (OpenSearchPPLParser.CURRENT_DATE - 196)) | (1 << (OpenSearchPPLParser.CURRENT_TIME - 196)) | (1 << (OpenSearchPPLParser.CURRENT_TIMESTAMP - 196)) | (1 << (OpenSearchPPLParser.CURTIME - 196)) | (1 << (OpenSearchPPLParser.LOCALTIME - 196)) | (1 << (OpenSearchPPLParser.LOCALTIMESTAMP - 196)) | (1 << (OpenSearchPPLParser.NOW - 196)) | (1 << (OpenSearchPPLParser.UTC_DATE - 196)) | (1 << (OpenSearchPPLParser.UTC_TIME - 196)) | (1 << (OpenSearchPPLParser.UTC_TIMESTAMP - 196)))) !== 0))) { + this._errHandler.recoverInline(this); + } else { + if (this._input.LA(1) === Token.EOF) { + this.matchedEOF = true; + } + + this._errHandler.reportMatch(this); + this.consume(); + } + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public conditionFunctionBase(): ConditionFunctionBaseContext { + let _localctx: ConditionFunctionBaseContext = new ConditionFunctionBaseContext(this._ctx, this.state); + this.enterRule(_localctx, 156, OpenSearchPPLParser.RULE_conditionFunctionBase); + let _la: number; + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 858; + _la = this._input.LA(1); + if (!(((((_la - 247)) & ~0x1F) === 0 && ((1 << (_la - 247)) & ((1 << (OpenSearchPPLParser.LIKE - 247)) | (1 << (OpenSearchPPLParser.ISNULL - 247)) | (1 << (OpenSearchPPLParser.ISNOTNULL - 247)) | (1 << (OpenSearchPPLParser.IFNULL - 247)) | (1 << (OpenSearchPPLParser.NULLIF - 247)) | (1 << (OpenSearchPPLParser.IF - 247)))) !== 0))) { + this._errHandler.recoverInline(this); + } else { + if (this._input.LA(1) === Token.EOF) { + this.matchedEOF = true; + } + + this._errHandler.reportMatch(this); + this.consume(); + } + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public systemFunctionBase(): SystemFunctionBaseContext { + let _localctx: SystemFunctionBaseContext = new SystemFunctionBaseContext(this._ctx, this.state); + this.enterRule(_localctx, 158, OpenSearchPPLParser.RULE_systemFunctionBase); + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 860; + this.match(OpenSearchPPLParser.TYPEOF); + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public textFunctionBase(): TextFunctionBaseContext { + let _localctx: TextFunctionBaseContext = new TextFunctionBaseContext(this._ctx, this.state); + this.enterRule(_localctx, 160, OpenSearchPPLParser.RULE_textFunctionBase); + let _la: number; + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 862; + _la = this._input.LA(1); + if (!(((((_la - 229)) & ~0x1F) === 0 && ((1 << (_la - 229)) & ((1 << (OpenSearchPPLParser.SUBSTR - 229)) | (1 << (OpenSearchPPLParser.SUBSTRING - 229)) | (1 << (OpenSearchPPLParser.LTRIM - 229)) | (1 << (OpenSearchPPLParser.RTRIM - 229)) | (1 << (OpenSearchPPLParser.TRIM - 229)) | (1 << (OpenSearchPPLParser.LOWER - 229)) | (1 << (OpenSearchPPLParser.UPPER - 229)) | (1 << (OpenSearchPPLParser.CONCAT - 229)) | (1 << (OpenSearchPPLParser.CONCAT_WS - 229)) | (1 << (OpenSearchPPLParser.LENGTH - 229)) | (1 << (OpenSearchPPLParser.STRCMP - 229)) | (1 << (OpenSearchPPLParser.RIGHT - 229)) | (1 << (OpenSearchPPLParser.LEFT - 229)) | (1 << (OpenSearchPPLParser.ASCII - 229)) | (1 << (OpenSearchPPLParser.LOCATE - 229)) | (1 << (OpenSearchPPLParser.REPLACE - 229)))) !== 0))) { + this._errHandler.recoverInline(this); + } else { + if (this._input.LA(1) === Token.EOF) { + this.matchedEOF = true; + } + + this._errHandler.reportMatch(this); + this.consume(); + } + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public comparisonOperator(): ComparisonOperatorContext { + let _localctx: ComparisonOperatorContext = new ComparisonOperatorContext(this._ctx, this.state); + this.enterRule(_localctx, 162, OpenSearchPPLParser.RULE_comparisonOperator); + let _la: number; + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 864; + _la = this._input.LA(1); + if (!(_la === OpenSearchPPLParser.REGEXP || ((((_la - 104)) & ~0x1F) === 0 && ((1 << (_la - 104)) & ((1 << (OpenSearchPPLParser.EQUAL - 104)) | (1 << (OpenSearchPPLParser.GREATER - 104)) | (1 << (OpenSearchPPLParser.LESS - 104)) | (1 << (OpenSearchPPLParser.NOT_GREATER - 104)) | (1 << (OpenSearchPPLParser.NOT_LESS - 104)) | (1 << (OpenSearchPPLParser.NOT_EQUAL - 104)))) !== 0))) { + this._errHandler.recoverInline(this); + } else { + if (this._input.LA(1) === Token.EOF) { + this.matchedEOF = true; + } + + this._errHandler.reportMatch(this); + this.consume(); + } + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public binaryOperator(): BinaryOperatorContext { + let _localctx: BinaryOperatorContext = new BinaryOperatorContext(this._ctx, this.state); + this.enterRule(_localctx, 164, OpenSearchPPLParser.RULE_binaryOperator); + let _la: number; + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 866; + _la = this._input.LA(1); + if (!(((((_la - 110)) & ~0x1F) === 0 && ((1 << (_la - 110)) & ((1 << (OpenSearchPPLParser.PLUS - 110)) | (1 << (OpenSearchPPLParser.MINUS - 110)) | (1 << (OpenSearchPPLParser.STAR - 110)) | (1 << (OpenSearchPPLParser.DIVIDE - 110)) | (1 << (OpenSearchPPLParser.MODULE - 110)))) !== 0))) { + this._errHandler.recoverInline(this); + } else { + if (this._input.LA(1) === Token.EOF) { + this.matchedEOF = true; + } + + this._errHandler.reportMatch(this); + this.consume(); + } + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public singleFieldRelevanceFunctionName(): SingleFieldRelevanceFunctionNameContext { + let _localctx: SingleFieldRelevanceFunctionNameContext = new SingleFieldRelevanceFunctionNameContext(this._ctx, this.state); + this.enterRule(_localctx, 166, OpenSearchPPLParser.RULE_singleFieldRelevanceFunctionName); + let _la: number; + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 868; + _la = this._input.LA(1); + if (!(((((_la - 254)) & ~0x1F) === 0 && ((1 << (_la - 254)) & ((1 << (OpenSearchPPLParser.MATCH - 254)) | (1 << (OpenSearchPPLParser.MATCH_PHRASE - 254)) | (1 << (OpenSearchPPLParser.MATCH_PHRASE_PREFIX - 254)) | (1 << (OpenSearchPPLParser.MATCH_BOOL_PREFIX - 254)))) !== 0))) { + this._errHandler.recoverInline(this); + } else { + if (this._input.LA(1) === Token.EOF) { + this.matchedEOF = true; + } + + this._errHandler.reportMatch(this); + this.consume(); + } + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public multiFieldRelevanceFunctionName(): MultiFieldRelevanceFunctionNameContext { + let _localctx: MultiFieldRelevanceFunctionNameContext = new MultiFieldRelevanceFunctionNameContext(this._ctx, this.state); + this.enterRule(_localctx, 168, OpenSearchPPLParser.RULE_multiFieldRelevanceFunctionName); + let _la: number; + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 870; + _la = this._input.LA(1); + if (!(((((_la - 258)) & ~0x1F) === 0 && ((1 << (_la - 258)) & ((1 << (OpenSearchPPLParser.SIMPLE_QUERY_STRING - 258)) | (1 << (OpenSearchPPLParser.MULTI_MATCH - 258)) | (1 << (OpenSearchPPLParser.QUERY_STRING - 258)))) !== 0))) { + this._errHandler.recoverInline(this); + } else { + if (this._input.LA(1) === Token.EOF) { + this.matchedEOF = true; + } + + this._errHandler.reportMatch(this); + this.consume(); + } + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public literalValue(): LiteralValueContext { + let _localctx: LiteralValueContext = new LiteralValueContext(this._ctx, this.state); + this.enterRule(_localctx, 170, OpenSearchPPLParser.RULE_literalValue); + try { + this.state = 878; + this._errHandler.sync(this); + switch ( this.interpreter.adaptivePredict(this._input, 70, this._ctx) ) { + case 1: + this.enterOuterAlt(_localctx, 1); + { + this.state = 872; + this.intervalLiteral(); + } + break; + + case 2: + this.enterOuterAlt(_localctx, 2); + { + this.state = 873; + this.stringLiteral(); + } + break; + + case 3: + this.enterOuterAlt(_localctx, 3); + { + this.state = 874; + this.integerLiteral(); + } + break; + + case 4: + this.enterOuterAlt(_localctx, 4); + { + this.state = 875; + this.decimalLiteral(); + } + break; + + case 5: + this.enterOuterAlt(_localctx, 5); + { + this.state = 876; + this.booleanLiteral(); + } + break; + + case 6: + this.enterOuterAlt(_localctx, 6); + { + this.state = 877; + this.datetimeLiteral(); + } + break; + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public intervalLiteral(): IntervalLiteralContext { + let _localctx: IntervalLiteralContext = new IntervalLiteralContext(this._ctx, this.state); + this.enterRule(_localctx, 172, OpenSearchPPLParser.RULE_intervalLiteral); + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 880; + this.match(OpenSearchPPLParser.INTERVAL); + this.state = 881; + this.valueExpression(0); + this.state = 882; + this.intervalUnit(); + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public stringLiteral(): StringLiteralContext { + let _localctx: StringLiteralContext = new StringLiteralContext(this._ctx, this.state); + this.enterRule(_localctx, 174, OpenSearchPPLParser.RULE_stringLiteral); + let _la: number; + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 884; + _la = this._input.LA(1); + if (!(_la === OpenSearchPPLParser.DQUOTA_STRING || _la === OpenSearchPPLParser.SQUOTA_STRING)) { + this._errHandler.recoverInline(this); + } else { + if (this._input.LA(1) === Token.EOF) { + this.matchedEOF = true; + } + + this._errHandler.reportMatch(this); + this.consume(); + } + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public integerLiteral(): IntegerLiteralContext { + let _localctx: IntegerLiteralContext = new IntegerLiteralContext(this._ctx, this.state); + this.enterRule(_localctx, 176, OpenSearchPPLParser.RULE_integerLiteral); + let _la: number; + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 887; + this._errHandler.sync(this); + _la = this._input.LA(1); + if (_la === OpenSearchPPLParser.PLUS || _la === OpenSearchPPLParser.MINUS) { + { + this.state = 886; + _la = this._input.LA(1); + if (!(_la === OpenSearchPPLParser.PLUS || _la === OpenSearchPPLParser.MINUS)) { + this._errHandler.recoverInline(this); + } else { + if (this._input.LA(1) === Token.EOF) { + this.matchedEOF = true; + } + + this._errHandler.reportMatch(this); + this.consume(); + } + } + } + + this.state = 889; + this.match(OpenSearchPPLParser.INTEGER_LITERAL); + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public decimalLiteral(): DecimalLiteralContext { + let _localctx: DecimalLiteralContext = new DecimalLiteralContext(this._ctx, this.state); + this.enterRule(_localctx, 178, OpenSearchPPLParser.RULE_decimalLiteral); + let _la: number; + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 892; + this._errHandler.sync(this); + _la = this._input.LA(1); + if (_la === OpenSearchPPLParser.PLUS || _la === OpenSearchPPLParser.MINUS) { + { + this.state = 891; + _la = this._input.LA(1); + if (!(_la === OpenSearchPPLParser.PLUS || _la === OpenSearchPPLParser.MINUS)) { + this._errHandler.recoverInline(this); + } else { + if (this._input.LA(1) === Token.EOF) { + this.matchedEOF = true; + } + + this._errHandler.reportMatch(this); + this.consume(); + } + } + } + + this.state = 894; + this.match(OpenSearchPPLParser.DECIMAL_LITERAL); + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public booleanLiteral(): BooleanLiteralContext { + let _localctx: BooleanLiteralContext = new BooleanLiteralContext(this._ctx, this.state); + this.enterRule(_localctx, 180, OpenSearchPPLParser.RULE_booleanLiteral); + let _la: number; + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 896; + _la = this._input.LA(1); + if (!(_la === OpenSearchPPLParser.TRUE || _la === OpenSearchPPLParser.FALSE)) { + this._errHandler.recoverInline(this); + } else { + if (this._input.LA(1) === Token.EOF) { + this.matchedEOF = true; + } + + this._errHandler.reportMatch(this); + this.consume(); + } + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public datetimeLiteral(): DatetimeLiteralContext { + let _localctx: DatetimeLiteralContext = new DatetimeLiteralContext(this._ctx, this.state); + this.enterRule(_localctx, 182, OpenSearchPPLParser.RULE_datetimeLiteral); + try { + this.state = 901; + this._errHandler.sync(this); + switch (this._input.LA(1)) { + case OpenSearchPPLParser.DATE: + this.enterOuterAlt(_localctx, 1); + { + this.state = 898; + this.dateLiteral(); + } + break; + case OpenSearchPPLParser.TIME: + this.enterOuterAlt(_localctx, 2); + { + this.state = 899; + this.timeLiteral(); + } + break; + case OpenSearchPPLParser.TIMESTAMP: + this.enterOuterAlt(_localctx, 3); + { + this.state = 900; + this.timestampLiteral(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public dateLiteral(): DateLiteralContext { + let _localctx: DateLiteralContext = new DateLiteralContext(this._ctx, this.state); + this.enterRule(_localctx, 184, OpenSearchPPLParser.RULE_dateLiteral); + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 903; + this.match(OpenSearchPPLParser.DATE); + this.state = 904; + _localctx._date = this.stringLiteral(); + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public timeLiteral(): TimeLiteralContext { + let _localctx: TimeLiteralContext = new TimeLiteralContext(this._ctx, this.state); + this.enterRule(_localctx, 186, OpenSearchPPLParser.RULE_timeLiteral); + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 906; + this.match(OpenSearchPPLParser.TIME); + this.state = 907; + _localctx._time = this.stringLiteral(); + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public timestampLiteral(): TimestampLiteralContext { + let _localctx: TimestampLiteralContext = new TimestampLiteralContext(this._ctx, this.state); + this.enterRule(_localctx, 188, OpenSearchPPLParser.RULE_timestampLiteral); + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 909; + this.match(OpenSearchPPLParser.TIMESTAMP); + this.state = 910; + _localctx._timestamp = this.stringLiteral(); + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public intervalUnit(): IntervalUnitContext { + let _localctx: IntervalUnitContext = new IntervalUnitContext(this._ctx, this.state); + this.enterRule(_localctx, 190, OpenSearchPPLParser.RULE_intervalUnit); + let _la: number; + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 912; + _la = this._input.LA(1); + if (!(((((_la - 69)) & ~0x1F) === 0 && ((1 << (_la - 69)) & ((1 << (OpenSearchPPLParser.MICROSECOND - 69)) | (1 << (OpenSearchPPLParser.SECOND - 69)) | (1 << (OpenSearchPPLParser.MINUTE - 69)) | (1 << (OpenSearchPPLParser.HOUR - 69)) | (1 << (OpenSearchPPLParser.DAY - 69)) | (1 << (OpenSearchPPLParser.WEEK - 69)) | (1 << (OpenSearchPPLParser.MONTH - 69)) | (1 << (OpenSearchPPLParser.QUARTER - 69)) | (1 << (OpenSearchPPLParser.YEAR - 69)) | (1 << (OpenSearchPPLParser.SECOND_MICROSECOND - 69)) | (1 << (OpenSearchPPLParser.MINUTE_MICROSECOND - 69)) | (1 << (OpenSearchPPLParser.MINUTE_SECOND - 69)) | (1 << (OpenSearchPPLParser.HOUR_MICROSECOND - 69)) | (1 << (OpenSearchPPLParser.HOUR_SECOND - 69)) | (1 << (OpenSearchPPLParser.HOUR_MINUTE - 69)) | (1 << (OpenSearchPPLParser.DAY_MICROSECOND - 69)) | (1 << (OpenSearchPPLParser.DAY_SECOND - 69)) | (1 << (OpenSearchPPLParser.DAY_MINUTE - 69)) | (1 << (OpenSearchPPLParser.DAY_HOUR - 69)) | (1 << (OpenSearchPPLParser.YEAR_MONTH - 69)))) !== 0))) { + this._errHandler.recoverInline(this); + } else { + if (this._input.LA(1) === Token.EOF) { + this.matchedEOF = true; + } + + this._errHandler.reportMatch(this); + this.consume(); + } + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public timespanUnit(): TimespanUnitContext { + let _localctx: TimespanUnitContext = new TimespanUnitContext(this._ctx, this.state); + this.enterRule(_localctx, 192, OpenSearchPPLParser.RULE_timespanUnit); + let _la: number; + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 914; + _la = this._input.LA(1); + if (!(_la === OpenSearchPPLParser.D || ((((_la - 70)) & ~0x1F) === 0 && ((1 << (_la - 70)) & ((1 << (OpenSearchPPLParser.MILLISECOND - 70)) | (1 << (OpenSearchPPLParser.SECOND - 70)) | (1 << (OpenSearchPPLParser.MINUTE - 70)) | (1 << (OpenSearchPPLParser.HOUR - 70)) | (1 << (OpenSearchPPLParser.DAY - 70)) | (1 << (OpenSearchPPLParser.WEEK - 70)) | (1 << (OpenSearchPPLParser.MONTH - 70)) | (1 << (OpenSearchPPLParser.QUARTER - 70)) | (1 << (OpenSearchPPLParser.YEAR - 70)))) !== 0) || ((((_la - 293)) & ~0x1F) === 0 && ((1 << (_la - 293)) & ((1 << (OpenSearchPPLParser.MS - 293)) | (1 << (OpenSearchPPLParser.S - 293)) | (1 << (OpenSearchPPLParser.M - 293)) | (1 << (OpenSearchPPLParser.H - 293)) | (1 << (OpenSearchPPLParser.W - 293)) | (1 << (OpenSearchPPLParser.Q - 293)) | (1 << (OpenSearchPPLParser.Y - 293)))) !== 0))) { + this._errHandler.recoverInline(this); + } else { + if (this._input.LA(1) === Token.EOF) { + this.matchedEOF = true; + } + + this._errHandler.reportMatch(this); + this.consume(); + } + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public valueList(): ValueListContext { + let _localctx: ValueListContext = new ValueListContext(this._ctx, this.state); + this.enterRule(_localctx, 194, OpenSearchPPLParser.RULE_valueList); + let _la: number; + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 916; + this.match(OpenSearchPPLParser.LT_PRTHS); + this.state = 917; + this.literalValue(); + this.state = 922; + this._errHandler.sync(this); + _la = this._input.LA(1); + while (_la === OpenSearchPPLParser.COMMA) { + { + { + this.state = 918; + this.match(OpenSearchPPLParser.COMMA); + this.state = 919; + this.literalValue(); + } + } + this.state = 924; + this._errHandler.sync(this); + _la = this._input.LA(1); + } + this.state = 925; + this.match(OpenSearchPPLParser.RT_PRTHS); + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public qualifiedName(): QualifiedNameContext { + let _localctx: QualifiedNameContext = new QualifiedNameContext(this._ctx, this.state); + this.enterRule(_localctx, 196, OpenSearchPPLParser.RULE_qualifiedName); + try { + let _alt: number; + _localctx = new IdentsAsQualifiedNameContext(_localctx); + this.enterOuterAlt(_localctx, 1); + { + this.state = 927; + this.ident(); + this.state = 932; + this._errHandler.sync(this); + _alt = this.interpreter.adaptivePredict(this._input, 75, this._ctx); + while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { + if (_alt === 1) { + { + { + this.state = 928; + this.match(OpenSearchPPLParser.DOT); + this.state = 929; + this.ident(); + } + } + } + this.state = 934; + this._errHandler.sync(this); + _alt = this.interpreter.adaptivePredict(this._input, 75, this._ctx); + } + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public wcQualifiedName(): WcQualifiedNameContext { + let _localctx: WcQualifiedNameContext = new WcQualifiedNameContext(this._ctx, this.state); + this.enterRule(_localctx, 198, OpenSearchPPLParser.RULE_wcQualifiedName); + let _la: number; + try { + _localctx = new IdentsAsWildcardQualifiedNameContext(_localctx); + this.enterOuterAlt(_localctx, 1); + { + this.state = 935; + this.wildcard(); + this.state = 940; + this._errHandler.sync(this); + _la = this._input.LA(1); + while (_la === OpenSearchPPLParser.DOT) { + { + { + this.state = 936; + this.match(OpenSearchPPLParser.DOT); + this.state = 937; + this.wildcard(); + } + } + this.state = 942; + this._errHandler.sync(this); + _la = this._input.LA(1); + } + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public ident(): IdentContext { + let _localctx: IdentContext = new IdentContext(this._ctx, this.state); + this.enterRule(_localctx, 200, OpenSearchPPLParser.RULE_ident); + let _la: number; + try { + this.state = 953; + this._errHandler.sync(this); + switch (this._input.LA(1)) { + case OpenSearchPPLParser.DOT: + case OpenSearchPPLParser.ID: + this.enterOuterAlt(_localctx, 1); + { + this.state = 944; + this._errHandler.sync(this); + _la = this._input.LA(1); + if (_la === OpenSearchPPLParser.DOT) { + { + this.state = 943; + this.match(OpenSearchPPLParser.DOT); + } + } + + this.state = 946; + this.match(OpenSearchPPLParser.ID); + } + break; + case OpenSearchPPLParser.BACKTICK: + this.enterOuterAlt(_localctx, 2); + { + this.state = 947; + this.match(OpenSearchPPLParser.BACKTICK); + this.state = 948; + this.ident(); + this.state = 949; + this.match(OpenSearchPPLParser.BACKTICK); + } + break; + case OpenSearchPPLParser.BQUOTA_STRING: + this.enterOuterAlt(_localctx, 3); + { + this.state = 951; + this.match(OpenSearchPPLParser.BQUOTA_STRING); + } + break; + case OpenSearchPPLParser.D: + case OpenSearchPPLParser.DATETIME: + case OpenSearchPPLParser.MICROSECOND: + case OpenSearchPPLParser.MILLISECOND: + case OpenSearchPPLParser.SECOND: + case OpenSearchPPLParser.MINUTE: + case OpenSearchPPLParser.HOUR: + case OpenSearchPPLParser.DAY: + case OpenSearchPPLParser.WEEK: + case OpenSearchPPLParser.MONTH: + case OpenSearchPPLParser.QUARTER: + case OpenSearchPPLParser.YEAR: + case OpenSearchPPLParser.CONVERT_TZ: + case OpenSearchPPLParser.AVG: + case OpenSearchPPLParser.COUNT: + case OpenSearchPPLParser.MAX: + case OpenSearchPPLParser.MIN: + case OpenSearchPPLParser.SUM: + case OpenSearchPPLParser.VAR_SAMP: + case OpenSearchPPLParser.VAR_POP: + case OpenSearchPPLParser.STDDEV_SAMP: + case OpenSearchPPLParser.STDDEV_POP: + case OpenSearchPPLParser.FIRST: + case OpenSearchPPLParser.LAST: + case OpenSearchPPLParser.ABS: + case OpenSearchPPLParser.CEIL: + case OpenSearchPPLParser.CEILING: + case OpenSearchPPLParser.CONV: + case OpenSearchPPLParser.CRC32: + case OpenSearchPPLParser.E: + case OpenSearchPPLParser.EXP: + case OpenSearchPPLParser.FLOOR: + case OpenSearchPPLParser.LN: + case OpenSearchPPLParser.LOG: + case OpenSearchPPLParser.LOG10: + case OpenSearchPPLParser.LOG2: + case OpenSearchPPLParser.MOD: + case OpenSearchPPLParser.PI: + case OpenSearchPPLParser.POW: + case OpenSearchPPLParser.POWER: + case OpenSearchPPLParser.RAND: + case OpenSearchPPLParser.ROUND: + case OpenSearchPPLParser.SIGN: + case OpenSearchPPLParser.SQRT: + case OpenSearchPPLParser.TRUNCATE: + case OpenSearchPPLParser.ACOS: + case OpenSearchPPLParser.ASIN: + case OpenSearchPPLParser.ATAN: + case OpenSearchPPLParser.ATAN2: + case OpenSearchPPLParser.COS: + case OpenSearchPPLParser.COT: + case OpenSearchPPLParser.DEGREES: + case OpenSearchPPLParser.RADIANS: + case OpenSearchPPLParser.SIN: + case OpenSearchPPLParser.TAN: + case OpenSearchPPLParser.ADDDATE: + case OpenSearchPPLParser.CURDATE: + case OpenSearchPPLParser.CURRENT_DATE: + case OpenSearchPPLParser.CURRENT_TIME: + case OpenSearchPPLParser.CURRENT_TIMESTAMP: + case OpenSearchPPLParser.CURTIME: + case OpenSearchPPLParser.DATE: + case OpenSearchPPLParser.DATE_ADD: + case OpenSearchPPLParser.DATE_FORMAT: + case OpenSearchPPLParser.DATE_SUB: + case OpenSearchPPLParser.DAYNAME: + case OpenSearchPPLParser.DAYOFMONTH: + case OpenSearchPPLParser.DAYOFWEEK: + case OpenSearchPPLParser.DAYOFYEAR: + case OpenSearchPPLParser.FROM_DAYS: + case OpenSearchPPLParser.LOCALTIME: + case OpenSearchPPLParser.LOCALTIMESTAMP: + case OpenSearchPPLParser.FROM_UNIXTIME: + case OpenSearchPPLParser.MAKEDATE: + case OpenSearchPPLParser.MAKETIME: + case OpenSearchPPLParser.MONTHNAME: + case OpenSearchPPLParser.NOW: + case OpenSearchPPLParser.PERIOD_ADD: + case OpenSearchPPLParser.PERIOD_DIFF: + case OpenSearchPPLParser.SUBDATE: + case OpenSearchPPLParser.SYSDATE: + case OpenSearchPPLParser.TIME: + case OpenSearchPPLParser.TIME_TO_SEC: + case OpenSearchPPLParser.TIMESTAMP: + case OpenSearchPPLParser.TO_DAYS: + case OpenSearchPPLParser.UTC_DATE: + case OpenSearchPPLParser.UTC_TIME: + case OpenSearchPPLParser.UTC_TIMESTAMP: + case OpenSearchPPLParser.UNIX_TIMESTAMP: + case OpenSearchPPLParser.SUBSTR: + case OpenSearchPPLParser.SUBSTRING: + case OpenSearchPPLParser.LTRIM: + case OpenSearchPPLParser.RTRIM: + case OpenSearchPPLParser.TRIM: + case OpenSearchPPLParser.LOWER: + case OpenSearchPPLParser.UPPER: + case OpenSearchPPLParser.CONCAT: + case OpenSearchPPLParser.CONCAT_WS: + case OpenSearchPPLParser.LENGTH: + case OpenSearchPPLParser.STRCMP: + case OpenSearchPPLParser.RIGHT: + case OpenSearchPPLParser.LEFT: + case OpenSearchPPLParser.ASCII: + case OpenSearchPPLParser.LOCATE: + case OpenSearchPPLParser.REPLACE: + case OpenSearchPPLParser.SPAN: + case OpenSearchPPLParser.MS: + case OpenSearchPPLParser.S: + case OpenSearchPPLParser.M: + case OpenSearchPPLParser.H: + case OpenSearchPPLParser.W: + case OpenSearchPPLParser.Q: + case OpenSearchPPLParser.Y: + this.enterOuterAlt(_localctx, 4); + { + this.state = 952; + this.keywordsCanBeId(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public wildcard(): WildcardContext { + let _localctx: WildcardContext = new WildcardContext(this._ctx, this.state); + this.enterRule(_localctx, 202, OpenSearchPPLParser.RULE_wildcard); + let _la: number; + try { + let _alt: number; + this.state = 978; + this._errHandler.sync(this); + switch ( this.interpreter.adaptivePredict(this._input, 81, this._ctx) ) { + case 1: + this.enterOuterAlt(_localctx, 1); + { + this.state = 955; + this.ident(); + this.state = 960; + this._errHandler.sync(this); + _alt = this.interpreter.adaptivePredict(this._input, 79, this._ctx); + while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { + if (_alt === 1) { + { + { + this.state = 956; + this.match(OpenSearchPPLParser.MODULE); + this.state = 957; + this.ident(); + } + } + } + this.state = 962; + this._errHandler.sync(this); + _alt = this.interpreter.adaptivePredict(this._input, 79, this._ctx); + } + this.state = 964; + this._errHandler.sync(this); + _la = this._input.LA(1); + if (_la === OpenSearchPPLParser.MODULE) { + { + this.state = 963; + this.match(OpenSearchPPLParser.MODULE); + } + } + + } + break; + + case 2: + this.enterOuterAlt(_localctx, 2); + { + this.state = 966; + this.match(OpenSearchPPLParser.SINGLE_QUOTE); + this.state = 967; + this.wildcard(); + this.state = 968; + this.match(OpenSearchPPLParser.SINGLE_QUOTE); + } + break; + + case 3: + this.enterOuterAlt(_localctx, 3); + { + this.state = 970; + this.match(OpenSearchPPLParser.DOUBLE_QUOTE); + this.state = 971; + this.wildcard(); + this.state = 972; + this.match(OpenSearchPPLParser.DOUBLE_QUOTE); + } + break; + + case 4: + this.enterOuterAlt(_localctx, 4); + { + this.state = 974; + this.match(OpenSearchPPLParser.BACKTICK); + this.state = 975; + this.wildcard(); + this.state = 976; + this.match(OpenSearchPPLParser.BACKTICK); + } + break; + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public keywordsCanBeId(): KeywordsCanBeIdContext { + let _localctx: KeywordsCanBeIdContext = new KeywordsCanBeIdContext(this._ctx, this.state); + this.enterRule(_localctx, 204, OpenSearchPPLParser.RULE_keywordsCanBeId); + try { + this.state = 993; + this._errHandler.sync(this); + switch ( this.interpreter.adaptivePredict(this._input, 82, this._ctx) ) { + case 1: + this.enterOuterAlt(_localctx, 1); + { + this.state = 980; + this.match(OpenSearchPPLParser.D); + } + break; + + case 2: + this.enterOuterAlt(_localctx, 2); + { + this.state = 981; + this.statsFunctionName(); + } + break; + + case 3: + this.enterOuterAlt(_localctx, 3); + { + this.state = 982; + this.match(OpenSearchPPLParser.TIMESTAMP); + } + break; + + case 4: + this.enterOuterAlt(_localctx, 4); + { + this.state = 983; + this.match(OpenSearchPPLParser.DATE); + } + break; + + case 5: + this.enterOuterAlt(_localctx, 5); + { + this.state = 984; + this.match(OpenSearchPPLParser.TIME); + } + break; + + case 6: + this.enterOuterAlt(_localctx, 6); + { + this.state = 985; + this.match(OpenSearchPPLParser.FIRST); + } + break; + + case 7: + this.enterOuterAlt(_localctx, 7); + { + this.state = 986; + this.match(OpenSearchPPLParser.LAST); + } + break; + + case 8: + this.enterOuterAlt(_localctx, 8); + { + this.state = 987; + this.timespanUnit(); + } + break; + + case 9: + this.enterOuterAlt(_localctx, 9); + { + this.state = 988; + this.match(OpenSearchPPLParser.SPAN); + } + break; + + case 10: + this.enterOuterAlt(_localctx, 10); + { + this.state = 989; + this.constantFunctionName(); + } + break; + + case 11: + this.enterOuterAlt(_localctx, 11); + { + this.state = 990; + this.dateAndTimeFunctionBase(); + } + break; + + case 12: + this.enterOuterAlt(_localctx, 12); + { + this.state = 991; + this.textFunctionBase(); + } + break; + + case 13: + this.enterOuterAlt(_localctx, 13); + { + this.state = 992; + this.mathematicalFunctionBase(); + } + break; + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + + public sempred(_localctx: RuleContext, ruleIndex: number, predIndex: number): boolean { + switch (ruleIndex) { + case 43: + return this.logicalExpression_sempred(_localctx as LogicalExpressionContext, predIndex); + + case 45: + return this.valueExpression_sempred(_localctx as ValueExpressionContext, predIndex); + } + return true; + } + private logicalExpression_sempred(_localctx: LogicalExpressionContext, predIndex: number): boolean { + switch (predIndex) { + case 0: + return this.precpred(this._ctx, 5); + + case 1: + return this.precpred(this._ctx, 4); + + case 2: + return this.precpred(this._ctx, 3); + } + return true; + } + private valueExpression_sempred(_localctx: ValueExpressionContext, predIndex: number): boolean { + switch (predIndex) { + case 3: + return this.precpred(this._ctx, 3); + } + return true; + } + + private static readonly _serializedATNSegments: number = 2; + private static readonly _serializedATNSegment0: string = + "\x03\uC91D\uCABA\u058D\uAFBA\u4F53\u0607\uEA8B\uC241\x03\u0135\u03E6\x04" + + "\x02\t\x02\x04\x03\t\x03\x04\x04\t\x04\x04\x05\t\x05\x04\x06\t\x06\x04" + + "\x07\t\x07\x04\b\t\b\x04\t\t\t\x04\n\t\n\x04\v\t\v\x04\f\t\f\x04\r\t\r" + + "\x04\x0E\t\x0E\x04\x0F\t\x0F\x04\x10\t\x10\x04\x11\t\x11\x04\x12\t\x12" + + "\x04\x13\t\x13\x04\x14\t\x14\x04\x15\t\x15\x04\x16\t\x16\x04\x17\t\x17" + + "\x04\x18\t\x18\x04\x19\t\x19\x04\x1A\t\x1A\x04\x1B\t\x1B\x04\x1C\t\x1C" + + "\x04\x1D\t\x1D\x04\x1E\t\x1E\x04\x1F\t\x1F\x04 \t \x04!\t!\x04\"\t\"\x04" + + "#\t#\x04$\t$\x04%\t%\x04&\t&\x04\'\t\'\x04(\t(\x04)\t)\x04*\t*\x04+\t" + + "+\x04,\t,\x04-\t-\x04.\t.\x04/\t/\x040\t0\x041\t1\x042\t2\x043\t3\x04" + + "4\t4\x045\t5\x046\t6\x047\t7\x048\t8\x049\t9\x04:\t:\x04;\t;\x04<\t<\x04" + + "=\t=\x04>\t>\x04?\t?\x04@\t@\x04A\tA\x04B\tB\x04C\tC\x04D\tD\x04E\tE\x04" + + "F\tF\x04G\tG\x04H\tH\x04I\tI\x04J\tJ\x04K\tK\x04L\tL\x04M\tM\x04N\tN\x04" + + "O\tO\x04P\tP\x04Q\tQ\x04R\tR\x04S\tS\x04T\tT\x04U\tU\x04V\tV\x04W\tW\x04" + + "X\tX\x04Y\tY\x04Z\tZ\x04[\t[\x04\\\t\\\x04]\t]\x04^\t^\x04_\t_\x04`\t" + + "`\x04a\ta\x04b\tb\x04c\tc\x04d\td\x04e\te\x04f\tf\x04g\tg\x04h\th\x03" + + "\x02\x05\x02\xD2\n\x02\x03\x02\x03\x02\x03\x03\x03\x03\x03\x03\x07\x03" + + "\xD9\n\x03\f\x03\x0E\x03\xDC\v\x03\x03\x04\x03\x04\x03\x04\x05\x04\xE1" + + "\n\x04\x03\x05\x03\x05\x03\x05\x03\x05\x03\x05\x03\x05\x03\x05\x03\x05" + + "\x03\x05\x03\x05\x03\x05\x03\x05\x03\x05\x03\x05\x03\x05\x03\x05\x05\x05" + + "\xF3\n\x05\x03\x06\x05\x06\xF6\n\x06\x03\x06\x03\x06\x05\x06\xFA\n\x06" + + "\x03\x06\x03\x06\x03\x06\x03\x06\x05\x06\u0100\n\x06\x03\x06\x03\x06\x03" + + "\x06\x05\x06\u0105\n\x06\x03\x07\x03\x07\x03\x07\x03\b\x03\b\x03\b\x03" + + "\t\x03\t\x03\t\x03\n\x03\n\x05\n\u0112\n\n\x03\n\x03\n\x03\v\x03\v\x03" + + "\v\x03\v\x07\v\u011A\n\v\f\v\x0E\v\u011D\v\v\x03\f\x03\f\x03\f\x03\f\x05" + + "\f\u0123\n\f\x03\f\x03\f\x03\f\x05\f\u0128\n\f\x03\f\x03\f\x03\f\x05\f" + + "\u012D\n\f\x03\f\x03\f\x03\f\x07\f\u0132\n\f\f\f\x0E\f\u0135\v\f\x03\f" + + "\x05\f\u0138\n\f\x03\f\x03\f\x03\f\x05\f\u013D\n\f\x03\r\x03\r\x05\r\u0141" + + "\n\r\x03\r\x03\r\x03\r\x03\r\x05\r\u0147\n\r\x03\r\x03\r\x03\r\x05\r\u014C" + + "\n\r\x03\x0E\x03\x0E\x03\x0E\x03\x0F\x03\x0F\x03\x0F\x03\x0F\x07\x0F\u0155" + + "\n\x0F\f\x0F\x0E\x0F\u0158\v\x0F\x03\x10\x03\x10\x05\x10\u015C\n\x10\x03" + + "\x10\x03\x10\x05\x10\u0160\n\x10\x03\x11\x03\x11\x05\x11\u0164\n\x11\x03" + + "\x11\x03\x11\x05\x11\u0168\n\x11\x03\x12\x03\x12\x03\x12\x05\x12\u016D" + + "\n\x12\x03\x13\x03\x13\x03\x13\x03\x13\x03\x14\x03\x14\x03\x14\x03\x14" + + "\x03\x15\x03\x15\x07\x15\u0179\n\x15\f\x15\x0E\x15\u017C\v\x15\x03\x15" + + "\x03\x15\x03\x16\x03\x16\x03\x16\x03\x16\x03\x16\x03\x16\x05\x16\u0186" + + "\n\x16\x03\x17\x03\x17\x03\x18\x03\x18\x07\x18\u018C\n\x18\f\x18\x0E\x18" + + "\u018F\v\x18\x03\x19\x03\x19\x03\x19\x03\x19\x03\x19\x03\x19\x03\x19\x03" + + "\x19\x03\x19\x05\x19\u019A\n\x19\x03\x1A\x03\x1A\x07\x1A\u019E\n\x1A\f" + + "\x1A\x0E\x1A\u01A1\v\x1A\x03\x1B\x03\x1B\x03\x1B\x03\x1B\x03\x1B\x03\x1B" + + "\x03\x1B\x03\x1B\x03\x1B\x03\x1B\x03\x1B\x03\x1B\x03\x1B\x03\x1B\x03\x1B" + + "\x03\x1B\x03\x1B\x03\x1B\x03\x1B\x03\x1B\x03\x1B\x03\x1B\x03\x1B\x03\x1B" + + "\x03\x1B\x03\x1B\x03\x1B\x03\x1B\x03\x1B\x03\x1B\x03\x1B\x03\x1B\x03\x1B" + + "\x03\x1B\x03\x1B\x03\x1B\x05\x1B\u01C7\n\x1B\x03\x1C\x03\x1C\x07\x1C\u01CB" + + "\n\x1C\f\x1C\x0E\x1C\u01CE\v\x1C\x03\x1D\x03\x1D\x03\x1D\x03\x1D\x03\x1E" + + "\x03\x1E\x03\x1E\x03\x1E\x03\x1E\x03\x1E\x03\x1E\x03\x1E\x03\x1E\x03\x1E" + + "\x03\x1E\x03\x1E\x05\x1E\u01E0\n\x1E\x03\x1F\x03\x1F\x03\x1F\x07\x1F\u01E5" + + "\n\x1F\f\x1F\x0E\x1F\u01E8\v\x1F\x03 \x03 \x03 \x03 \x03!\x03!\x03!\x03" + + "\"\x03\"\x03\"\x03\"\x03\"\x03\"\x03\"\x03\"\x03\"\x05\"\u01FA\n\"\x03" + + "#\x03#\x03#\x05#\u01FF\n#\x03$\x03$\x03$\x03$\x03$\x03$\x05$\u0207\n$" + + "\x03$\x03$\x03%\x03%\x03%\x07%\u020E\n%\f%\x0E%\u0211\v%\x03&\x03&\x03" + + "&\x03&\x03\'\x03\'\x03\'\x05\'\u021A\n\'\x03(\x03(\x03(\x03(\x03(\x03" + + "(\x03(\x03(\x03(\x03(\x03(\x03(\x03(\x03(\x03(\x05(\u022B\n(\x03)\x03" + + ")\x03*\x03*\x03*\x03*\x03*\x05*\u0234\n*\x03*\x03*\x03+\x03+\x03+\x03" + + "+\x03+\x03+\x03+\x03+\x03,\x03,\x03,\x05,\u0243\n,\x03-\x03-\x03-\x03" + + "-\x03-\x03-\x05-\u024B\n-\x03-\x03-\x03-\x03-\x03-\x05-\u0252\n-\x03-" + + "\x03-\x03-\x03-\x07-\u0258\n-\f-\x0E-\u025B\v-\x03.\x03.\x03.\x03.\x03" + + ".\x03.\x03.\x03.\x05.\u0265\n.\x03/\x03/\x03/\x03/\x03/\x03/\x03/\x03" + + "/\x05/\u026F\n/\x03/\x03/\x03/\x03/\x07/\u0275\n/\f/\x0E/\u0278\v/\x03" + + "0\x030\x030\x030\x030\x050\u027F\n0\x031\x031\x031\x051\u0284\n1\x031" + + "\x031\x032\x032\x033\x033\x053\u028C\n3\x034\x034\x034\x034\x034\x034" + + "\x034\x074\u0295\n4\f4\x0E4\u0298\v4\x034\x034\x035\x035\x035\x035\x03" + + "5\x035\x075\u02A2\n5\f5\x0E5\u02A5\v5\x035\x035\x035\x035\x035\x075\u02AC" + + "\n5\f5\x0E5\u02AF\v5\x035\x035\x036\x036\x056\u02B5\n6\x037\x037\x037" + + "\x037\x037\x038\x038\x038\x078\u02BF\n8\f8\x0E8\u02C2\v8\x039\x039\x03" + + "9\x079\u02C7\n9\f9\x0E9\u02CA\v9\x03:\x05:\u02CD\n:\x03:\x03:\x03;\x03" + + ";\x03;\x03;\x03;\x03;\x03;\x03;\x03;\x03;\x03;\x03;\x03;\x03;\x03;\x03" + + ";\x03;\x03;\x03;\x03;\x03;\x05;\u02E6\n;\x03<\x03<\x03=\x03=\x03>\x03" + + ">\x03>\x03>\x03>\x03?\x03?\x03?\x03?\x03?\x03?\x03?\x03@\x03@\x03@\x03" + + "@\x03@\x03A\x03A\x03A\x03A\x03A\x03A\x03A\x03A\x03A\x03A\x05A\u0307\n" + + "A\x03B\x03B\x03B\x03B\x03B\x05B\u030E\nB\x03C\x03C\x03C\x07C\u0313\nC" + + "\fC\x0EC\u0316\vC\x05C\u0318\nC\x03D\x03D\x03D\x05D\u031D\nD\x03D\x03" + + "D\x03E\x03E\x03E\x03E\x03F\x03F\x03G\x03G\x03G\x03G\x03G\x03G\x03G\x03" + + "G\x05G\u032F\nG\x03H\x03H\x05H\u0333\nH\x03I\x03I\x05I\u0337\nI\x03J\x03" + + "J\x03K\x03K\x05K\u033D\nK\x03L\x03L\x03L\x03L\x03L\x03L\x03L\x03L\x03" + + "L\x03L\x03L\x03L\x03L\x03L\x03L\x03L\x03L\x03L\x03L\x03L\x03L\x03L\x05" + + "L\u0355\nL\x03M\x03M\x03N\x03N\x03O\x03O\x03P\x03P\x03Q\x03Q\x03R\x03" + + "R\x03S\x03S\x03T\x03T\x03U\x03U\x03V\x03V\x03W\x03W\x03W\x03W\x03W\x03" + + "W\x05W\u0371\nW\x03X\x03X\x03X\x03X\x03Y\x03Y\x03Z\x05Z\u037A\nZ\x03Z" + + "\x03Z\x03[\x05[\u037F\n[\x03[\x03[\x03\\\x03\\\x03]\x03]\x03]\x05]\u0388" + + "\n]\x03^\x03^\x03^\x03_\x03_\x03_\x03`\x03`\x03`\x03a\x03a\x03b\x03b\x03" + + "c\x03c\x03c\x03c\x07c\u039B\nc\fc\x0Ec\u039E\vc\x03c\x03c\x03d\x03d\x03" + + "d\x07d\u03A5\nd\fd\x0Ed\u03A8\vd\x03e\x03e\x03e\x07e\u03AD\ne\fe\x0Ee" + + "\u03B0\ve\x03f\x05f\u03B3\nf\x03f\x03f\x03f\x03f\x03f\x03f\x03f\x05f\u03BC" + + "\nf\x03g\x03g\x03g\x07g\u03C1\ng\fg\x0Eg\u03C4\vg\x03g\x05g\u03C7\ng\x03" + + "g\x03g\x03g\x03g\x03g\x03g\x03g\x03g\x03g\x03g\x03g\x03g\x05g\u03D5\n" + + "g\x03h\x03h\x03h\x03h\x03h\x03h\x03h\x03h\x03h\x03h\x03h\x03h\x03h\x05" + + "h\u03E4\nh\x03h\x02\x02\x04X\\i\x02\x02\x04\x02\x06\x02\b\x02\n\x02\f" + + "\x02\x0E\x02\x10\x02\x12\x02\x14\x02\x16\x02\x18\x02\x1A\x02\x1C\x02\x1E" + + "\x02 \x02\"\x02$\x02&\x02(\x02*\x02,\x02.\x020\x022\x024\x026\x028\x02" + + ":\x02<\x02>\x02@\x02B\x02D\x02F\x02H\x02J\x02L\x02N\x02P\x02R\x02T\x02" + + "V\x02X\x02Z\x02\\\x02^\x02`\x02b\x02d\x02f\x02h\x02j\x02l\x02n\x02p\x02" + + "r\x02t\x02v\x02x\x02z\x02|\x02~\x02\x80\x02\x82\x02\x84\x02\x86\x02\x88" + + "\x02\x8A\x02\x8C\x02\x8E\x02\x90\x02\x92\x02\x94\x02\x96\x02\x98\x02\x9A" + + "\x02\x9C\x02\x9E\x02\xA0\x02\xA2\x02\xA4\x02\xA6\x02\xA8\x02\xAA\x02\xAC" + + "\x02\xAE\x02\xB0\x02\xB2\x02\xB4\x02\xB6\x02\xB8\x02\xBA\x02\xBC\x02\xBE" + + "\x02\xC0\x02\xC2\x02\xC4\x02\xC6\x02\xC8\x02\xCA\x02\xCC\x02\xCE\x02\x02" + + "\x14\x03\x02pq\x03\x02\x13\x14\x04\x02\x83\x83\xA5\xA5\x07\x02\x81\x82" + + "\x86\x86\x89\x89\x8E\x8E\x90\x93\x05\x02\b\b99\u0107\u0125\x03\x02\xBB" + + "\xC4\v\x02EEGGIP\\\\\xC5\xC5\xCB\xD3\xD6\xD9\xDB\xE2\xE6\xE6\x06\x02\xC6" + + "\xCA\xD4\xD5\xDA\xDA\xE3\xE5\x03\x02\xF9\xFE\x04\x02\xE7\xEB\xED\xF7\x04" + + "\x02DDjo\x03\x02pt\x03\x02\u0100\u0103\x03\x02\u0104\u0106\x03\x02\u0132" + + "\u0133\x03\x02BC\x04\x02GGI[\x05\x02 HP\u0127\u012D\x02\u0430\x02\xD1" + + "\x03\x02\x02\x02\x04\xD5\x03\x02\x02\x02\x06\xE0\x03\x02\x02\x02\b\xF2" + + "\x03\x02\x02\x02\n\u0104\x03\x02\x02\x02\f\u0106\x03\x02\x02\x02\x0E\u0109" + + "\x03\x02\x02\x02\x10\u010C\x03\x02\x02\x02\x12\u010F\x03\x02\x02\x02\x14" + + "\u0115\x03\x02\x02\x02\x16\u011E\x03\x02\x02\x02\x18\u013E\x03\x02\x02" + + "\x02\x1A\u014D\x03\x02\x02\x02\x1C\u0150\x03\x02\x02\x02\x1E\u0159\x03" + + "\x02\x02\x02 \u0161\x03\x02\x02\x02\"\u0169\x03\x02\x02\x02$\u016E\x03" + + "\x02\x02\x02&\u0172\x03\x02\x02\x02(\u0176\x03\x02\x02\x02*\u0185\x03" + + "\x02\x02\x02,\u0187\x03\x02\x02\x02.\u0189\x03\x02\x02\x020\u0199\x03" + + "\x02\x02\x022\u019B\x03\x02\x02\x024\u01C6\x03\x02\x02\x026\u01C8\x03" + + "\x02\x02\x028\u01CF\x03\x02\x02\x02:\u01DF\x03\x02\x02\x02<\u01E1\x03" + + "\x02\x02\x02>\u01E9\x03\x02\x02\x02@\u01ED\x03\x02\x02\x02B\u01F9\x03" + + "\x02\x02\x02D\u01FB\x03\x02\x02\x02F\u0200\x03\x02\x02\x02H\u020A\x03" + + "\x02\x02\x02J\u0212\x03\x02\x02\x02L\u0216\x03\x02\x02\x02N\u022A\x03" + + "\x02\x02\x02P\u022C\x03\x02\x02\x02R\u022E\x03\x02\x02\x02T\u0237\x03" + + "\x02\x02\x02V\u0242\x03\x02\x02\x02X\u024A\x03\x02\x02\x02Z\u0264\x03" + + "\x02\x02\x02\\\u026E\x03\x02\x02\x02^\u027E\x03\x02\x02\x02`\u0280\x03" + + "\x02\x02\x02b\u0287\x03\x02\x02\x02d\u028B\x03\x02\x02\x02f\u028D\x03" + + "\x02\x02\x02h\u029B\x03\x02\x02\x02j\u02B4\x03\x02\x02\x02l\u02B6\x03" + + "\x02\x02\x02n\u02BB\x03\x02\x02\x02p\u02C3\x03\x02\x02\x02r\u02CC\x03" + + "\x02\x02\x02t\u02E5\x03\x02\x02\x02v\u02E7\x03\x02\x02\x02x\u02E9\x03" + + "\x02\x02\x02z\u02EB\x03\x02\x02\x02|\u02F0\x03\x02\x02\x02~\u02F7\x03" + + "\x02\x02\x02\x80\u0306\x03\x02\x02\x02\x82\u030D\x03\x02\x02\x02\x84\u0317" + + "\x03\x02\x02\x02\x86\u031C\x03\x02\x02\x02\x88\u0320\x03\x02\x02\x02\x8A" + + "\u0324\x03\x02\x02\x02\x8C\u032E\x03\x02\x02\x02\x8E\u0332\x03\x02\x02" + + "\x02\x90\u0336\x03\x02\x02\x02\x92\u0338\x03\x02\x02\x02\x94\u033C\x03" + + "\x02\x02\x02\x96\u0354\x03\x02\x02\x02\x98\u0356\x03\x02\x02\x02\x9A\u0358" + + "\x03\x02\x02\x02\x9C\u035A\x03\x02\x02\x02\x9E\u035C\x03\x02\x02\x02\xA0" + + "\u035E\x03\x02\x02\x02\xA2\u0360\x03\x02\x02\x02\xA4\u0362\x03\x02\x02" + + "\x02\xA6\u0364\x03\x02\x02\x02\xA8\u0366\x03\x02\x02\x02\xAA\u0368\x03" + + "\x02\x02\x02\xAC\u0370\x03\x02\x02\x02\xAE\u0372\x03\x02\x02\x02\xB0\u0376" + + "\x03\x02\x02\x02\xB2\u0379\x03\x02\x02\x02\xB4\u037E\x03\x02\x02\x02\xB6" + + "\u0382\x03\x02\x02\x02\xB8\u0387\x03\x02\x02\x02\xBA\u0389\x03\x02\x02" + + "\x02\xBC\u038C\x03\x02\x02\x02\xBE\u038F\x03\x02\x02\x02\xC0\u0392\x03" + + "\x02\x02\x02\xC2\u0394\x03\x02\x02\x02\xC4\u0396\x03\x02\x02\x02\xC6\u03A1" + + "\x03\x02\x02\x02\xC8\u03A9\x03\x02\x02\x02\xCA\u03BB\x03\x02\x02\x02\xCC" + + "\u03D4\x03\x02\x02\x02\xCE\u03E3\x03\x02\x02\x02\xD0\xD2\x05\x04\x03\x02" + + "\xD1\xD0\x03\x02\x02\x02\xD1\xD2\x03\x02\x02\x02\xD2\xD3\x03\x02\x02\x02" + + "\xD3\xD4\x07\x02\x02\x03\xD4\x03\x03\x02\x02\x02\xD5\xDA\x05\x06\x04\x02" + + "\xD6\xD7\x07g\x02\x02\xD7\xD9\x05\b\x05\x02\xD8\xD6\x03\x02\x02\x02\xD9" + + "\xDC\x03\x02\x02\x02\xDA\xD8\x03\x02\x02\x02\xDA\xDB\x03\x02\x02\x02\xDB" + + "\x05\x03\x02\x02\x02\xDC\xDA\x03\x02\x02\x02\xDD\xE1\x05\n\x06\x02\xDE" + + "\xE1\x05\f\x07\x02\xDF\xE1\x05\x0E\b\x02\xE0\xDD\x03\x02\x02\x02\xE0\xDE" + + "\x03\x02\x02\x02\xE0\xDF\x03\x02\x02\x02\xE1\x07\x03\x02\x02\x02\xE2\xF3" + + "\x05\x10\t\x02\xE3\xF3\x05\x12\n\x02\xE4\xF3\x05\x14\v\x02\xE5\xF3\x05" + + "\x16\f\x02\xE6\xF3\x05\x18\r\x02\xE7\xF3\x05\x1A\x0E\x02\xE8\xF3\x05\x1C" + + "\x0F\x02\xE9\xF3\x05\x1E\x10\x02\xEA\xF3\x05 \x11\x02\xEB\xF3\x05\"\x12" + + "\x02\xEC\xF3\x05$\x13\x02\xED\xF3\x05&\x14\x02\xEE\xF3\x05(\x15\x02\xEF" + + "\xF3\x05.\x18\x02\xF0\xF3\x052\x1A\x02\xF1\xF3\x056\x1C\x02\xF2\xE2\x03" + + "\x02\x02\x02\xF2\xE3\x03\x02\x02\x02\xF2\xE4\x03\x02\x02\x02\xF2\xE5\x03" + + "\x02\x02\x02\xF2\xE6\x03\x02\x02\x02\xF2\xE7\x03\x02\x02\x02\xF2\xE8\x03" + + "\x02\x02\x02\xF2\xE9\x03\x02\x02\x02\xF2\xEA\x03\x02\x02\x02\xF2\xEB\x03" + + "\x02\x02\x02\xF2\xEC\x03\x02\x02\x02\xF2\xED\x03\x02\x02\x02\xF2\xEE\x03" + + "\x02\x02\x02\xF2\xEF\x03\x02\x02\x02\xF2\xF0\x03\x02\x02\x02\xF2\xF1\x03" + + "\x02\x02\x02\xF3\t\x03\x02\x02\x02\xF4\xF6\x07\x03\x02\x02\xF5\xF4\x03" + + "\x02\x02\x02\xF5\xF6\x03\x02\x02\x02\xF6\xF7\x03\x02\x02\x02\xF7\u0105" + + "\x05:\x1E\x02\xF8\xFA\x07\x03\x02\x02\xF9\xF8\x03\x02\x02\x02\xF9\xFA" + + "\x03\x02\x02\x02\xFA\xFB\x03\x02\x02\x02\xFB\xFC\x05:\x1E\x02\xFC\xFD" + + "\x05X-\x02\xFD\u0105\x03\x02\x02\x02\xFE\u0100\x07\x03\x02\x02\xFF\xFE" + + "\x03\x02\x02\x02\xFF\u0100\x03\x02\x02\x02\u0100\u0101\x03\x02\x02\x02" + + "\u0101\u0102\x05X-\x02\u0102\u0103\x05:\x1E\x02\u0103\u0105\x03\x02\x02" + + "\x02\u0104\xF5\x03\x02\x02\x02\u0104\xF9\x03\x02\x02\x02\u0104\xFF\x03" + + "\x02\x02\x02\u0105\v\x03\x02\x02\x02\u0106\u0107\x07\x04\x02\x02\u0107" + + "\u0108\x05<\x1F\x02\u0108\r\x03\x02\x02\x02\u0109\u010A\x07\x05\x02\x02" + + "\u010A\u010B\x07\"\x02\x02\u010B\x0F\x03\x02\x02\x02\u010C\u010D\x07\x07" + + "\x02\x02\u010D\u010E\x05X-\x02\u010E\x11\x03\x02\x02\x02\u010F\u0111\x07" + + "\b\x02\x02\u0110\u0112\t\x02\x02\x02\u0111\u0110\x03\x02\x02\x02\u0111" + + "\u0112\x03\x02\x02\x02\u0112\u0113\x03\x02\x02\x02\u0113\u0114\x05n8\x02" + + "\u0114\x13\x03\x02\x02\x02\u0115\u0116\x07\t\x02\x02\u0116\u011B\x05>" + + " \x02\u0117\u0118\x07h\x02\x02\u0118\u011A\x05> \x02\u0119\u0117\x03\x02" + + "\x02\x02\u011A\u011D\x03\x02\x02\x02\u011B\u0119\x03\x02\x02\x02\u011B" + + "\u011C\x03\x02\x02\x02\u011C\x15\x03\x02\x02\x02\u011D\u011B\x03\x02\x02" + + "\x02\u011E\u0122\x07\n\x02\x02\u011F\u0120\x07+\x02\x02\u0120\u0121\x07" + + "j\x02\x02\u0121\u0123\x05\xB2Z\x02\u0122\u011F\x03\x02\x02\x02\u0122\u0123" + + "\x03\x02\x02\x02\u0123\u0127\x03\x02\x02\x02\u0124\u0125\x07,\x02\x02" + + "\u0125\u0126\x07j\x02\x02\u0126\u0128\x05\xB6\\\x02\u0127\u0124\x03\x02" + + "\x02\x02\u0127\u0128\x03\x02\x02\x02\u0128\u012C\x03\x02\x02\x02\u0129" + + "\u012A\x07-\x02\x02\u012A\u012B\x07j\x02\x02\u012B\u012D\x05\xB0Y\x02" + + "\u012C\u0129\x03\x02\x02\x02\u012C\u012D\x03\x02\x02\x02\u012D\u012E\x03" + + "\x02\x02\x02\u012E\u0133\x05L\'\x02\u012F\u0130\x07h\x02\x02\u0130\u0132" + + "\x05L\'\x02\u0131\u012F\x03\x02\x02\x02\u0132\u0135\x03\x02\x02\x02\u0133" + + "\u0131\x03\x02\x02\x02\u0133\u0134\x03\x02\x02\x02\u0134\u0137\x03\x02" + + "\x02\x02\u0135\u0133\x03\x02\x02\x02\u0136\u0138\x05B\"\x02\u0137\u0136" + + "\x03\x02\x02\x02\u0137\u0138\x03\x02\x02\x02\u0138\u013C\x03\x02\x02\x02" + + "\u0139\u013A\x07*\x02\x02\u013A\u013B\x07j\x02\x02\u013B\u013D\x05\xB6" + + "\\\x02\u013C\u0139\x03\x02\x02\x02\u013C\u013D\x03\x02\x02\x02\u013D\x17" + + "\x03\x02\x02\x02\u013E\u0140\x07\v\x02\x02\u013F\u0141\x05\xB2Z\x02\u0140" + + "\u013F\x03\x02\x02\x02\u0140\u0141\x03\x02\x02\x02\u0141\u0142\x03\x02" + + "\x02\x02\u0142\u0146\x05n8\x02\u0143\u0144\x07(\x02\x02\u0144\u0145\x07" + + "j\x02\x02\u0145\u0147\x05\xB6\\\x02\u0146\u0143\x03\x02\x02\x02\u0146" + + "\u0147\x03\x02\x02\x02\u0147\u014B\x03\x02\x02\x02\u0148\u0149\x07)\x02" + + "\x02\u0149\u014A\x07j\x02\x02\u014A\u014C\x05\xB6\\\x02\u014B\u0148\x03" + + "\x02\x02\x02\u014B\u014C\x03\x02\x02\x02\u014C\x19\x03\x02\x02\x02\u014D" + + "\u014E\x07\f\x02\x02\u014E\u014F\x05H%\x02\u014F\x1B\x03\x02\x02\x02\u0150" + + "\u0151\x07\r\x02\x02\u0151\u0156\x05J&\x02\u0152\u0153\x07h\x02\x02\u0153" + + "\u0155\x05J&\x02\u0154\u0152\x03\x02\x02\x02\u0155\u0158\x03\x02\x02\x02" + + "\u0156\u0154\x03\x02\x02\x02\u0156\u0157\x03\x02\x02\x02\u0157\x1D\x03" + + "\x02\x02\x02\u0158\u0156\x03\x02\x02\x02\u0159\u015B\x07\x0E\x02\x02\u015A" + + "\u015C\x05\xB2Z\x02\u015B\u015A\x03\x02\x02\x02\u015B\u015C\x03\x02\x02" + + "\x02\u015C\u015F\x03\x02\x02\x02\u015D\u015E\x07\x06\x02\x02\u015E\u0160" + + "\x05\xB2Z\x02\u015F\u015D\x03\x02\x02\x02\u015F\u0160\x03\x02\x02\x02" + + "\u0160\x1F\x03\x02\x02\x02\u0161\u0163\x07\x0F\x02\x02\u0162\u0164\x05" + + "\xB2Z\x02\u0163\u0162\x03\x02\x02\x02\u0163\u0164\x03\x02\x02\x02\u0164" + + "\u0165\x03\x02\x02\x02\u0165\u0167\x05n8\x02\u0166\u0168\x05@!\x02\u0167" + + "\u0166\x03\x02\x02\x02\u0167\u0168\x03\x02\x02\x02\u0168!\x03\x02\x02" + + "\x02\u0169\u016A\x07\x10\x02\x02\u016A\u016C\x05n8\x02\u016B\u016D\x05" + + "@!\x02\u016C\u016B\x03\x02\x02\x02\u016C\u016D\x03\x02\x02\x02\u016D#" + + "\x03\x02\x02\x02\u016E\u016F\x07\x15\x02\x02\u016F\u0170\x05V,\x02\u0170" + + "\u0171\x05\xB0Y\x02\u0171%\x03\x02\x02\x02\u0172\u0173\x07\x11\x02\x02" + + "\u0173\u0174\x05V,\x02\u0174\u0175\x05\xB0Y\x02\u0175\'\x03\x02\x02\x02" + + "\u0176\u017A\x07\x17\x02\x02\u0177\u0179\x05*\x16\x02\u0178\u0177\x03" + + "\x02\x02\x02\u0179\u017C\x03\x02\x02\x02\u017A\u0178\x03\x02\x02\x02\u017A" + + "\u017B\x03\x02\x02\x02\u017B\u017D\x03\x02\x02\x02\u017C\u017A\x03\x02" + + "\x02\x02\u017D\u017E\x05V,\x02\u017E)\x03\x02\x02\x02\u017F\u0180\x07" + + "\x18\x02\x02\u0180\u0181\x07j\x02\x02\u0181\u0186\x05\xB0Y\x02\u0182\u0183" + + "\x07\x16\x02\x02\u0183\u0184\x07j\x02\x02\u0184\u0186\x05\xB0Y\x02\u0185" + + "\u017F\x03\x02\x02\x02\u0185\u0182\x03\x02\x02\x02\u0186+\x03\x02\x02" + + "\x02\u0187\u0188\t\x03\x02\x02\u0188-\x03\x02\x02\x02\u0189\u018D\x07" + + "\x19\x02\x02\u018A\u018C\x050\x19\x02\u018B\u018A\x03\x02\x02\x02\u018C" + + "\u018F\x03\x02\x02\x02\u018D\u018B\x03\x02\x02\x02\u018D\u018E\x03\x02" + + "\x02\x02\u018E/\x03\x02\x02\x02\u018F\u018D\x03\x02\x02\x02\u0190\u0191" + + "\x07.\x02\x02\u0191\u0192\x07j\x02\x02\u0192\u019A\x05\xB2Z\x02\u0193" + + "\u0194\x07/\x02\x02\u0194\u0195\x07j\x02\x02\u0195\u019A\x05\xB2Z\x02" + + "\u0196\u0197\x070\x02\x02\u0197\u0198\x07j\x02\x02\u0198\u019A\x05\xB0" + + "Y\x02\u0199\u0190\x03\x02\x02\x02\u0199\u0193\x03\x02\x02\x02\u0199\u0196" + + "\x03\x02\x02\x02\u019A1\x03\x02\x02\x02\u019B\u019F\x07\x1A\x02\x02\u019C" + + "\u019E\x054\x1B\x02\u019D\u019C\x03\x02\x02\x02\u019E\u01A1\x03\x02\x02" + + "\x02\u019F\u019D\x03\x02\x02\x02\u019F\u01A0\x03\x02\x02\x02\u01A03\x03" + + "\x02\x02\x02\u01A1\u019F\x03\x02\x02\x02\u01A2\u01A3\x071\x02\x02\u01A3" + + "\u01A4\x07j\x02\x02\u01A4\u01C7\x05\xB2Z\x02\u01A5\u01A6\x072\x02\x02" + + "\u01A6\u01A7\x07j\x02\x02\u01A7\u01C7\x05\xB2Z\x02\u01A8\u01A9\x073\x02" + + "\x02\u01A9\u01AA\x07j\x02\x02\u01AA\u01C7\x05\xB2Z\x02\u01AB\u01AC\x07" + + "4\x02\x02\u01AC\u01AD\x07j\x02\x02\u01AD\u01C7\x05\xB2Z\x02\u01AE\u01AF" + + "\x075\x02\x02\u01AF\u01B0\x07j\x02\x02\u01B0\u01C7\x05\xB4[\x02\u01B1" + + "\u01B2\x076\x02\x02\u01B2\u01B3\x07j\x02\x02\u01B3\u01C7\x05\xB4[\x02" + + "\u01B4\u01B5\x077\x02\x02\u01B5\u01B6\x07j\x02\x02\u01B6\u01C7\x05\xB0" + + "Y\x02\u01B7\u01B8\x078\x02\x02\u01B8\u01B9\x07j\x02\x02\u01B9\u01C7\x05" + + "\xB0Y\x02\u01BA\u01BB\x07\xCD\x02\x02\u01BB\u01BC\x07j\x02\x02\u01BC\u01C7" + + "\x05\xB0Y\x02\u01BD\u01BE\x079\x02\x02\u01BE\u01BF\x07j\x02\x02\u01BF" + + "\u01C7\x05\xB0Y\x02\u01C0\u01C1\x07:\x02\x02\u01C1\u01C2\x07j\x02\x02" + + "\u01C2\u01C7\x05\xB2Z\x02\u01C3\u01C4\x07;\x02\x02\u01C4\u01C5\x07j\x02" + + "\x02\u01C5\u01C7\x05\xB4[\x02\u01C6\u01A2\x03\x02\x02\x02\u01C6\u01A5" + + "\x03\x02\x02\x02\u01C6\u01A8\x03\x02\x02\x02\u01C6\u01AB\x03\x02\x02\x02" + + "\u01C6\u01AE\x03\x02\x02\x02\u01C6\u01B1\x03\x02\x02\x02\u01C6\u01B4\x03" + + "\x02\x02\x02\u01C6\u01B7\x03\x02\x02\x02\u01C6\u01BA\x03\x02\x02\x02\u01C6" + + "\u01BD\x03\x02\x02\x02\u01C6\u01C0\x03\x02\x02\x02\u01C6\u01C3\x03\x02" + + "\x02\x02\u01C75\x03\x02\x02\x02\u01C8\u01CC\x07\x1B\x02\x02\u01C9\u01CB" + + "\x058\x1D\x02\u01CA\u01C9\x03\x02\x02\x02\u01CB\u01CE\x03\x02\x02\x02" + + "\u01CC\u01CA\x03\x02\x02\x02\u01CC\u01CD\x03\x02\x02\x02\u01CD7\x03\x02" + + "\x02\x02\u01CE\u01CC\x03\x02\x02\x02\u01CF\u01D0\x05\xCAf\x02\u01D0\u01D1" + + "\x07j\x02\x02\u01D1\u01D2\x05\xACW\x02\u01D29\x03\x02\x02\x02\u01D3\u01D4" + + "\x07\x1E\x02\x02\u01D4\u01D5\x07j\x02\x02\u01D5\u01E0\x05<\x1F\x02\u01D6" + + "\u01D7\x07\x1F\x02\x02\u01D7\u01D8\x07j\x02\x02\u01D8\u01E0"; + private static readonly _serializedATNSegment1: string = + "\x05<\x1F\x02\u01D9\u01DA\x07\x1E\x02\x02\u01DA\u01DB\x07j\x02\x02\u01DB" + + "\u01E0\x05l7\x02\u01DC\u01DD\x07\x1F\x02\x02\u01DD\u01DE\x07j\x02\x02" + + "\u01DE\u01E0\x05l7\x02\u01DF\u01D3\x03\x02\x02\x02\u01DF\u01D6\x03\x02" + + "\x02\x02\u01DF\u01D9\x03\x02\x02\x02\u01DF\u01DC\x03\x02\x02\x02\u01E0" + + ";\x03\x02\x02\x02\u01E1\u01E6\x05j6\x02\u01E2\u01E3\x07h\x02\x02\u01E3" + + "\u01E5\x05j6\x02\u01E4\u01E2\x03\x02\x02\x02\u01E5\u01E8\x03\x02\x02\x02" + + "\u01E6\u01E4\x03\x02\x02\x02\u01E6\u01E7\x03\x02\x02\x02\u01E7=\x03\x02" + + "\x02\x02\u01E8\u01E6\x03\x02\x02\x02\u01E9\u01EA\x05x=\x02\u01EA\u01EB" + + "\x07\x1C\x02\x02\u01EB\u01EC\x05x=\x02\u01EC?\x03\x02\x02\x02\u01ED\u01EE" + + "\x07\x1D\x02\x02\u01EE\u01EF\x05n8\x02\u01EFA\x03\x02\x02\x02\u01F0\u01F1" + + "\x07\x1D\x02\x02\u01F1\u01FA\x05n8\x02\u01F2\u01F3\x07\x1D\x02\x02\u01F3" + + "\u01FA\x05D#\x02\u01F4\u01F5\x07\x1D\x02\x02\u01F5\u01F6\x05D#\x02\u01F6" + + "\u01F7\x07h\x02\x02\u01F7\u01F8\x05n8\x02\u01F8\u01FA\x03\x02\x02\x02" + + "\u01F9\u01F0\x03\x02\x02\x02\u01F9\u01F2\x03\x02\x02\x02\u01F9\u01F4\x03" + + "\x02\x02\x02\u01FAC\x03\x02\x02\x02\u01FB\u01FE\x05F$\x02\u01FC\u01FD" + + "\x07\x1C\x02\x02\u01FD\u01FF\x05\xC6d\x02\u01FE\u01FC\x03\x02\x02\x02" + + "\u01FE\u01FF\x03\x02\x02\x02\u01FFE\x03\x02\x02\x02\u0200\u0201\x07\u0126" + + "\x02\x02\u0201\u0202\x07w\x02\x02\u0202\u0203\x05v<\x02\u0203\u0204\x07" + + "h\x02\x02\u0204\u0206\x05\xACW\x02\u0205\u0207\x05\xC2b\x02\u0206\u0205" + + "\x03\x02\x02\x02\u0206\u0207\x03\x02\x02\x02\u0207\u0208\x03\x02\x02\x02" + + "\u0208\u0209\x07x\x02\x02\u0209G\x03\x02\x02\x02\u020A\u020F\x05r:\x02" + + "\u020B\u020C\x07h\x02\x02\u020C\u020E\x05r:\x02\u020D\u020B\x03\x02\x02" + + "\x02\u020E\u0211\x03\x02\x02\x02\u020F\u020D\x03\x02\x02\x02\u020F\u0210" + + "\x03\x02\x02\x02\u0210I\x03\x02\x02\x02\u0211\u020F\x03\x02\x02\x02\u0212" + + "\u0213\x05v<\x02\u0213\u0214\x07j\x02\x02\u0214\u0215\x05V,\x02\u0215" + + "K\x03\x02\x02\x02\u0216\u0219\x05N(\x02\u0217\u0218\x07\x1C\x02\x02\u0218" + + "\u021A\x05x=\x02\u0219\u0217\x03\x02\x02\x02\u0219\u021A\x03\x02\x02\x02" + + "\u021AM\x03\x02\x02\x02\u021B\u021C\x05P)\x02\u021C\u021D\x07w\x02\x02" + + "\u021D\u021E\x05\\/\x02\u021E\u021F\x07x\x02\x02\u021F\u022B\x03\x02\x02" + + "\x02\u0220\u0221\x07\x82\x02\x02\u0221\u0222\x07w\x02\x02\u0222\u022B" + + "\x07x\x02\x02\u0223\u0224\t\x04\x02\x02\u0224\u0225\x07w\x02\x02\u0225" + + "\u0226\x05\\/\x02\u0226\u0227\x07x\x02\x02\u0227\u022B\x03\x02\x02\x02" + + "\u0228\u022B\x05T+\x02\u0229\u022B\x05R*\x02\u022A\u021B\x03\x02\x02\x02" + + "\u022A\u0220\x03\x02\x02\x02\u022A\u0223\x03\x02\x02\x02\u022A\u0228\x03" + + "\x02\x02\x02\u022A\u0229\x03\x02\x02\x02\u022BO\x03\x02\x02\x02\u022C" + + "\u022D\t\x05\x02\x02\u022DQ\x03\x02\x02\x02\u022E\u022F\x07\x95\x02\x02" + + "\u022F\u0230\x07w\x02\x02\u0230\u0233\x05v<\x02\u0231\u0232\x07h\x02\x02" + + "\u0232\u0234\x05\xB2Z\x02\u0233\u0231\x03\x02\x02\x02\u0233\u0234\x03" + + "\x02\x02\x02\u0234\u0235\x03\x02\x02\x02\u0235\u0236\x07x\x02\x02\u0236" + + "S\x03\x02\x02\x02\u0237\u0238\x07\x94\x02\x02\u0238\u0239\x07l\x02\x02" + + "\u0239\u023A\x05\xB2Z\x02\u023A\u023B\x07k\x02\x02\u023B\u023C\x07w\x02" + + "\x02\u023C\u023D\x05v<\x02\u023D\u023E\x07x\x02\x02\u023EU\x03\x02\x02" + + "\x02\u023F\u0243\x05X-\x02\u0240\u0243\x05Z.\x02\u0241\u0243\x05\\/\x02" + + "\u0242\u023F\x03\x02\x02\x02\u0242\u0240\x03\x02\x02\x02\u0242\u0241\x03" + + "\x02\x02\x02\u0243W\x03\x02\x02\x02\u0244\u0245\b-\x01\x02\u0245\u024B" + + "\x05Z.\x02\u0246\u0247\x07>\x02\x02\u0247\u024B\x05X-\b\u0248\u024B\x05" + + "b2\x02\u0249\u024B\x05d3\x02\u024A\u0244\x03\x02\x02\x02\u024A\u0246\x03" + + "\x02\x02\x02\u024A\u0248\x03\x02\x02\x02\u024A\u0249\x03\x02\x02\x02\u024B" + + "\u0259\x03\x02\x02\x02\u024C\u024D\f\x07\x02\x02\u024D\u024E\x07?\x02" + + "\x02\u024E\u0258\x05X-\b\u024F\u0251\f\x06\x02\x02\u0250\u0252\x07@\x02" + + "\x02\u0251\u0250\x03\x02\x02\x02\u0251\u0252\x03\x02\x02\x02\u0252\u0253" + + "\x03\x02\x02\x02\u0253\u0258\x05X-\x07\u0254\u0255\f\x05\x02\x02\u0255" + + "\u0256\x07A\x02\x02\u0256\u0258\x05X-\x06\u0257\u024C\x03\x02\x02\x02" + + "\u0257\u024F\x03\x02\x02\x02\u0257\u0254\x03\x02\x02\x02\u0258\u025B\x03" + + "\x02\x02\x02\u0259\u0257\x03\x02\x02\x02\u0259\u025A\x03\x02\x02\x02\u025A" + + "Y\x03\x02\x02\x02\u025B\u0259\x03\x02\x02\x02\u025C\u025D\x05\\/\x02\u025D" + + "\u025E\x05\xA4S\x02\u025E\u025F\x05\\/\x02\u025F\u0265\x03\x02\x02\x02" + + "\u0260\u0261\x05\\/\x02\u0261\u0262\x07=\x02\x02\u0262\u0263\x05\xC4c" + + "\x02\u0263\u0265\x03\x02\x02\x02\u0264\u025C\x03\x02\x02\x02\u0264\u0260" + + "\x03\x02\x02\x02\u0265[\x03\x02\x02\x02\u0266\u0267\b/\x01\x02\u0267\u0268" + + "\x07w\x02\x02\u0268\u0269\x05\\/\x02\u0269\u026A\x05\xA6T\x02\u026A\u026B" + + "\x05\\/\x02\u026B\u026C\x07x\x02\x02\u026C\u026F\x03\x02\x02\x02\u026D" + + "\u026F\x05^0\x02\u026E\u0266\x03\x02\x02\x02\u026E\u026D\x03\x02\x02\x02" + + "\u026F\u0276\x03\x02\x02\x02\u0270\u0271\f\x05\x02\x02\u0271\u0272\x05" + + "\xA6T\x02\u0272\u0273\x05\\/\x06\u0273\u0275\x03\x02\x02\x02\u0274\u0270" + + "\x03\x02\x02\x02\u0275\u0278\x03\x02\x02\x02\u0276\u0274\x03\x02\x02\x02" + + "\u0276\u0277\x03\x02\x02\x02\u0277]\x03\x02\x02\x02\u0278\u0276\x03\x02" + + "\x02\x02\u0279\u027F\x05z>\x02\u027A\u027F\x05|?\x02\u027B\u027F\x05v" + + "<\x02\u027C\u027F\x05\xACW\x02\u027D\u027F\x05`1\x02\u027E\u0279\x03\x02" + + "\x02\x02\u027E\u027A\x03\x02\x02\x02\u027E\u027B\x03\x02\x02\x02\u027E" + + "\u027C\x03\x02\x02\x02\u027E\u027D\x03\x02\x02\x02\u027F_\x03\x02\x02" + + "\x02\u0280\u0281\x05\x9CO\x02\u0281\u0283\x07w\x02\x02\u0282\u0284\x05" + + "\x84C\x02\u0283\u0282\x03\x02\x02\x02\u0283\u0284\x03\x02\x02\x02\u0284" + + "\u0285\x03\x02\x02\x02\u0285\u0286\x07x\x02\x02\u0286a\x03\x02\x02\x02" + + "\u0287\u0288\x05~@\x02\u0288c\x03\x02\x02\x02\u0289\u028C\x05f4\x02\u028A" + + "\u028C\x05h5\x02\u028B\u0289\x03\x02\x02\x02\u028B\u028A\x03\x02\x02\x02" + + "\u028Ce\x03\x02\x02\x02\u028D\u028E\x05\xA8U\x02\u028E\u028F\x07w\x02" + + "\x02\u028F\u0290\x05\x90I\x02\u0290\u0291\x07h\x02\x02\u0291\u0296\x05" + + "\x92J\x02\u0292\u0293\x07h\x02\x02\u0293\u0295\x05\x88E\x02\u0294\u0292" + + "\x03\x02\x02\x02\u0295\u0298\x03\x02\x02\x02\u0296\u0294\x03\x02\x02\x02" + + "\u0296\u0297\x03\x02\x02\x02\u0297\u0299\x03\x02\x02\x02\u0298\u0296\x03" + + "\x02\x02\x02\u0299\u029A\x07x\x02\x02\u029Ag\x03\x02\x02\x02\u029B\u029C" + + "\x05\xAAV\x02\u029C\u029D\x07w\x02\x02\u029D\u029E\x07y\x02\x02\u029E" + + "\u02A3\x05\x8CG\x02\u029F\u02A0\x07h\x02\x02\u02A0\u02A2\x05\x8CG\x02" + + "\u02A1\u029F\x03\x02\x02\x02\u02A2\u02A5\x03\x02\x02\x02\u02A3\u02A1\x03" + + "\x02\x02\x02\u02A3\u02A4\x03\x02\x02\x02\u02A4\u02A6\x03\x02\x02\x02\u02A5" + + "\u02A3\x03\x02\x02\x02\u02A6\u02A7\x07z\x02\x02\u02A7\u02A8\x07h\x02\x02" + + "\u02A8\u02AD\x05\x92J\x02\u02A9\u02AA\x07h\x02\x02\u02AA\u02AC\x05\x88" + + "E\x02\u02AB\u02A9\x03\x02\x02\x02\u02AC\u02AF\x03\x02\x02\x02\u02AD\u02AB" + + "\x03\x02\x02\x02\u02AD\u02AE\x03\x02\x02\x02\u02AE\u02B0\x03\x02\x02\x02" + + "\u02AF\u02AD\x03\x02\x02\x02\u02B0\u02B1\x07x\x02\x02\u02B1i\x03\x02\x02" + + "\x02\u02B2\u02B5\x05\xC6d\x02\u02B3\u02B5\x07\u0131\x02\x02\u02B4\u02B2" + + "\x03\x02\x02\x02\u02B4\u02B3\x03\x02\x02\x02\u02B5k\x03\x02\x02\x02\u02B6" + + "\u02B7\x05\xC6d\x02\u02B7\u02B8\x07w\x02\x02\u02B8\u02B9\x05\x84C\x02" + + "\u02B9\u02BA\x07x\x02\x02\u02BAm\x03\x02\x02\x02\u02BB\u02C0\x05v<\x02" + + "\u02BC\u02BD\x07h\x02\x02\u02BD\u02BF\x05v<\x02\u02BE\u02BC\x03\x02\x02" + + "\x02\u02BF\u02C2\x03\x02\x02\x02\u02C0\u02BE\x03\x02\x02\x02\u02C0\u02C1" + + "\x03\x02\x02\x02\u02C1o\x03\x02\x02\x02\u02C2\u02C0\x03\x02\x02\x02\u02C3" + + "\u02C8\x05x=\x02\u02C4\u02C5\x07h\x02\x02\u02C5\u02C7\x05x=\x02\u02C6" + + "\u02C4\x03\x02\x02\x02\u02C7\u02CA\x03\x02\x02\x02\u02C8\u02C6\x03\x02" + + "\x02\x02\u02C8\u02C9\x03\x02\x02\x02\u02C9q\x03\x02\x02\x02\u02CA\u02C8" + + "\x03\x02\x02\x02\u02CB\u02CD\t\x02\x02\x02\u02CC\u02CB\x03\x02\x02\x02" + + "\u02CC\u02CD\x03\x02\x02\x02\u02CD\u02CE\x03\x02\x02\x02\u02CE\u02CF\x05" + + "t;\x02\u02CFs\x03\x02\x02\x02\u02D0\u02E6\x05v<\x02\u02D1\u02D2\x07$\x02" + + "\x02\u02D2\u02D3\x07w\x02\x02\u02D3\u02D4\x05v<\x02\u02D4\u02D5\x07x\x02" + + "\x02\u02D5\u02E6\x03\x02\x02\x02\u02D6\u02D7\x07%\x02\x02\u02D7\u02D8" + + "\x07w\x02\x02\u02D8\u02D9\x05v<\x02\u02D9\u02DA\x07x\x02\x02\u02DA\u02E6" + + "\x03\x02\x02\x02\u02DB\u02DC\x07&\x02\x02\u02DC\u02DD\x07w\x02\x02\u02DD" + + "\u02DE\x05v<\x02\u02DE\u02DF\x07x\x02\x02\u02DF\u02E6\x03\x02\x02\x02" + + "\u02E0\u02E1\x07\'\x02\x02\u02E1\u02E2\x07w\x02\x02\u02E2\u02E3\x05v<" + + "\x02\u02E3\u02E4\x07x\x02\x02\u02E4\u02E6\x03\x02\x02\x02\u02E5\u02D0" + + "\x03\x02\x02\x02\u02E5\u02D1\x03\x02\x02\x02\u02E5\u02D6\x03\x02\x02\x02" + + "\u02E5\u02DB\x03\x02\x02\x02\u02E5\u02E0\x03\x02\x02\x02\u02E6u\x03\x02" + + "\x02\x02\u02E7\u02E8\x05\xC6d\x02\u02E8w\x03\x02\x02\x02\u02E9\u02EA\x05" + + "\xC8e\x02\u02EAy\x03\x02\x02\x02\u02EB\u02EC\x05\x82B\x02\u02EC\u02ED" + + "\x07w\x02\x02\u02ED\u02EE\x05\x84C\x02\u02EE\u02EF\x07x\x02\x02\u02EF" + + "{\x03\x02\x02\x02\u02F0\u02F1\x07\xF8\x02\x02\u02F1\u02F2\x07w\x02\x02" + + "\u02F2\u02F3\x05V,\x02\u02F3\u02F4\x07\x1C\x02\x02\u02F4\u02F5\x05\x80" + + "A\x02\u02F5\u02F6\x07x\x02\x02\u02F6}\x03\x02\x02\x02\u02F7\u02F8\x05" + + "\x9EP\x02\u02F8\u02F9\x07w\x02\x02\u02F9\u02FA\x05\x84C\x02\u02FA\u02FB" + + "\x07x\x02\x02\u02FB\x7F\x03\x02\x02\x02\u02FC\u0307\x07\xCB\x02\x02\u02FD" + + "\u0307\x07\xDF\x02\x02\u02FE\u0307\x07\xE1\x02\x02\u02FF\u0307\x07`\x02" + + "\x02\u0300\u0307\x07a\x02\x02\u0301\u0307\x07b\x02\x02\u0302\u0307\x07" + + "c\x02\x02\u0303\u0307\x07d\x02\x02\u0304\u0307\x07e\x02\x02\u0305\u0307" + + "\x07f\x02\x02\u0306\u02FC\x03\x02\x02\x02\u0306\u02FD\x03\x02\x02\x02" + + "\u0306\u02FE\x03\x02\x02\x02\u0306\u02FF\x03\x02\x02\x02\u0306\u0300\x03" + + "\x02\x02\x02\u0306\u0301\x03\x02\x02\x02\u0306\u0302\x03\x02\x02\x02\u0306" + + "\u0303\x03\x02\x02\x02\u0306\u0304\x03\x02\x02\x02\u0306\u0305\x03\x02" + + "\x02\x02\u0307\x81\x03\x02\x02\x02\u0308\u030E\x05\x96L\x02\u0309\u030E" + + "\x05\x9AN\x02\u030A\u030E\x05\xA2R\x02\u030B\u030E\x05\x9EP\x02\u030C" + + "\u030E\x05\xA0Q\x02\u030D\u0308\x03\x02\x02\x02\u030D\u0309\x03\x02\x02" + + "\x02\u030D\u030A\x03\x02\x02\x02\u030D\u030B\x03\x02\x02\x02\u030D\u030C" + + "\x03\x02\x02\x02\u030E\x83\x03\x02\x02\x02\u030F\u0314\x05\x86D\x02\u0310" + + "\u0311\x07h\x02\x02\u0311\u0313\x05\x86D\x02\u0312\u0310\x03\x02\x02\x02" + + "\u0313\u0316\x03\x02\x02\x02\u0314\u0312\x03\x02\x02\x02\u0314\u0315\x03" + + "\x02\x02\x02\u0315\u0318\x03\x02\x02\x02\u0316\u0314\x03\x02\x02\x02\u0317" + + "\u030F\x03\x02\x02\x02\u0317\u0318\x03\x02\x02\x02\u0318\x85\x03\x02\x02" + + "\x02\u0319\u031A\x05\xCAf\x02\u031A\u031B\x07j\x02\x02\u031B\u031D\x03" + + "\x02\x02\x02\u031C\u0319\x03\x02\x02\x02\u031C\u031D\x03\x02\x02\x02\u031D" + + "\u031E\x03\x02\x02\x02\u031E\u031F\x05\\/\x02\u031F\x87\x03\x02\x02\x02" + + "\u0320\u0321\x05\x8AF\x02\u0321\u0322\x07j\x02\x02\u0322\u0323\x05\x94" + + "K\x02\u0323\x89\x03\x02\x02\x02\u0324\u0325\t\x06\x02\x02\u0325\x8B\x03" + + "\x02\x02\x02\u0326\u032F\x05\x90I\x02\u0327\u0328\x05\x90I\x02\u0328\u0329" + + "\x05\x8EH\x02\u0329\u032F\x03\x02\x02\x02\u032A\u032B\x05\x90I\x02\u032B" + + "\u032C\x07\x80\x02\x02\u032C\u032D\x05\x8EH\x02\u032D\u032F\x03\x02\x02" + + "\x02\u032E\u0326\x03\x02\x02\x02\u032E\u0327\x03\x02\x02\x02\u032E\u032A" + + "\x03\x02\x02\x02\u032F\x8D\x03\x02\x02\x02\u0330\u0333\x05\xB2Z\x02\u0331" + + "\u0333\x05\xB4[\x02\u0332\u0330\x03\x02\x02\x02\u0332\u0331\x03\x02\x02" + + "\x02\u0333\x8F\x03\x02\x02\x02\u0334\u0337\x05\xC6d\x02\u0335\u0337\x05" + + "\xB0Y\x02\u0336\u0334\x03\x02\x02\x02\u0336\u0335\x03\x02\x02\x02\u0337" + + "\x91\x03\x02\x02\x02\u0338\u0339\x05\x94K\x02\u0339\x93\x03\x02\x02\x02" + + "\u033A\u033D\x05\xC6d\x02\u033B\u033D\x05\xACW\x02\u033C\u033A\x03\x02" + + "\x02\x02\u033C\u033B\x03\x02\x02\x02\u033D\x95\x03\x02\x02\x02\u033E\u0355" + + "\x07\xA6\x02\x02\u033F\u0355\x07\xA7\x02\x02\u0340\u0355\x07\xA8\x02\x02" + + "\u0341\u0355\x07\xA9\x02\x02\u0342\u0355\x07\xAA\x02\x02\u0343\u0355\x07" + + "\xAB\x02\x02\u0344\u0355\x07\xAC\x02\x02\u0345\u0355\x07\xAD\x02\x02\u0346" + + "\u0355\x07\xAE\x02\x02\u0347\u0355\x07\xAF\x02\x02\u0348\u0355\x07\xB0" + + "\x02\x02\u0349\u0355\x07\xB1\x02\x02\u034A\u0355\x07\xB2\x02\x02\u034B" + + "\u0355\x07\xB3\x02\x02\u034C\u0355\x07\xB4\x02\x02\u034D\u0355\x07\xB5" + + "\x02\x02\u034E\u0355\x07\xB6\x02\x02\u034F\u0355\x07\xB7\x02\x02\u0350" + + "\u0355\x07\xB8\x02\x02\u0351\u0355\x07\xB9\x02\x02\u0352\u0355\x07\xBA" + + "\x02\x02\u0353\u0355\x05\x98M\x02\u0354\u033E\x03\x02\x02\x02\u0354\u033F" + + "\x03\x02\x02\x02\u0354\u0340\x03\x02\x02\x02\u0354\u0341\x03\x02\x02\x02" + + "\u0354\u0342\x03\x02\x02\x02\u0354\u0343\x03\x02\x02\x02\u0354\u0344\x03" + + "\x02\x02\x02\u0354\u0345\x03\x02\x02\x02\u0354\u0346\x03\x02\x02\x02\u0354" + + "\u0347\x03\x02\x02\x02\u0354\u0348\x03\x02\x02\x02\u0354\u0349\x03\x02" + + "\x02\x02\u0354\u034A\x03\x02\x02\x02\u0354\u034B\x03\x02\x02\x02\u0354" + + "\u034C\x03\x02\x02\x02\u0354\u034D\x03\x02\x02\x02\u0354\u034E\x03\x02" + + "\x02\x02\u0354\u034F\x03\x02\x02\x02\u0354\u0350\x03\x02\x02\x02\u0354" + + "\u0351\x03\x02\x02\x02\u0354\u0352\x03\x02\x02\x02\u0354\u0353\x03\x02" + + "\x02\x02\u0355\x97\x03\x02\x02\x02\u0356\u0357\t\x07\x02\x02\u0357\x99" + + "\x03\x02\x02\x02\u0358\u0359\t\b\x02\x02\u0359\x9B\x03\x02\x02\x02\u035A" + + "\u035B\t\t\x02\x02\u035B\x9D\x03\x02\x02\x02\u035C\u035D\t\n\x02\x02\u035D" + + "\x9F\x03\x02\x02\x02\u035E\u035F\x07\xFF\x02\x02\u035F\xA1\x03\x02\x02" + + "\x02\u0360\u0361\t\v\x02\x02\u0361\xA3\x03\x02\x02\x02\u0362\u0363\t\f" + + "\x02\x02\u0363\xA5\x03\x02\x02\x02\u0364\u0365\t\r\x02\x02\u0365\xA7\x03" + + "\x02\x02\x02\u0366\u0367\t\x0E\x02\x02\u0367\xA9\x03\x02\x02\x02\u0368" + + "\u0369\t\x0F\x02\x02\u0369\xAB\x03\x02\x02\x02\u036A\u0371\x05\xAEX\x02" + + "\u036B\u0371\x05\xB0Y\x02\u036C\u0371\x05\xB2Z\x02\u036D\u0371\x05\xB4" + + "[\x02\u036E\u0371\x05\xB6\\\x02\u036F\u0371\x05\xB8]\x02\u0370\u036A\x03" + + "\x02\x02\x02\u0370\u036B\x03\x02\x02\x02\u0370\u036C\x03\x02\x02\x02\u0370" + + "\u036D\x03\x02\x02\x02\u0370\u036E\x03\x02\x02\x02\u0370\u036F\x03\x02" + + "\x02\x02\u0371\xAD\x03\x02\x02\x02\u0372\u0373\x07F\x02\x02\u0373\u0374" + + "\x05\\/\x02\u0374\u0375\x05\xC0a\x02\u0375\xAF\x03\x02\x02\x02\u0376\u0377" + + "\t\x10\x02\x02\u0377\xB1\x03\x02\x02\x02\u0378\u037A\t\x02\x02\x02\u0379" + + "\u0378\x03\x02\x02\x02\u0379\u037A\x03\x02\x02\x02\u037A\u037B\x03\x02" + + "\x02\x02\u037B\u037C\x07\u012F\x02\x02\u037C\xB3\x03\x02\x02\x02\u037D" + + "\u037F\t\x02\x02\x02\u037E\u037D\x03\x02\x02\x02\u037E\u037F\x03\x02\x02" + + "\x02\u037F\u0380\x03\x02\x02\x02\u0380\u0381\x07\u0130\x02\x02\u0381\xB5" + + "\x03\x02\x02\x02\u0382\u0383\t\x11\x02\x02\u0383\xB7\x03\x02\x02\x02\u0384" + + "\u0388\x05\xBA^\x02\u0385\u0388\x05\xBC_\x02\u0386\u0388\x05\xBE`\x02" + + "\u0387\u0384\x03\x02\x02\x02\u0387\u0385\x03\x02\x02\x02\u0387\u0386\x03" + + "\x02\x02\x02\u0388\xB9\x03\x02\x02\x02\u0389\u038A\x07\xCB\x02\x02\u038A" + + "\u038B\x05\xB0Y\x02\u038B\xBB\x03\x02\x02\x02\u038C\u038D\x07\xDF\x02" + + "\x02\u038D\u038E\x05\xB0Y\x02\u038E\xBD\x03\x02\x02\x02\u038F\u0390\x07" + + "\xE1\x02\x02\u0390\u0391\x05\xB0Y\x02\u0391\xBF\x03\x02\x02\x02\u0392" + + "\u0393\t\x12\x02\x02\u0393\xC1\x03\x02\x02\x02\u0394\u0395\t\x13\x02\x02" + + "\u0395\xC3\x03\x02\x02\x02\u0396\u0397\x07w\x02\x02\u0397\u039C\x05\xAC" + + "W\x02\u0398\u0399\x07h\x02\x02\u0399\u039B\x05\xACW\x02\u039A\u0398\x03" + + "\x02\x02\x02\u039B\u039E\x03\x02\x02\x02\u039C\u039A\x03\x02\x02\x02\u039C" + + "\u039D\x03\x02\x02\x02\u039D\u039F\x03\x02\x02\x02\u039E\u039C\x03\x02" + + "\x02\x02\u039F\u03A0\x07x\x02\x02\u03A0\xC5\x03\x02\x02\x02\u03A1\u03A6" + + "\x05\xCAf\x02\u03A2\u03A3\x07i\x02\x02\u03A3\u03A5\x05\xCAf\x02\u03A4" + + "\u03A2\x03\x02\x02\x02\u03A5\u03A8\x03\x02\x02\x02\u03A6\u03A4\x03\x02" + + "\x02\x02\u03A6\u03A7\x03\x02\x02\x02\u03A7\xC7\x03\x02\x02\x02\u03A8\u03A6" + + "\x03\x02\x02\x02\u03A9\u03AE\x05\xCCg\x02\u03AA\u03AB\x07i\x02\x02\u03AB" + + "\u03AD\x05\xCCg\x02\u03AC\u03AA\x03\x02\x02\x02\u03AD\u03B0\x03\x02\x02" + + "\x02\u03AE\u03AC\x03\x02\x02\x02\u03AE\u03AF\x03\x02\x02\x02\u03AF\xC9" + + "\x03\x02\x02\x02\u03B0\u03AE\x03\x02\x02\x02\u03B1\u03B3\x07i\x02\x02" + + "\u03B2\u03B1\x03\x02\x02\x02\u03B2\u03B3\x03\x02\x02\x02\u03B3\u03B4\x03" + + "\x02\x02\x02\u03B4\u03BC\x07\u012E\x02\x02\u03B5\u03B6\x07}\x02\x02\u03B6" + + "\u03B7\x05\xCAf\x02\u03B7\u03B8\x07}\x02\x02\u03B8\u03BC\x03\x02\x02\x02" + + "\u03B9\u03BC\x07\u0134\x02\x02\u03BA\u03BC\x05\xCEh\x02\u03BB\u03B2\x03" + + "\x02\x02\x02\u03BB\u03B5\x03\x02\x02\x02\u03BB\u03B9\x03\x02\x02\x02\u03BB" + + "\u03BA\x03\x02\x02\x02\u03BC\xCB\x03\x02\x02\x02\u03BD\u03C2\x05\xCAf" + + "\x02\u03BE\u03BF\x07t\x02\x02\u03BF\u03C1\x05\xCAf\x02\u03C0\u03BE\x03" + + "\x02\x02\x02\u03C1\u03C4\x03\x02\x02\x02\u03C2\u03C0\x03\x02\x02\x02\u03C2" + + "\u03C3\x03\x02\x02\x02\u03C3\u03C6\x03\x02\x02\x02\u03C4\u03C2\x03\x02" + + "\x02\x02\u03C5\u03C7\x07t\x02\x02\u03C6\u03C5\x03\x02\x02\x02\u03C6\u03C7" + + "\x03\x02\x02\x02\u03C7\u03D5\x03\x02\x02\x02\u03C8\u03C9\x07{\x02\x02" + + "\u03C9\u03CA\x05\xCCg\x02\u03CA\u03CB\x07{\x02\x02\u03CB\u03D5\x03\x02" + + "\x02\x02\u03CC\u03CD\x07|\x02\x02\u03CD\u03CE\x05\xCCg\x02\u03CE\u03CF" + + "\x07|\x02\x02\u03CF\u03D5\x03\x02\x02\x02\u03D0\u03D1\x07}\x02\x02\u03D1" + + "\u03D2\x05\xCCg\x02\u03D2\u03D3\x07}\x02\x02\u03D3\u03D5\x03\x02\x02\x02" + + "\u03D4\u03BD\x03\x02\x02\x02\u03D4\u03C8\x03\x02\x02\x02\u03D4\u03CC\x03" + + "\x02\x02\x02\u03D4\u03D0\x03\x02\x02\x02\u03D5\xCD\x03\x02\x02\x02\u03D6" + + "\u03E4\x07 \x02\x02\u03D7\u03E4\x05P)\x02\u03D8\u03E4\x07\xE1\x02\x02" + + "\u03D9\u03E4\x07\xCB\x02\x02\u03DA\u03E4\x07\xDF\x02\x02\u03DB\u03E4\x07" + + "\x96\x02\x02\u03DC\u03E4\x07\x97\x02\x02\u03DD\u03E4\x05\xC2b\x02\u03DE" + + "\u03E4\x07\u0126\x02\x02\u03DF\u03E4\x05\x9CO\x02\u03E0\u03E4\x05\x9A" + + "N\x02\u03E1\u03E4\x05\xA2R\x02\u03E2\u03E4\x05\x96L\x02\u03E3\u03D6\x03" + + "\x02\x02\x02\u03E3\u03D7\x03\x02\x02\x02\u03E3\u03D8\x03\x02\x02\x02\u03E3" + + "\u03D9\x03\x02\x02\x02\u03E3\u03DA\x03\x02\x02\x02\u03E3\u03DB\x03\x02" + + "\x02\x02\u03E3\u03DC\x03\x02\x02\x02\u03E3\u03DD\x03\x02\x02\x02\u03E3" + + "\u03DE\x03\x02\x02\x02\u03E3\u03DF\x03\x02\x02\x02\u03E3\u03E0\x03\x02" + + "\x02\x02\u03E3\u03E1\x03\x02\x02\x02\u03E3\u03E2\x03\x02\x02\x02\u03E4" + + "\xCF\x03\x02\x02\x02U\xD1\xDA\xE0\xF2\xF5\xF9\xFF\u0104\u0111\u011B\u0122" + + "\u0127\u012C\u0133\u0137\u013C\u0140\u0146\u014B\u0156\u015B\u015F\u0163" + + "\u0167\u016C\u017A\u0185\u018D\u0199\u019F\u01C6\u01CC\u01DF\u01E6\u01F9" + + "\u01FE\u0206\u020F\u0219\u022A\u0233\u0242\u024A\u0251\u0257\u0259\u0264" + + "\u026E\u0276\u027E\u0283\u028B\u0296\u02A3\u02AD\u02B4\u02C0\u02C8\u02CC" + + "\u02E5\u0306\u030D\u0314\u0317\u031C\u032E\u0332\u0336\u033C\u0354\u0370" + + "\u0379\u037E\u0387\u039C\u03A6\u03AE\u03B2\u03BB\u03C2\u03C6\u03D4\u03E3"; + public static readonly _serializedATN: string = Utils.join( + [ + OpenSearchPPLParser._serializedATNSegment0, + OpenSearchPPLParser._serializedATNSegment1, + ], + "", + ); + public static __ATN: ATN; + public static get _ATN(): ATN { + if (!OpenSearchPPLParser.__ATN) { + OpenSearchPPLParser.__ATN = new ATNDeserializer().deserialize(Utils.toCharArray(OpenSearchPPLParser._serializedATN)); + } + + return OpenSearchPPLParser.__ATN; + } + +} + +export class RootContext extends ParserRuleContext { + public EOF(): TerminalNode { return this.getToken(OpenSearchPPLParser.EOF, 0); } + public pplStatement(): PplStatementContext | undefined { + return this.tryGetRuleContext(0, PplStatementContext); + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_root; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterRoot) { + listener.enterRoot(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitRoot) { + listener.exitRoot(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitRoot) { + return visitor.visitRoot(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class PplStatementContext extends ParserRuleContext { + public pplCommands(): PplCommandsContext { + return this.getRuleContext(0, PplCommandsContext); + } + public PIPE(): TerminalNode[]; + public PIPE(i: number): TerminalNode; + public PIPE(i?: number): TerminalNode | TerminalNode[] { + if (i === undefined) { + return this.getTokens(OpenSearchPPLParser.PIPE); + } else { + return this.getToken(OpenSearchPPLParser.PIPE, i); + } + } + public commands(): CommandsContext[]; + public commands(i: number): CommandsContext; + public commands(i?: number): CommandsContext | CommandsContext[] { + if (i === undefined) { + return this.getRuleContexts(CommandsContext); + } else { + return this.getRuleContext(i, CommandsContext); + } + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_pplStatement; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterPplStatement) { + listener.enterPplStatement(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitPplStatement) { + listener.exitPplStatement(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitPplStatement) { + return visitor.visitPplStatement(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class PplCommandsContext extends ParserRuleContext { + public searchCommand(): SearchCommandContext | undefined { + return this.tryGetRuleContext(0, SearchCommandContext); + } + public describeCommand(): DescribeCommandContext | undefined { + return this.tryGetRuleContext(0, DescribeCommandContext); + } + public showCatalogsCommand(): ShowCatalogsCommandContext | undefined { + return this.tryGetRuleContext(0, ShowCatalogsCommandContext); + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_pplCommands; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterPplCommands) { + listener.enterPplCommands(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitPplCommands) { + listener.exitPplCommands(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitPplCommands) { + return visitor.visitPplCommands(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class CommandsContext extends ParserRuleContext { + public whereCommand(): WhereCommandContext | undefined { + return this.tryGetRuleContext(0, WhereCommandContext); + } + public fieldsCommand(): FieldsCommandContext | undefined { + return this.tryGetRuleContext(0, FieldsCommandContext); + } + public renameCommand(): RenameCommandContext | undefined { + return this.tryGetRuleContext(0, RenameCommandContext); + } + public statsCommand(): StatsCommandContext | undefined { + return this.tryGetRuleContext(0, StatsCommandContext); + } + public dedupCommand(): DedupCommandContext | undefined { + return this.tryGetRuleContext(0, DedupCommandContext); + } + public sortCommand(): SortCommandContext | undefined { + return this.tryGetRuleContext(0, SortCommandContext); + } + public evalCommand(): EvalCommandContext | undefined { + return this.tryGetRuleContext(0, EvalCommandContext); + } + public headCommand(): HeadCommandContext | undefined { + return this.tryGetRuleContext(0, HeadCommandContext); + } + public topCommand(): TopCommandContext | undefined { + return this.tryGetRuleContext(0, TopCommandContext); + } + public rareCommand(): RareCommandContext | undefined { + return this.tryGetRuleContext(0, RareCommandContext); + } + public grokCommand(): GrokCommandContext | undefined { + return this.tryGetRuleContext(0, GrokCommandContext); + } + public parseCommand(): ParseCommandContext | undefined { + return this.tryGetRuleContext(0, ParseCommandContext); + } + public patternsCommand(): PatternsCommandContext | undefined { + return this.tryGetRuleContext(0, PatternsCommandContext); + } + public kmeansCommand(): KmeansCommandContext | undefined { + return this.tryGetRuleContext(0, KmeansCommandContext); + } + public adCommand(): AdCommandContext | undefined { + return this.tryGetRuleContext(0, AdCommandContext); + } + public mlCommand(): MlCommandContext | undefined { + return this.tryGetRuleContext(0, MlCommandContext); + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_commands; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterCommands) { + listener.enterCommands(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitCommands) { + listener.exitCommands(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitCommands) { + return visitor.visitCommands(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class SearchCommandContext extends ParserRuleContext { + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_searchCommand; } + public copyFrom(ctx: SearchCommandContext): void { + super.copyFrom(ctx); + } +} +export class SearchFromContext extends SearchCommandContext { + public fromClause(): FromClauseContext { + return this.getRuleContext(0, FromClauseContext); + } + public SEARCH(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.SEARCH, 0); } + constructor(ctx: SearchCommandContext) { + super(ctx.parent, ctx.invokingState); + this.copyFrom(ctx); + } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterSearchFrom) { + listener.enterSearchFrom(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitSearchFrom) { + listener.exitSearchFrom(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitSearchFrom) { + return visitor.visitSearchFrom(this); + } else { + return visitor.visitChildren(this); + } + } +} +export class SearchFromFilterContext extends SearchCommandContext { + public fromClause(): FromClauseContext { + return this.getRuleContext(0, FromClauseContext); + } + public logicalExpression(): LogicalExpressionContext { + return this.getRuleContext(0, LogicalExpressionContext); + } + public SEARCH(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.SEARCH, 0); } + constructor(ctx: SearchCommandContext) { + super(ctx.parent, ctx.invokingState); + this.copyFrom(ctx); + } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterSearchFromFilter) { + listener.enterSearchFromFilter(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitSearchFromFilter) { + listener.exitSearchFromFilter(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitSearchFromFilter) { + return visitor.visitSearchFromFilter(this); + } else { + return visitor.visitChildren(this); + } + } +} +export class SearchFilterFromContext extends SearchCommandContext { + public logicalExpression(): LogicalExpressionContext { + return this.getRuleContext(0, LogicalExpressionContext); + } + public fromClause(): FromClauseContext { + return this.getRuleContext(0, FromClauseContext); + } + public SEARCH(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.SEARCH, 0); } + constructor(ctx: SearchCommandContext) { + super(ctx.parent, ctx.invokingState); + this.copyFrom(ctx); + } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterSearchFilterFrom) { + listener.enterSearchFilterFrom(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitSearchFilterFrom) { + listener.exitSearchFilterFrom(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitSearchFilterFrom) { + return visitor.visitSearchFilterFrom(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class DescribeCommandContext extends ParserRuleContext { + public DESCRIBE(): TerminalNode { return this.getToken(OpenSearchPPLParser.DESCRIBE, 0); } + public tableSourceClause(): TableSourceClauseContext { + return this.getRuleContext(0, TableSourceClauseContext); + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_describeCommand; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterDescribeCommand) { + listener.enterDescribeCommand(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitDescribeCommand) { + listener.exitDescribeCommand(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitDescribeCommand) { + return visitor.visitDescribeCommand(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class ShowCatalogsCommandContext extends ParserRuleContext { + public SHOW(): TerminalNode { return this.getToken(OpenSearchPPLParser.SHOW, 0); } + public CATALOGS(): TerminalNode { return this.getToken(OpenSearchPPLParser.CATALOGS, 0); } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_showCatalogsCommand; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterShowCatalogsCommand) { + listener.enterShowCatalogsCommand(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitShowCatalogsCommand) { + listener.exitShowCatalogsCommand(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitShowCatalogsCommand) { + return visitor.visitShowCatalogsCommand(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class WhereCommandContext extends ParserRuleContext { + public WHERE(): TerminalNode { return this.getToken(OpenSearchPPLParser.WHERE, 0); } + public logicalExpression(): LogicalExpressionContext { + return this.getRuleContext(0, LogicalExpressionContext); + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_whereCommand; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterWhereCommand) { + listener.enterWhereCommand(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitWhereCommand) { + listener.exitWhereCommand(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitWhereCommand) { + return visitor.visitWhereCommand(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class FieldsCommandContext extends ParserRuleContext { + public FIELDS(): TerminalNode { return this.getToken(OpenSearchPPLParser.FIELDS, 0); } + public fieldList(): FieldListContext { + return this.getRuleContext(0, FieldListContext); + } + public PLUS(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.PLUS, 0); } + public MINUS(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.MINUS, 0); } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_fieldsCommand; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterFieldsCommand) { + listener.enterFieldsCommand(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitFieldsCommand) { + listener.exitFieldsCommand(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitFieldsCommand) { + return visitor.visitFieldsCommand(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class RenameCommandContext extends ParserRuleContext { + public RENAME(): TerminalNode { return this.getToken(OpenSearchPPLParser.RENAME, 0); } + public renameClasue(): RenameClasueContext[]; + public renameClasue(i: number): RenameClasueContext; + public renameClasue(i?: number): RenameClasueContext | RenameClasueContext[] { + if (i === undefined) { + return this.getRuleContexts(RenameClasueContext); + } else { + return this.getRuleContext(i, RenameClasueContext); + } + } + public COMMA(): TerminalNode[]; + public COMMA(i: number): TerminalNode; + public COMMA(i?: number): TerminalNode | TerminalNode[] { + if (i === undefined) { + return this.getTokens(OpenSearchPPLParser.COMMA); + } else { + return this.getToken(OpenSearchPPLParser.COMMA, i); + } + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_renameCommand; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterRenameCommand) { + listener.enterRenameCommand(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitRenameCommand) { + listener.exitRenameCommand(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitRenameCommand) { + return visitor.visitRenameCommand(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class StatsCommandContext extends ParserRuleContext { + public _partitions!: IntegerLiteralContext; + public _allnum!: BooleanLiteralContext; + public _delim!: StringLiteralContext; + public _dedupsplit!: BooleanLiteralContext; + public STATS(): TerminalNode { return this.getToken(OpenSearchPPLParser.STATS, 0); } + public statsAggTerm(): StatsAggTermContext[]; + public statsAggTerm(i: number): StatsAggTermContext; + public statsAggTerm(i?: number): StatsAggTermContext | StatsAggTermContext[] { + if (i === undefined) { + return this.getRuleContexts(StatsAggTermContext); + } else { + return this.getRuleContext(i, StatsAggTermContext); + } + } + public PARTITIONS(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.PARTITIONS, 0); } + public EQUAL(): TerminalNode[]; + public EQUAL(i: number): TerminalNode; + public EQUAL(i?: number): TerminalNode | TerminalNode[] { + if (i === undefined) { + return this.getTokens(OpenSearchPPLParser.EQUAL); + } else { + return this.getToken(OpenSearchPPLParser.EQUAL, i); + } + } + public ALLNUM(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.ALLNUM, 0); } + public DELIM(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.DELIM, 0); } + public COMMA(): TerminalNode[]; + public COMMA(i: number): TerminalNode; + public COMMA(i?: number): TerminalNode | TerminalNode[] { + if (i === undefined) { + return this.getTokens(OpenSearchPPLParser.COMMA); + } else { + return this.getToken(OpenSearchPPLParser.COMMA, i); + } + } + public statsByClause(): StatsByClauseContext | undefined { + return this.tryGetRuleContext(0, StatsByClauseContext); + } + public DEDUP_SPLITVALUES(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.DEDUP_SPLITVALUES, 0); } + public integerLiteral(): IntegerLiteralContext | undefined { + return this.tryGetRuleContext(0, IntegerLiteralContext); + } + public booleanLiteral(): BooleanLiteralContext[]; + public booleanLiteral(i: number): BooleanLiteralContext; + public booleanLiteral(i?: number): BooleanLiteralContext | BooleanLiteralContext[] { + if (i === undefined) { + return this.getRuleContexts(BooleanLiteralContext); + } else { + return this.getRuleContext(i, BooleanLiteralContext); + } + } + public stringLiteral(): StringLiteralContext | undefined { + return this.tryGetRuleContext(0, StringLiteralContext); + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_statsCommand; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterStatsCommand) { + listener.enterStatsCommand(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitStatsCommand) { + listener.exitStatsCommand(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitStatsCommand) { + return visitor.visitStatsCommand(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class DedupCommandContext extends ParserRuleContext { + public _number!: IntegerLiteralContext; + public _keepempty!: BooleanLiteralContext; + public _consecutive!: BooleanLiteralContext; + public DEDUP(): TerminalNode { return this.getToken(OpenSearchPPLParser.DEDUP, 0); } + public fieldList(): FieldListContext { + return this.getRuleContext(0, FieldListContext); + } + public KEEPEMPTY(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.KEEPEMPTY, 0); } + public EQUAL(): TerminalNode[]; + public EQUAL(i: number): TerminalNode; + public EQUAL(i?: number): TerminalNode | TerminalNode[] { + if (i === undefined) { + return this.getTokens(OpenSearchPPLParser.EQUAL); + } else { + return this.getToken(OpenSearchPPLParser.EQUAL, i); + } + } + public CONSECUTIVE(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.CONSECUTIVE, 0); } + public integerLiteral(): IntegerLiteralContext | undefined { + return this.tryGetRuleContext(0, IntegerLiteralContext); + } + public booleanLiteral(): BooleanLiteralContext[]; + public booleanLiteral(i: number): BooleanLiteralContext; + public booleanLiteral(i?: number): BooleanLiteralContext | BooleanLiteralContext[] { + if (i === undefined) { + return this.getRuleContexts(BooleanLiteralContext); + } else { + return this.getRuleContext(i, BooleanLiteralContext); + } + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_dedupCommand; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterDedupCommand) { + listener.enterDedupCommand(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitDedupCommand) { + listener.exitDedupCommand(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitDedupCommand) { + return visitor.visitDedupCommand(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class SortCommandContext extends ParserRuleContext { + public SORT(): TerminalNode { return this.getToken(OpenSearchPPLParser.SORT, 0); } + public sortbyClause(): SortbyClauseContext { + return this.getRuleContext(0, SortbyClauseContext); + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_sortCommand; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterSortCommand) { + listener.enterSortCommand(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitSortCommand) { + listener.exitSortCommand(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitSortCommand) { + return visitor.visitSortCommand(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class EvalCommandContext extends ParserRuleContext { + public EVAL(): TerminalNode { return this.getToken(OpenSearchPPLParser.EVAL, 0); } + public evalClause(): EvalClauseContext[]; + public evalClause(i: number): EvalClauseContext; + public evalClause(i?: number): EvalClauseContext | EvalClauseContext[] { + if (i === undefined) { + return this.getRuleContexts(EvalClauseContext); + } else { + return this.getRuleContext(i, EvalClauseContext); + } + } + public COMMA(): TerminalNode[]; + public COMMA(i: number): TerminalNode; + public COMMA(i?: number): TerminalNode | TerminalNode[] { + if (i === undefined) { + return this.getTokens(OpenSearchPPLParser.COMMA); + } else { + return this.getToken(OpenSearchPPLParser.COMMA, i); + } + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_evalCommand; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterEvalCommand) { + listener.enterEvalCommand(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitEvalCommand) { + listener.exitEvalCommand(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitEvalCommand) { + return visitor.visitEvalCommand(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class HeadCommandContext extends ParserRuleContext { + public _number!: IntegerLiteralContext; + public _from!: IntegerLiteralContext; + public HEAD(): TerminalNode { return this.getToken(OpenSearchPPLParser.HEAD, 0); } + public FROM(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.FROM, 0); } + public integerLiteral(): IntegerLiteralContext[]; + public integerLiteral(i: number): IntegerLiteralContext; + public integerLiteral(i?: number): IntegerLiteralContext | IntegerLiteralContext[] { + if (i === undefined) { + return this.getRuleContexts(IntegerLiteralContext); + } else { + return this.getRuleContext(i, IntegerLiteralContext); + } + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_headCommand; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterHeadCommand) { + listener.enterHeadCommand(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitHeadCommand) { + listener.exitHeadCommand(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitHeadCommand) { + return visitor.visitHeadCommand(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class TopCommandContext extends ParserRuleContext { + public _number!: IntegerLiteralContext; + public TOP(): TerminalNode { return this.getToken(OpenSearchPPLParser.TOP, 0); } + public fieldList(): FieldListContext { + return this.getRuleContext(0, FieldListContext); + } + public byClause(): ByClauseContext | undefined { + return this.tryGetRuleContext(0, ByClauseContext); + } + public integerLiteral(): IntegerLiteralContext | undefined { + return this.tryGetRuleContext(0, IntegerLiteralContext); + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_topCommand; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterTopCommand) { + listener.enterTopCommand(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitTopCommand) { + listener.exitTopCommand(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitTopCommand) { + return visitor.visitTopCommand(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class RareCommandContext extends ParserRuleContext { + public RARE(): TerminalNode { return this.getToken(OpenSearchPPLParser.RARE, 0); } + public fieldList(): FieldListContext { + return this.getRuleContext(0, FieldListContext); + } + public byClause(): ByClauseContext | undefined { + return this.tryGetRuleContext(0, ByClauseContext); + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_rareCommand; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterRareCommand) { + listener.enterRareCommand(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitRareCommand) { + listener.exitRareCommand(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitRareCommand) { + return visitor.visitRareCommand(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class GrokCommandContext extends ParserRuleContext { + public _source_field!: ExpressionContext; + public _pattern!: StringLiteralContext; + public GROK(): TerminalNode { return this.getToken(OpenSearchPPLParser.GROK, 0); } + public expression(): ExpressionContext | undefined { + return this.tryGetRuleContext(0, ExpressionContext); + } + public stringLiteral(): StringLiteralContext | undefined { + return this.tryGetRuleContext(0, StringLiteralContext); + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_grokCommand; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterGrokCommand) { + listener.enterGrokCommand(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitGrokCommand) { + listener.exitGrokCommand(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitGrokCommand) { + return visitor.visitGrokCommand(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class ParseCommandContext extends ParserRuleContext { + public _source_field!: ExpressionContext; + public _pattern!: StringLiteralContext; + public PARSE(): TerminalNode { return this.getToken(OpenSearchPPLParser.PARSE, 0); } + public expression(): ExpressionContext | undefined { + return this.tryGetRuleContext(0, ExpressionContext); + } + public stringLiteral(): StringLiteralContext | undefined { + return this.tryGetRuleContext(0, StringLiteralContext); + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_parseCommand; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterParseCommand) { + listener.enterParseCommand(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitParseCommand) { + listener.exitParseCommand(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitParseCommand) { + return visitor.visitParseCommand(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class PatternsCommandContext extends ParserRuleContext { + public _source_field!: ExpressionContext; + public PATTERNS(): TerminalNode { return this.getToken(OpenSearchPPLParser.PATTERNS, 0); } + public patternsParameter(): PatternsParameterContext[]; + public patternsParameter(i: number): PatternsParameterContext; + public patternsParameter(i?: number): PatternsParameterContext | PatternsParameterContext[] { + if (i === undefined) { + return this.getRuleContexts(PatternsParameterContext); + } else { + return this.getRuleContext(i, PatternsParameterContext); + } + } + public expression(): ExpressionContext | undefined { + return this.tryGetRuleContext(0, ExpressionContext); + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_patternsCommand; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterPatternsCommand) { + listener.enterPatternsCommand(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitPatternsCommand) { + listener.exitPatternsCommand(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitPatternsCommand) { + return visitor.visitPatternsCommand(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class PatternsParameterContext extends ParserRuleContext { + public _new_field!: StringLiteralContext; + public _pattern!: StringLiteralContext; + public NEW_FIELD(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.NEW_FIELD, 0); } + public EQUAL(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.EQUAL, 0); } + public stringLiteral(): StringLiteralContext | undefined { + return this.tryGetRuleContext(0, StringLiteralContext); + } + public PATTERN(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.PATTERN, 0); } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_patternsParameter; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterPatternsParameter) { + listener.enterPatternsParameter(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitPatternsParameter) { + listener.exitPatternsParameter(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitPatternsParameter) { + return visitor.visitPatternsParameter(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class PatternsMethodContext extends ParserRuleContext { + public PUNCT(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.PUNCT, 0); } + public REGEX(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.REGEX, 0); } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_patternsMethod; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterPatternsMethod) { + listener.enterPatternsMethod(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitPatternsMethod) { + listener.exitPatternsMethod(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitPatternsMethod) { + return visitor.visitPatternsMethod(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class KmeansCommandContext extends ParserRuleContext { + public KMEANS(): TerminalNode { return this.getToken(OpenSearchPPLParser.KMEANS, 0); } + public kmeansParameter(): KmeansParameterContext[]; + public kmeansParameter(i: number): KmeansParameterContext; + public kmeansParameter(i?: number): KmeansParameterContext | KmeansParameterContext[] { + if (i === undefined) { + return this.getRuleContexts(KmeansParameterContext); + } else { + return this.getRuleContext(i, KmeansParameterContext); + } + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_kmeansCommand; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterKmeansCommand) { + listener.enterKmeansCommand(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitKmeansCommand) { + listener.exitKmeansCommand(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitKmeansCommand) { + return visitor.visitKmeansCommand(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class KmeansParameterContext extends ParserRuleContext { + public _centroids!: IntegerLiteralContext; + public _iterations!: IntegerLiteralContext; + public _distance_type!: StringLiteralContext; + public CENTROIDS(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.CENTROIDS, 0); } + public EQUAL(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.EQUAL, 0); } + public integerLiteral(): IntegerLiteralContext | undefined { + return this.tryGetRuleContext(0, IntegerLiteralContext); + } + public ITERATIONS(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.ITERATIONS, 0); } + public DISTANCE_TYPE(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.DISTANCE_TYPE, 0); } + public stringLiteral(): StringLiteralContext | undefined { + return this.tryGetRuleContext(0, StringLiteralContext); + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_kmeansParameter; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterKmeansParameter) { + listener.enterKmeansParameter(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitKmeansParameter) { + listener.exitKmeansParameter(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitKmeansParameter) { + return visitor.visitKmeansParameter(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class AdCommandContext extends ParserRuleContext { + public AD(): TerminalNode { return this.getToken(OpenSearchPPLParser.AD, 0); } + public adParameter(): AdParameterContext[]; + public adParameter(i: number): AdParameterContext; + public adParameter(i?: number): AdParameterContext | AdParameterContext[] { + if (i === undefined) { + return this.getRuleContexts(AdParameterContext); + } else { + return this.getRuleContext(i, AdParameterContext); + } + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_adCommand; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterAdCommand) { + listener.enterAdCommand(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitAdCommand) { + listener.exitAdCommand(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitAdCommand) { + return visitor.visitAdCommand(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class AdParameterContext extends ParserRuleContext { + public _number_of_trees!: IntegerLiteralContext; + public _shingle_size!: IntegerLiteralContext; + public _sample_size!: IntegerLiteralContext; + public _output_after!: IntegerLiteralContext; + public _time_decay!: DecimalLiteralContext; + public _anomaly_rate!: DecimalLiteralContext; + public _category_field!: StringLiteralContext; + public _time_field!: StringLiteralContext; + public _date_format!: StringLiteralContext; + public _time_zone!: StringLiteralContext; + public _training_data_size!: IntegerLiteralContext; + public _anomaly_score_threshold!: DecimalLiteralContext; + public NUMBER_OF_TREES(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.NUMBER_OF_TREES, 0); } + public EQUAL(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.EQUAL, 0); } + public integerLiteral(): IntegerLiteralContext | undefined { + return this.tryGetRuleContext(0, IntegerLiteralContext); + } + public SHINGLE_SIZE(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.SHINGLE_SIZE, 0); } + public SAMPLE_SIZE(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.SAMPLE_SIZE, 0); } + public OUTPUT_AFTER(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.OUTPUT_AFTER, 0); } + public TIME_DECAY(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.TIME_DECAY, 0); } + public decimalLiteral(): DecimalLiteralContext | undefined { + return this.tryGetRuleContext(0, DecimalLiteralContext); + } + public ANOMALY_RATE(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.ANOMALY_RATE, 0); } + public CATEGORY_FIELD(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.CATEGORY_FIELD, 0); } + public stringLiteral(): StringLiteralContext | undefined { + return this.tryGetRuleContext(0, StringLiteralContext); + } + public TIME_FIELD(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.TIME_FIELD, 0); } + public DATE_FORMAT(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.DATE_FORMAT, 0); } + public TIME_ZONE(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.TIME_ZONE, 0); } + public TRAINING_DATA_SIZE(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.TRAINING_DATA_SIZE, 0); } + public ANOMALY_SCORE_THRESHOLD(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.ANOMALY_SCORE_THRESHOLD, 0); } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_adParameter; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterAdParameter) { + listener.enterAdParameter(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitAdParameter) { + listener.exitAdParameter(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitAdParameter) { + return visitor.visitAdParameter(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class MlCommandContext extends ParserRuleContext { + public ML(): TerminalNode { return this.getToken(OpenSearchPPLParser.ML, 0); } + public mlArg(): MlArgContext[]; + public mlArg(i: number): MlArgContext; + public mlArg(i?: number): MlArgContext | MlArgContext[] { + if (i === undefined) { + return this.getRuleContexts(MlArgContext); + } else { + return this.getRuleContext(i, MlArgContext); + } + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_mlCommand; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterMlCommand) { + listener.enterMlCommand(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitMlCommand) { + listener.exitMlCommand(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitMlCommand) { + return visitor.visitMlCommand(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class MlArgContext extends ParserRuleContext { + public _argName!: IdentContext; + public _argValue!: LiteralValueContext; + public EQUAL(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.EQUAL, 0); } + public ident(): IdentContext | undefined { + return this.tryGetRuleContext(0, IdentContext); + } + public literalValue(): LiteralValueContext | undefined { + return this.tryGetRuleContext(0, LiteralValueContext); + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_mlArg; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterMlArg) { + listener.enterMlArg(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitMlArg) { + listener.exitMlArg(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitMlArg) { + return visitor.visitMlArg(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class FromClauseContext extends ParserRuleContext { + public SOURCE(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.SOURCE, 0); } + public EQUAL(): TerminalNode { return this.getToken(OpenSearchPPLParser.EQUAL, 0); } + public tableSourceClause(): TableSourceClauseContext | undefined { + return this.tryGetRuleContext(0, TableSourceClauseContext); + } + public INDEX(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.INDEX, 0); } + public tableFunction(): TableFunctionContext | undefined { + return this.tryGetRuleContext(0, TableFunctionContext); + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_fromClause; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterFromClause) { + listener.enterFromClause(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitFromClause) { + listener.exitFromClause(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitFromClause) { + return visitor.visitFromClause(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class TableSourceClauseContext extends ParserRuleContext { + public tableSource(): TableSourceContext[]; + public tableSource(i: number): TableSourceContext; + public tableSource(i?: number): TableSourceContext | TableSourceContext[] { + if (i === undefined) { + return this.getRuleContexts(TableSourceContext); + } else { + return this.getRuleContext(i, TableSourceContext); + } + } + public COMMA(): TerminalNode[]; + public COMMA(i: number): TerminalNode; + public COMMA(i?: number): TerminalNode | TerminalNode[] { + if (i === undefined) { + return this.getTokens(OpenSearchPPLParser.COMMA); + } else { + return this.getToken(OpenSearchPPLParser.COMMA, i); + } + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_tableSourceClause; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterTableSourceClause) { + listener.enterTableSourceClause(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitTableSourceClause) { + listener.exitTableSourceClause(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitTableSourceClause) { + return visitor.visitTableSourceClause(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class RenameClasueContext extends ParserRuleContext { + public _orignalField!: WcFieldExpressionContext; + public _renamedField!: WcFieldExpressionContext; + public AS(): TerminalNode { return this.getToken(OpenSearchPPLParser.AS, 0); } + public wcFieldExpression(): WcFieldExpressionContext[]; + public wcFieldExpression(i: number): WcFieldExpressionContext; + public wcFieldExpression(i?: number): WcFieldExpressionContext | WcFieldExpressionContext[] { + if (i === undefined) { + return this.getRuleContexts(WcFieldExpressionContext); + } else { + return this.getRuleContext(i, WcFieldExpressionContext); + } + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_renameClasue; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterRenameClasue) { + listener.enterRenameClasue(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitRenameClasue) { + listener.exitRenameClasue(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitRenameClasue) { + return visitor.visitRenameClasue(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class ByClauseContext extends ParserRuleContext { + public BY(): TerminalNode { return this.getToken(OpenSearchPPLParser.BY, 0); } + public fieldList(): FieldListContext { + return this.getRuleContext(0, FieldListContext); + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_byClause; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterByClause) { + listener.enterByClause(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitByClause) { + listener.exitByClause(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitByClause) { + return visitor.visitByClause(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class StatsByClauseContext extends ParserRuleContext { + public BY(): TerminalNode { return this.getToken(OpenSearchPPLParser.BY, 0); } + public fieldList(): FieldListContext | undefined { + return this.tryGetRuleContext(0, FieldListContext); + } + public bySpanClause(): BySpanClauseContext | undefined { + return this.tryGetRuleContext(0, BySpanClauseContext); + } + public COMMA(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.COMMA, 0); } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_statsByClause; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterStatsByClause) { + listener.enterStatsByClause(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitStatsByClause) { + listener.exitStatsByClause(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitStatsByClause) { + return visitor.visitStatsByClause(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class BySpanClauseContext extends ParserRuleContext { + public _alias!: QualifiedNameContext; + public spanClause(): SpanClauseContext { + return this.getRuleContext(0, SpanClauseContext); + } + public AS(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.AS, 0); } + public qualifiedName(): QualifiedNameContext | undefined { + return this.tryGetRuleContext(0, QualifiedNameContext); + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_bySpanClause; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterBySpanClause) { + listener.enterBySpanClause(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitBySpanClause) { + listener.exitBySpanClause(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitBySpanClause) { + return visitor.visitBySpanClause(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class SpanClauseContext extends ParserRuleContext { + public _value!: LiteralValueContext; + public _unit!: TimespanUnitContext; + public SPAN(): TerminalNode { return this.getToken(OpenSearchPPLParser.SPAN, 0); } + public LT_PRTHS(): TerminalNode { return this.getToken(OpenSearchPPLParser.LT_PRTHS, 0); } + public fieldExpression(): FieldExpressionContext { + return this.getRuleContext(0, FieldExpressionContext); + } + public COMMA(): TerminalNode { return this.getToken(OpenSearchPPLParser.COMMA, 0); } + public RT_PRTHS(): TerminalNode { return this.getToken(OpenSearchPPLParser.RT_PRTHS, 0); } + public literalValue(): LiteralValueContext { + return this.getRuleContext(0, LiteralValueContext); + } + public timespanUnit(): TimespanUnitContext | undefined { + return this.tryGetRuleContext(0, TimespanUnitContext); + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_spanClause; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterSpanClause) { + listener.enterSpanClause(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitSpanClause) { + listener.exitSpanClause(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitSpanClause) { + return visitor.visitSpanClause(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class SortbyClauseContext extends ParserRuleContext { + public sortField(): SortFieldContext[]; + public sortField(i: number): SortFieldContext; + public sortField(i?: number): SortFieldContext | SortFieldContext[] { + if (i === undefined) { + return this.getRuleContexts(SortFieldContext); + } else { + return this.getRuleContext(i, SortFieldContext); + } + } + public COMMA(): TerminalNode[]; + public COMMA(i: number): TerminalNode; + public COMMA(i?: number): TerminalNode | TerminalNode[] { + if (i === undefined) { + return this.getTokens(OpenSearchPPLParser.COMMA); + } else { + return this.getToken(OpenSearchPPLParser.COMMA, i); + } + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_sortbyClause; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterSortbyClause) { + listener.enterSortbyClause(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitSortbyClause) { + listener.exitSortbyClause(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitSortbyClause) { + return visitor.visitSortbyClause(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class EvalClauseContext extends ParserRuleContext { + public fieldExpression(): FieldExpressionContext { + return this.getRuleContext(0, FieldExpressionContext); + } + public EQUAL(): TerminalNode { return this.getToken(OpenSearchPPLParser.EQUAL, 0); } + public expression(): ExpressionContext { + return this.getRuleContext(0, ExpressionContext); + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_evalClause; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterEvalClause) { + listener.enterEvalClause(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitEvalClause) { + listener.exitEvalClause(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitEvalClause) { + return visitor.visitEvalClause(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class StatsAggTermContext extends ParserRuleContext { + public _alias!: WcFieldExpressionContext; + public statsFunction(): StatsFunctionContext { + return this.getRuleContext(0, StatsFunctionContext); + } + public AS(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.AS, 0); } + public wcFieldExpression(): WcFieldExpressionContext | undefined { + return this.tryGetRuleContext(0, WcFieldExpressionContext); + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_statsAggTerm; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterStatsAggTerm) { + listener.enterStatsAggTerm(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitStatsAggTerm) { + listener.exitStatsAggTerm(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitStatsAggTerm) { + return visitor.visitStatsAggTerm(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class StatsFunctionContext extends ParserRuleContext { + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_statsFunction; } + public copyFrom(ctx: StatsFunctionContext): void { + super.copyFrom(ctx); + } +} +export class StatsFunctionCallContext extends StatsFunctionContext { + public statsFunctionName(): StatsFunctionNameContext { + return this.getRuleContext(0, StatsFunctionNameContext); + } + public LT_PRTHS(): TerminalNode { return this.getToken(OpenSearchPPLParser.LT_PRTHS, 0); } + public valueExpression(): ValueExpressionContext { + return this.getRuleContext(0, ValueExpressionContext); + } + public RT_PRTHS(): TerminalNode { return this.getToken(OpenSearchPPLParser.RT_PRTHS, 0); } + constructor(ctx: StatsFunctionContext) { + super(ctx.parent, ctx.invokingState); + this.copyFrom(ctx); + } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterStatsFunctionCall) { + listener.enterStatsFunctionCall(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitStatsFunctionCall) { + listener.exitStatsFunctionCall(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitStatsFunctionCall) { + return visitor.visitStatsFunctionCall(this); + } else { + return visitor.visitChildren(this); + } + } +} +export class CountAllFunctionCallContext extends StatsFunctionContext { + public COUNT(): TerminalNode { return this.getToken(OpenSearchPPLParser.COUNT, 0); } + public LT_PRTHS(): TerminalNode { return this.getToken(OpenSearchPPLParser.LT_PRTHS, 0); } + public RT_PRTHS(): TerminalNode { return this.getToken(OpenSearchPPLParser.RT_PRTHS, 0); } + constructor(ctx: StatsFunctionContext) { + super(ctx.parent, ctx.invokingState); + this.copyFrom(ctx); + } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterCountAllFunctionCall) { + listener.enterCountAllFunctionCall(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitCountAllFunctionCall) { + listener.exitCountAllFunctionCall(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitCountAllFunctionCall) { + return visitor.visitCountAllFunctionCall(this); + } else { + return visitor.visitChildren(this); + } + } +} +export class DistinctCountFunctionCallContext extends StatsFunctionContext { + public LT_PRTHS(): TerminalNode { return this.getToken(OpenSearchPPLParser.LT_PRTHS, 0); } + public valueExpression(): ValueExpressionContext { + return this.getRuleContext(0, ValueExpressionContext); + } + public RT_PRTHS(): TerminalNode { return this.getToken(OpenSearchPPLParser.RT_PRTHS, 0); } + public DISTINCT_COUNT(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.DISTINCT_COUNT, 0); } + public DC(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.DC, 0); } + constructor(ctx: StatsFunctionContext) { + super(ctx.parent, ctx.invokingState); + this.copyFrom(ctx); + } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterDistinctCountFunctionCall) { + listener.enterDistinctCountFunctionCall(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitDistinctCountFunctionCall) { + listener.exitDistinctCountFunctionCall(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitDistinctCountFunctionCall) { + return visitor.visitDistinctCountFunctionCall(this); + } else { + return visitor.visitChildren(this); + } + } +} +export class PercentileAggFunctionCallContext extends StatsFunctionContext { + public percentileAggFunction(): PercentileAggFunctionContext { + return this.getRuleContext(0, PercentileAggFunctionContext); + } + constructor(ctx: StatsFunctionContext) { + super(ctx.parent, ctx.invokingState); + this.copyFrom(ctx); + } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterPercentileAggFunctionCall) { + listener.enterPercentileAggFunctionCall(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitPercentileAggFunctionCall) { + listener.exitPercentileAggFunctionCall(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitPercentileAggFunctionCall) { + return visitor.visitPercentileAggFunctionCall(this); + } else { + return visitor.visitChildren(this); + } + } +} +export class TakeAggFunctionCallContext extends StatsFunctionContext { + public takeAggFunction(): TakeAggFunctionContext { + return this.getRuleContext(0, TakeAggFunctionContext); + } + constructor(ctx: StatsFunctionContext) { + super(ctx.parent, ctx.invokingState); + this.copyFrom(ctx); + } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterTakeAggFunctionCall) { + listener.enterTakeAggFunctionCall(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitTakeAggFunctionCall) { + listener.exitTakeAggFunctionCall(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitTakeAggFunctionCall) { + return visitor.visitTakeAggFunctionCall(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class StatsFunctionNameContext extends ParserRuleContext { + public AVG(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.AVG, 0); } + public COUNT(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.COUNT, 0); } + public SUM(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.SUM, 0); } + public MIN(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.MIN, 0); } + public MAX(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.MAX, 0); } + public VAR_SAMP(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.VAR_SAMP, 0); } + public VAR_POP(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.VAR_POP, 0); } + public STDDEV_SAMP(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.STDDEV_SAMP, 0); } + public STDDEV_POP(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.STDDEV_POP, 0); } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_statsFunctionName; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterStatsFunctionName) { + listener.enterStatsFunctionName(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitStatsFunctionName) { + listener.exitStatsFunctionName(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitStatsFunctionName) { + return visitor.visitStatsFunctionName(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class TakeAggFunctionContext extends ParserRuleContext { + public _size!: IntegerLiteralContext; + public TAKE(): TerminalNode { return this.getToken(OpenSearchPPLParser.TAKE, 0); } + public LT_PRTHS(): TerminalNode { return this.getToken(OpenSearchPPLParser.LT_PRTHS, 0); } + public fieldExpression(): FieldExpressionContext { + return this.getRuleContext(0, FieldExpressionContext); + } + public RT_PRTHS(): TerminalNode { return this.getToken(OpenSearchPPLParser.RT_PRTHS, 0); } + public COMMA(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.COMMA, 0); } + public integerLiteral(): IntegerLiteralContext | undefined { + return this.tryGetRuleContext(0, IntegerLiteralContext); + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_takeAggFunction; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterTakeAggFunction) { + listener.enterTakeAggFunction(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitTakeAggFunction) { + listener.exitTakeAggFunction(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitTakeAggFunction) { + return visitor.visitTakeAggFunction(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class PercentileAggFunctionContext extends ParserRuleContext { + public _value!: IntegerLiteralContext; + public _aggField!: FieldExpressionContext; + public PERCENTILE(): TerminalNode { return this.getToken(OpenSearchPPLParser.PERCENTILE, 0); } + public LESS(): TerminalNode { return this.getToken(OpenSearchPPLParser.LESS, 0); } + public GREATER(): TerminalNode { return this.getToken(OpenSearchPPLParser.GREATER, 0); } + public LT_PRTHS(): TerminalNode { return this.getToken(OpenSearchPPLParser.LT_PRTHS, 0); } + public RT_PRTHS(): TerminalNode { return this.getToken(OpenSearchPPLParser.RT_PRTHS, 0); } + public integerLiteral(): IntegerLiteralContext { + return this.getRuleContext(0, IntegerLiteralContext); + } + public fieldExpression(): FieldExpressionContext { + return this.getRuleContext(0, FieldExpressionContext); + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_percentileAggFunction; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterPercentileAggFunction) { + listener.enterPercentileAggFunction(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitPercentileAggFunction) { + listener.exitPercentileAggFunction(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitPercentileAggFunction) { + return visitor.visitPercentileAggFunction(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class ExpressionContext extends ParserRuleContext { + public logicalExpression(): LogicalExpressionContext | undefined { + return this.tryGetRuleContext(0, LogicalExpressionContext); + } + public comparisonExpression(): ComparisonExpressionContext | undefined { + return this.tryGetRuleContext(0, ComparisonExpressionContext); + } + public valueExpression(): ValueExpressionContext | undefined { + return this.tryGetRuleContext(0, ValueExpressionContext); + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_expression; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterExpression) { + listener.enterExpression(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitExpression) { + listener.exitExpression(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitExpression) { + return visitor.visitExpression(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class LogicalExpressionContext extends ParserRuleContext { + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_logicalExpression; } + public copyFrom(ctx: LogicalExpressionContext): void { + super.copyFrom(ctx); + } +} +export class ComparsionContext extends LogicalExpressionContext { + public comparisonExpression(): ComparisonExpressionContext { + return this.getRuleContext(0, ComparisonExpressionContext); + } + constructor(ctx: LogicalExpressionContext) { + super(ctx.parent, ctx.invokingState); + this.copyFrom(ctx); + } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterComparsion) { + listener.enterComparsion(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitComparsion) { + listener.exitComparsion(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitComparsion) { + return visitor.visitComparsion(this); + } else { + return visitor.visitChildren(this); + } + } +} +export class LogicalNotContext extends LogicalExpressionContext { + public NOT(): TerminalNode { return this.getToken(OpenSearchPPLParser.NOT, 0); } + public logicalExpression(): LogicalExpressionContext { + return this.getRuleContext(0, LogicalExpressionContext); + } + constructor(ctx: LogicalExpressionContext) { + super(ctx.parent, ctx.invokingState); + this.copyFrom(ctx); + } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterLogicalNot) { + listener.enterLogicalNot(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitLogicalNot) { + listener.exitLogicalNot(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitLogicalNot) { + return visitor.visitLogicalNot(this); + } else { + return visitor.visitChildren(this); + } + } +} +export class LogicalOrContext extends LogicalExpressionContext { + public _left!: LogicalExpressionContext; + public _right!: LogicalExpressionContext; + public OR(): TerminalNode { return this.getToken(OpenSearchPPLParser.OR, 0); } + public logicalExpression(): LogicalExpressionContext[]; + public logicalExpression(i: number): LogicalExpressionContext; + public logicalExpression(i?: number): LogicalExpressionContext | LogicalExpressionContext[] { + if (i === undefined) { + return this.getRuleContexts(LogicalExpressionContext); + } else { + return this.getRuleContext(i, LogicalExpressionContext); + } + } + constructor(ctx: LogicalExpressionContext) { + super(ctx.parent, ctx.invokingState); + this.copyFrom(ctx); + } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterLogicalOr) { + listener.enterLogicalOr(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitLogicalOr) { + listener.exitLogicalOr(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitLogicalOr) { + return visitor.visitLogicalOr(this); + } else { + return visitor.visitChildren(this); + } + } +} +export class LogicalAndContext extends LogicalExpressionContext { + public _left!: LogicalExpressionContext; + public _right!: LogicalExpressionContext; + public logicalExpression(): LogicalExpressionContext[]; + public logicalExpression(i: number): LogicalExpressionContext; + public logicalExpression(i?: number): LogicalExpressionContext | LogicalExpressionContext[] { + if (i === undefined) { + return this.getRuleContexts(LogicalExpressionContext); + } else { + return this.getRuleContext(i, LogicalExpressionContext); + } + } + public AND(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.AND, 0); } + constructor(ctx: LogicalExpressionContext) { + super(ctx.parent, ctx.invokingState); + this.copyFrom(ctx); + } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterLogicalAnd) { + listener.enterLogicalAnd(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitLogicalAnd) { + listener.exitLogicalAnd(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitLogicalAnd) { + return visitor.visitLogicalAnd(this); + } else { + return visitor.visitChildren(this); + } + } +} +export class LogicalXorContext extends LogicalExpressionContext { + public _left!: LogicalExpressionContext; + public _right!: LogicalExpressionContext; + public XOR(): TerminalNode { return this.getToken(OpenSearchPPLParser.XOR, 0); } + public logicalExpression(): LogicalExpressionContext[]; + public logicalExpression(i: number): LogicalExpressionContext; + public logicalExpression(i?: number): LogicalExpressionContext | LogicalExpressionContext[] { + if (i === undefined) { + return this.getRuleContexts(LogicalExpressionContext); + } else { + return this.getRuleContext(i, LogicalExpressionContext); + } + } + constructor(ctx: LogicalExpressionContext) { + super(ctx.parent, ctx.invokingState); + this.copyFrom(ctx); + } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterLogicalXor) { + listener.enterLogicalXor(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitLogicalXor) { + listener.exitLogicalXor(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitLogicalXor) { + return visitor.visitLogicalXor(this); + } else { + return visitor.visitChildren(this); + } + } +} +export class BooleanExprContext extends LogicalExpressionContext { + public booleanExpression(): BooleanExpressionContext { + return this.getRuleContext(0, BooleanExpressionContext); + } + constructor(ctx: LogicalExpressionContext) { + super(ctx.parent, ctx.invokingState); + this.copyFrom(ctx); + } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterBooleanExpr) { + listener.enterBooleanExpr(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitBooleanExpr) { + listener.exitBooleanExpr(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitBooleanExpr) { + return visitor.visitBooleanExpr(this); + } else { + return visitor.visitChildren(this); + } + } +} +export class RelevanceExprContext extends LogicalExpressionContext { + public relevanceExpression(): RelevanceExpressionContext { + return this.getRuleContext(0, RelevanceExpressionContext); + } + constructor(ctx: LogicalExpressionContext) { + super(ctx.parent, ctx.invokingState); + this.copyFrom(ctx); + } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterRelevanceExpr) { + listener.enterRelevanceExpr(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitRelevanceExpr) { + listener.exitRelevanceExpr(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitRelevanceExpr) { + return visitor.visitRelevanceExpr(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class ComparisonExpressionContext extends ParserRuleContext { + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_comparisonExpression; } + public copyFrom(ctx: ComparisonExpressionContext): void { + super.copyFrom(ctx); + } +} +export class CompareExprContext extends ComparisonExpressionContext { + public _left!: ValueExpressionContext; + public _right!: ValueExpressionContext; + public comparisonOperator(): ComparisonOperatorContext { + return this.getRuleContext(0, ComparisonOperatorContext); + } + public valueExpression(): ValueExpressionContext[]; + public valueExpression(i: number): ValueExpressionContext; + public valueExpression(i?: number): ValueExpressionContext | ValueExpressionContext[] { + if (i === undefined) { + return this.getRuleContexts(ValueExpressionContext); + } else { + return this.getRuleContext(i, ValueExpressionContext); + } + } + constructor(ctx: ComparisonExpressionContext) { + super(ctx.parent, ctx.invokingState); + this.copyFrom(ctx); + } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterCompareExpr) { + listener.enterCompareExpr(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitCompareExpr) { + listener.exitCompareExpr(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitCompareExpr) { + return visitor.visitCompareExpr(this); + } else { + return visitor.visitChildren(this); + } + } +} +export class InExprContext extends ComparisonExpressionContext { + public valueExpression(): ValueExpressionContext { + return this.getRuleContext(0, ValueExpressionContext); + } + public IN(): TerminalNode { return this.getToken(OpenSearchPPLParser.IN, 0); } + public valueList(): ValueListContext { + return this.getRuleContext(0, ValueListContext); + } + constructor(ctx: ComparisonExpressionContext) { + super(ctx.parent, ctx.invokingState); + this.copyFrom(ctx); + } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterInExpr) { + listener.enterInExpr(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitInExpr) { + listener.exitInExpr(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitInExpr) { + return visitor.visitInExpr(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class ValueExpressionContext extends ParserRuleContext { + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_valueExpression; } + public copyFrom(ctx: ValueExpressionContext): void { + super.copyFrom(ctx); + } +} +export class BinaryArithmeticContext extends ValueExpressionContext { + public _left!: ValueExpressionContext; + public _right!: ValueExpressionContext; + public binaryOperator(): BinaryOperatorContext { + return this.getRuleContext(0, BinaryOperatorContext); + } + public valueExpression(): ValueExpressionContext[]; + public valueExpression(i: number): ValueExpressionContext; + public valueExpression(i?: number): ValueExpressionContext | ValueExpressionContext[] { + if (i === undefined) { + return this.getRuleContexts(ValueExpressionContext); + } else { + return this.getRuleContext(i, ValueExpressionContext); + } + } + constructor(ctx: ValueExpressionContext) { + super(ctx.parent, ctx.invokingState); + this.copyFrom(ctx); + } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterBinaryArithmetic) { + listener.enterBinaryArithmetic(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitBinaryArithmetic) { + listener.exitBinaryArithmetic(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitBinaryArithmetic) { + return visitor.visitBinaryArithmetic(this); + } else { + return visitor.visitChildren(this); + } + } +} +export class ParentheticBinaryArithmeticContext extends ValueExpressionContext { + public _left!: ValueExpressionContext; + public _right!: ValueExpressionContext; + public LT_PRTHS(): TerminalNode { return this.getToken(OpenSearchPPLParser.LT_PRTHS, 0); } + public binaryOperator(): BinaryOperatorContext { + return this.getRuleContext(0, BinaryOperatorContext); + } + public RT_PRTHS(): TerminalNode { return this.getToken(OpenSearchPPLParser.RT_PRTHS, 0); } + public valueExpression(): ValueExpressionContext[]; + public valueExpression(i: number): ValueExpressionContext; + public valueExpression(i?: number): ValueExpressionContext | ValueExpressionContext[] { + if (i === undefined) { + return this.getRuleContexts(ValueExpressionContext); + } else { + return this.getRuleContext(i, ValueExpressionContext); + } + } + constructor(ctx: ValueExpressionContext) { + super(ctx.parent, ctx.invokingState); + this.copyFrom(ctx); + } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterParentheticBinaryArithmetic) { + listener.enterParentheticBinaryArithmetic(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitParentheticBinaryArithmetic) { + listener.exitParentheticBinaryArithmetic(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitParentheticBinaryArithmetic) { + return visitor.visitParentheticBinaryArithmetic(this); + } else { + return visitor.visitChildren(this); + } + } +} +export class ValueExpressionDefaultContext extends ValueExpressionContext { + public primaryExpression(): PrimaryExpressionContext { + return this.getRuleContext(0, PrimaryExpressionContext); + } + constructor(ctx: ValueExpressionContext) { + super(ctx.parent, ctx.invokingState); + this.copyFrom(ctx); + } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterValueExpressionDefault) { + listener.enterValueExpressionDefault(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitValueExpressionDefault) { + listener.exitValueExpressionDefault(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitValueExpressionDefault) { + return visitor.visitValueExpressionDefault(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class PrimaryExpressionContext extends ParserRuleContext { + public evalFunctionCall(): EvalFunctionCallContext | undefined { + return this.tryGetRuleContext(0, EvalFunctionCallContext); + } + public dataTypeFunctionCall(): DataTypeFunctionCallContext | undefined { + return this.tryGetRuleContext(0, DataTypeFunctionCallContext); + } + public fieldExpression(): FieldExpressionContext | undefined { + return this.tryGetRuleContext(0, FieldExpressionContext); + } + public literalValue(): LiteralValueContext | undefined { + return this.tryGetRuleContext(0, LiteralValueContext); + } + public constantFunction(): ConstantFunctionContext | undefined { + return this.tryGetRuleContext(0, ConstantFunctionContext); + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_primaryExpression; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterPrimaryExpression) { + listener.enterPrimaryExpression(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitPrimaryExpression) { + listener.exitPrimaryExpression(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitPrimaryExpression) { + return visitor.visitPrimaryExpression(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class ConstantFunctionContext extends ParserRuleContext { + public constantFunctionName(): ConstantFunctionNameContext { + return this.getRuleContext(0, ConstantFunctionNameContext); + } + public LT_PRTHS(): TerminalNode { return this.getToken(OpenSearchPPLParser.LT_PRTHS, 0); } + public RT_PRTHS(): TerminalNode { return this.getToken(OpenSearchPPLParser.RT_PRTHS, 0); } + public functionArgs(): FunctionArgsContext | undefined { + return this.tryGetRuleContext(0, FunctionArgsContext); + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_constantFunction; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterConstantFunction) { + listener.enterConstantFunction(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitConstantFunction) { + listener.exitConstantFunction(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitConstantFunction) { + return visitor.visitConstantFunction(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class BooleanExpressionContext extends ParserRuleContext { + public booleanFunctionCall(): BooleanFunctionCallContext { + return this.getRuleContext(0, BooleanFunctionCallContext); + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_booleanExpression; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterBooleanExpression) { + listener.enterBooleanExpression(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitBooleanExpression) { + listener.exitBooleanExpression(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitBooleanExpression) { + return visitor.visitBooleanExpression(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class RelevanceExpressionContext extends ParserRuleContext { + public singleFieldRelevanceFunction(): SingleFieldRelevanceFunctionContext | undefined { + return this.tryGetRuleContext(0, SingleFieldRelevanceFunctionContext); + } + public multiFieldRelevanceFunction(): MultiFieldRelevanceFunctionContext | undefined { + return this.tryGetRuleContext(0, MultiFieldRelevanceFunctionContext); + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_relevanceExpression; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterRelevanceExpression) { + listener.enterRelevanceExpression(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitRelevanceExpression) { + listener.exitRelevanceExpression(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitRelevanceExpression) { + return visitor.visitRelevanceExpression(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class SingleFieldRelevanceFunctionContext extends ParserRuleContext { + public _field!: RelevanceFieldContext; + public _query!: RelevanceQueryContext; + public singleFieldRelevanceFunctionName(): SingleFieldRelevanceFunctionNameContext { + return this.getRuleContext(0, SingleFieldRelevanceFunctionNameContext); + } + public LT_PRTHS(): TerminalNode { return this.getToken(OpenSearchPPLParser.LT_PRTHS, 0); } + public COMMA(): TerminalNode[]; + public COMMA(i: number): TerminalNode; + public COMMA(i?: number): TerminalNode | TerminalNode[] { + if (i === undefined) { + return this.getTokens(OpenSearchPPLParser.COMMA); + } else { + return this.getToken(OpenSearchPPLParser.COMMA, i); + } + } + public RT_PRTHS(): TerminalNode { return this.getToken(OpenSearchPPLParser.RT_PRTHS, 0); } + public relevanceField(): RelevanceFieldContext { + return this.getRuleContext(0, RelevanceFieldContext); + } + public relevanceQuery(): RelevanceQueryContext { + return this.getRuleContext(0, RelevanceQueryContext); + } + public relevanceArg(): RelevanceArgContext[]; + public relevanceArg(i: number): RelevanceArgContext; + public relevanceArg(i?: number): RelevanceArgContext | RelevanceArgContext[] { + if (i === undefined) { + return this.getRuleContexts(RelevanceArgContext); + } else { + return this.getRuleContext(i, RelevanceArgContext); + } + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_singleFieldRelevanceFunction; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterSingleFieldRelevanceFunction) { + listener.enterSingleFieldRelevanceFunction(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitSingleFieldRelevanceFunction) { + listener.exitSingleFieldRelevanceFunction(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitSingleFieldRelevanceFunction) { + return visitor.visitSingleFieldRelevanceFunction(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class MultiFieldRelevanceFunctionContext extends ParserRuleContext { + public _field!: RelevanceFieldAndWeightContext; + public _query!: RelevanceQueryContext; + public multiFieldRelevanceFunctionName(): MultiFieldRelevanceFunctionNameContext { + return this.getRuleContext(0, MultiFieldRelevanceFunctionNameContext); + } + public LT_PRTHS(): TerminalNode { return this.getToken(OpenSearchPPLParser.LT_PRTHS, 0); } + public LT_SQR_PRTHS(): TerminalNode { return this.getToken(OpenSearchPPLParser.LT_SQR_PRTHS, 0); } + public RT_SQR_PRTHS(): TerminalNode { return this.getToken(OpenSearchPPLParser.RT_SQR_PRTHS, 0); } + public COMMA(): TerminalNode[]; + public COMMA(i: number): TerminalNode; + public COMMA(i?: number): TerminalNode | TerminalNode[] { + if (i === undefined) { + return this.getTokens(OpenSearchPPLParser.COMMA); + } else { + return this.getToken(OpenSearchPPLParser.COMMA, i); + } + } + public RT_PRTHS(): TerminalNode { return this.getToken(OpenSearchPPLParser.RT_PRTHS, 0); } + public relevanceFieldAndWeight(): RelevanceFieldAndWeightContext[]; + public relevanceFieldAndWeight(i: number): RelevanceFieldAndWeightContext; + public relevanceFieldAndWeight(i?: number): RelevanceFieldAndWeightContext | RelevanceFieldAndWeightContext[] { + if (i === undefined) { + return this.getRuleContexts(RelevanceFieldAndWeightContext); + } else { + return this.getRuleContext(i, RelevanceFieldAndWeightContext); + } + } + public relevanceQuery(): RelevanceQueryContext { + return this.getRuleContext(0, RelevanceQueryContext); + } + public relevanceArg(): RelevanceArgContext[]; + public relevanceArg(i: number): RelevanceArgContext; + public relevanceArg(i?: number): RelevanceArgContext | RelevanceArgContext[] { + if (i === undefined) { + return this.getRuleContexts(RelevanceArgContext); + } else { + return this.getRuleContext(i, RelevanceArgContext); + } + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_multiFieldRelevanceFunction; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterMultiFieldRelevanceFunction) { + listener.enterMultiFieldRelevanceFunction(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitMultiFieldRelevanceFunction) { + listener.exitMultiFieldRelevanceFunction(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitMultiFieldRelevanceFunction) { + return visitor.visitMultiFieldRelevanceFunction(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class TableSourceContext extends ParserRuleContext { + public qualifiedName(): QualifiedNameContext | undefined { + return this.tryGetRuleContext(0, QualifiedNameContext); + } + public ID_DATE_SUFFIX(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.ID_DATE_SUFFIX, 0); } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_tableSource; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterTableSource) { + listener.enterTableSource(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitTableSource) { + listener.exitTableSource(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitTableSource) { + return visitor.visitTableSource(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class TableFunctionContext extends ParserRuleContext { + public qualifiedName(): QualifiedNameContext { + return this.getRuleContext(0, QualifiedNameContext); + } + public LT_PRTHS(): TerminalNode { return this.getToken(OpenSearchPPLParser.LT_PRTHS, 0); } + public functionArgs(): FunctionArgsContext { + return this.getRuleContext(0, FunctionArgsContext); + } + public RT_PRTHS(): TerminalNode { return this.getToken(OpenSearchPPLParser.RT_PRTHS, 0); } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_tableFunction; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterTableFunction) { + listener.enterTableFunction(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitTableFunction) { + listener.exitTableFunction(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitTableFunction) { + return visitor.visitTableFunction(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class FieldListContext extends ParserRuleContext { + public fieldExpression(): FieldExpressionContext[]; + public fieldExpression(i: number): FieldExpressionContext; + public fieldExpression(i?: number): FieldExpressionContext | FieldExpressionContext[] { + if (i === undefined) { + return this.getRuleContexts(FieldExpressionContext); + } else { + return this.getRuleContext(i, FieldExpressionContext); + } + } + public COMMA(): TerminalNode[]; + public COMMA(i: number): TerminalNode; + public COMMA(i?: number): TerminalNode | TerminalNode[] { + if (i === undefined) { + return this.getTokens(OpenSearchPPLParser.COMMA); + } else { + return this.getToken(OpenSearchPPLParser.COMMA, i); + } + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_fieldList; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterFieldList) { + listener.enterFieldList(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitFieldList) { + listener.exitFieldList(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitFieldList) { + return visitor.visitFieldList(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class WcFieldListContext extends ParserRuleContext { + public wcFieldExpression(): WcFieldExpressionContext[]; + public wcFieldExpression(i: number): WcFieldExpressionContext; + public wcFieldExpression(i?: number): WcFieldExpressionContext | WcFieldExpressionContext[] { + if (i === undefined) { + return this.getRuleContexts(WcFieldExpressionContext); + } else { + return this.getRuleContext(i, WcFieldExpressionContext); + } + } + public COMMA(): TerminalNode[]; + public COMMA(i: number): TerminalNode; + public COMMA(i?: number): TerminalNode | TerminalNode[] { + if (i === undefined) { + return this.getTokens(OpenSearchPPLParser.COMMA); + } else { + return this.getToken(OpenSearchPPLParser.COMMA, i); + } + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_wcFieldList; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterWcFieldList) { + listener.enterWcFieldList(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitWcFieldList) { + listener.exitWcFieldList(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitWcFieldList) { + return visitor.visitWcFieldList(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class SortFieldContext extends ParserRuleContext { + public sortFieldExpression(): SortFieldExpressionContext { + return this.getRuleContext(0, SortFieldExpressionContext); + } + public PLUS(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.PLUS, 0); } + public MINUS(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.MINUS, 0); } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_sortField; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterSortField) { + listener.enterSortField(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitSortField) { + listener.exitSortField(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitSortField) { + return visitor.visitSortField(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class SortFieldExpressionContext extends ParserRuleContext { + public fieldExpression(): FieldExpressionContext { + return this.getRuleContext(0, FieldExpressionContext); + } + public AUTO(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.AUTO, 0); } + public LT_PRTHS(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.LT_PRTHS, 0); } + public RT_PRTHS(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.RT_PRTHS, 0); } + public STR(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.STR, 0); } + public IP(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.IP, 0); } + public NUM(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.NUM, 0); } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_sortFieldExpression; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterSortFieldExpression) { + listener.enterSortFieldExpression(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitSortFieldExpression) { + listener.exitSortFieldExpression(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitSortFieldExpression) { + return visitor.visitSortFieldExpression(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class FieldExpressionContext extends ParserRuleContext { + public qualifiedName(): QualifiedNameContext { + return this.getRuleContext(0, QualifiedNameContext); + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_fieldExpression; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterFieldExpression) { + listener.enterFieldExpression(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitFieldExpression) { + listener.exitFieldExpression(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitFieldExpression) { + return visitor.visitFieldExpression(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class WcFieldExpressionContext extends ParserRuleContext { + public wcQualifiedName(): WcQualifiedNameContext { + return this.getRuleContext(0, WcQualifiedNameContext); + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_wcFieldExpression; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterWcFieldExpression) { + listener.enterWcFieldExpression(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitWcFieldExpression) { + listener.exitWcFieldExpression(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitWcFieldExpression) { + return visitor.visitWcFieldExpression(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class EvalFunctionCallContext extends ParserRuleContext { + public evalFunctionName(): EvalFunctionNameContext { + return this.getRuleContext(0, EvalFunctionNameContext); + } + public LT_PRTHS(): TerminalNode { return this.getToken(OpenSearchPPLParser.LT_PRTHS, 0); } + public functionArgs(): FunctionArgsContext { + return this.getRuleContext(0, FunctionArgsContext); + } + public RT_PRTHS(): TerminalNode { return this.getToken(OpenSearchPPLParser.RT_PRTHS, 0); } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_evalFunctionCall; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterEvalFunctionCall) { + listener.enterEvalFunctionCall(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitEvalFunctionCall) { + listener.exitEvalFunctionCall(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitEvalFunctionCall) { + return visitor.visitEvalFunctionCall(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class DataTypeFunctionCallContext extends ParserRuleContext { + public CAST(): TerminalNode { return this.getToken(OpenSearchPPLParser.CAST, 0); } + public LT_PRTHS(): TerminalNode { return this.getToken(OpenSearchPPLParser.LT_PRTHS, 0); } + public expression(): ExpressionContext { + return this.getRuleContext(0, ExpressionContext); + } + public AS(): TerminalNode { return this.getToken(OpenSearchPPLParser.AS, 0); } + public convertedDataType(): ConvertedDataTypeContext { + return this.getRuleContext(0, ConvertedDataTypeContext); + } + public RT_PRTHS(): TerminalNode { return this.getToken(OpenSearchPPLParser.RT_PRTHS, 0); } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_dataTypeFunctionCall; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterDataTypeFunctionCall) { + listener.enterDataTypeFunctionCall(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitDataTypeFunctionCall) { + listener.exitDataTypeFunctionCall(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitDataTypeFunctionCall) { + return visitor.visitDataTypeFunctionCall(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class BooleanFunctionCallContext extends ParserRuleContext { + public conditionFunctionBase(): ConditionFunctionBaseContext { + return this.getRuleContext(0, ConditionFunctionBaseContext); + } + public LT_PRTHS(): TerminalNode { return this.getToken(OpenSearchPPLParser.LT_PRTHS, 0); } + public functionArgs(): FunctionArgsContext { + return this.getRuleContext(0, FunctionArgsContext); + } + public RT_PRTHS(): TerminalNode { return this.getToken(OpenSearchPPLParser.RT_PRTHS, 0); } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_booleanFunctionCall; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterBooleanFunctionCall) { + listener.enterBooleanFunctionCall(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitBooleanFunctionCall) { + listener.exitBooleanFunctionCall(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitBooleanFunctionCall) { + return visitor.visitBooleanFunctionCall(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class ConvertedDataTypeContext extends ParserRuleContext { + public _typeName!: Token; + public DATE(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.DATE, 0); } + public TIME(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.TIME, 0); } + public TIMESTAMP(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.TIMESTAMP, 0); } + public INT(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.INT, 0); } + public INTEGER(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.INTEGER, 0); } + public DOUBLE(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.DOUBLE, 0); } + public LONG(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.LONG, 0); } + public FLOAT(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.FLOAT, 0); } + public STRING(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.STRING, 0); } + public BOOLEAN(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.BOOLEAN, 0); } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_convertedDataType; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterConvertedDataType) { + listener.enterConvertedDataType(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitConvertedDataType) { + listener.exitConvertedDataType(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitConvertedDataType) { + return visitor.visitConvertedDataType(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class EvalFunctionNameContext extends ParserRuleContext { + public mathematicalFunctionBase(): MathematicalFunctionBaseContext | undefined { + return this.tryGetRuleContext(0, MathematicalFunctionBaseContext); + } + public dateAndTimeFunctionBase(): DateAndTimeFunctionBaseContext | undefined { + return this.tryGetRuleContext(0, DateAndTimeFunctionBaseContext); + } + public textFunctionBase(): TextFunctionBaseContext | undefined { + return this.tryGetRuleContext(0, TextFunctionBaseContext); + } + public conditionFunctionBase(): ConditionFunctionBaseContext | undefined { + return this.tryGetRuleContext(0, ConditionFunctionBaseContext); + } + public systemFunctionBase(): SystemFunctionBaseContext | undefined { + return this.tryGetRuleContext(0, SystemFunctionBaseContext); + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_evalFunctionName; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterEvalFunctionName) { + listener.enterEvalFunctionName(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitEvalFunctionName) { + listener.exitEvalFunctionName(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitEvalFunctionName) { + return visitor.visitEvalFunctionName(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class FunctionArgsContext extends ParserRuleContext { + public functionArg(): FunctionArgContext[]; + public functionArg(i: number): FunctionArgContext; + public functionArg(i?: number): FunctionArgContext | FunctionArgContext[] { + if (i === undefined) { + return this.getRuleContexts(FunctionArgContext); + } else { + return this.getRuleContext(i, FunctionArgContext); + } + } + public COMMA(): TerminalNode[]; + public COMMA(i: number): TerminalNode; + public COMMA(i?: number): TerminalNode | TerminalNode[] { + if (i === undefined) { + return this.getTokens(OpenSearchPPLParser.COMMA); + } else { + return this.getToken(OpenSearchPPLParser.COMMA, i); + } + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_functionArgs; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterFunctionArgs) { + listener.enterFunctionArgs(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitFunctionArgs) { + listener.exitFunctionArgs(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitFunctionArgs) { + return visitor.visitFunctionArgs(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class FunctionArgContext extends ParserRuleContext { + public valueExpression(): ValueExpressionContext { + return this.getRuleContext(0, ValueExpressionContext); + } + public ident(): IdentContext | undefined { + return this.tryGetRuleContext(0, IdentContext); + } + public EQUAL(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.EQUAL, 0); } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_functionArg; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterFunctionArg) { + listener.enterFunctionArg(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitFunctionArg) { + listener.exitFunctionArg(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitFunctionArg) { + return visitor.visitFunctionArg(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class RelevanceArgContext extends ParserRuleContext { + public relevanceArgName(): RelevanceArgNameContext { + return this.getRuleContext(0, RelevanceArgNameContext); + } + public EQUAL(): TerminalNode { return this.getToken(OpenSearchPPLParser.EQUAL, 0); } + public relevanceArgValue(): RelevanceArgValueContext { + return this.getRuleContext(0, RelevanceArgValueContext); + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_relevanceArg; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterRelevanceArg) { + listener.enterRelevanceArg(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitRelevanceArg) { + listener.exitRelevanceArg(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitRelevanceArg) { + return visitor.visitRelevanceArg(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class RelevanceArgNameContext extends ParserRuleContext { + public ALLOW_LEADING_WILDCARD(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.ALLOW_LEADING_WILDCARD, 0); } + public ANALYZER(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.ANALYZER, 0); } + public ANALYZE_WILDCARD(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.ANALYZE_WILDCARD, 0); } + public AUTO_GENERATE_SYNONYMS_PHRASE_QUERY(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.AUTO_GENERATE_SYNONYMS_PHRASE_QUERY, 0); } + public BOOST(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.BOOST, 0); } + public CUTOFF_FREQUENCY(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.CUTOFF_FREQUENCY, 0); } + public DEFAULT_FIELD(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.DEFAULT_FIELD, 0); } + public DEFAULT_OPERATOR(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.DEFAULT_OPERATOR, 0); } + public ENABLE_POSITION_INCREMENTS(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.ENABLE_POSITION_INCREMENTS, 0); } + public ESCAPE(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.ESCAPE, 0); } + public FIELDS(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.FIELDS, 0); } + public FLAGS(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.FLAGS, 0); } + public FUZZINESS(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.FUZZINESS, 0); } + public FUZZY_MAX_EXPANSIONS(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.FUZZY_MAX_EXPANSIONS, 0); } + public FUZZY_PREFIX_LENGTH(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.FUZZY_PREFIX_LENGTH, 0); } + public FUZZY_REWRITE(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.FUZZY_REWRITE, 0); } + public FUZZY_TRANSPOSITIONS(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.FUZZY_TRANSPOSITIONS, 0); } + public LENIENT(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.LENIENT, 0); } + public LOW_FREQ_OPERATOR(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.LOW_FREQ_OPERATOR, 0); } + public MAX_DETERMINIZED_STATES(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.MAX_DETERMINIZED_STATES, 0); } + public MAX_EXPANSIONS(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.MAX_EXPANSIONS, 0); } + public MINIMUM_SHOULD_MATCH(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.MINIMUM_SHOULD_MATCH, 0); } + public OPERATOR(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.OPERATOR, 0); } + public PHRASE_SLOP(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.PHRASE_SLOP, 0); } + public PREFIX_LENGTH(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.PREFIX_LENGTH, 0); } + public QUOTE_ANALYZER(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.QUOTE_ANALYZER, 0); } + public QUOTE_FIELD_SUFFIX(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.QUOTE_FIELD_SUFFIX, 0); } + public REWRITE(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.REWRITE, 0); } + public SLOP(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.SLOP, 0); } + public TIE_BREAKER(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.TIE_BREAKER, 0); } + public TIME_ZONE(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.TIME_ZONE, 0); } + public TYPE(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.TYPE, 0); } + public ZERO_TERMS_QUERY(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.ZERO_TERMS_QUERY, 0); } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_relevanceArgName; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterRelevanceArgName) { + listener.enterRelevanceArgName(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitRelevanceArgName) { + listener.exitRelevanceArgName(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitRelevanceArgName) { + return visitor.visitRelevanceArgName(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class RelevanceFieldAndWeightContext extends ParserRuleContext { + public _field!: RelevanceFieldContext; + public _weight!: RelevanceFieldWeightContext; + public relevanceField(): RelevanceFieldContext { + return this.getRuleContext(0, RelevanceFieldContext); + } + public relevanceFieldWeight(): RelevanceFieldWeightContext | undefined { + return this.tryGetRuleContext(0, RelevanceFieldWeightContext); + } + public BIT_XOR_OP(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.BIT_XOR_OP, 0); } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_relevanceFieldAndWeight; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterRelevanceFieldAndWeight) { + listener.enterRelevanceFieldAndWeight(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitRelevanceFieldAndWeight) { + listener.exitRelevanceFieldAndWeight(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitRelevanceFieldAndWeight) { + return visitor.visitRelevanceFieldAndWeight(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class RelevanceFieldWeightContext extends ParserRuleContext { + public integerLiteral(): IntegerLiteralContext | undefined { + return this.tryGetRuleContext(0, IntegerLiteralContext); + } + public decimalLiteral(): DecimalLiteralContext | undefined { + return this.tryGetRuleContext(0, DecimalLiteralContext); + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_relevanceFieldWeight; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterRelevanceFieldWeight) { + listener.enterRelevanceFieldWeight(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitRelevanceFieldWeight) { + listener.exitRelevanceFieldWeight(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitRelevanceFieldWeight) { + return visitor.visitRelevanceFieldWeight(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class RelevanceFieldContext extends ParserRuleContext { + public qualifiedName(): QualifiedNameContext | undefined { + return this.tryGetRuleContext(0, QualifiedNameContext); + } + public stringLiteral(): StringLiteralContext | undefined { + return this.tryGetRuleContext(0, StringLiteralContext); + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_relevanceField; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterRelevanceField) { + listener.enterRelevanceField(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitRelevanceField) { + listener.exitRelevanceField(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitRelevanceField) { + return visitor.visitRelevanceField(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class RelevanceQueryContext extends ParserRuleContext { + public relevanceArgValue(): RelevanceArgValueContext { + return this.getRuleContext(0, RelevanceArgValueContext); + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_relevanceQuery; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterRelevanceQuery) { + listener.enterRelevanceQuery(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitRelevanceQuery) { + listener.exitRelevanceQuery(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitRelevanceQuery) { + return visitor.visitRelevanceQuery(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class RelevanceArgValueContext extends ParserRuleContext { + public qualifiedName(): QualifiedNameContext | undefined { + return this.tryGetRuleContext(0, QualifiedNameContext); + } + public literalValue(): LiteralValueContext | undefined { + return this.tryGetRuleContext(0, LiteralValueContext); + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_relevanceArgValue; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterRelevanceArgValue) { + listener.enterRelevanceArgValue(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitRelevanceArgValue) { + listener.exitRelevanceArgValue(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitRelevanceArgValue) { + return visitor.visitRelevanceArgValue(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class MathematicalFunctionBaseContext extends ParserRuleContext { + public ABS(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.ABS, 0); } + public CEIL(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.CEIL, 0); } + public CEILING(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.CEILING, 0); } + public CONV(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.CONV, 0); } + public CRC32(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.CRC32, 0); } + public E(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.E, 0); } + public EXP(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.EXP, 0); } + public FLOOR(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.FLOOR, 0); } + public LN(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.LN, 0); } + public LOG(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.LOG, 0); } + public LOG10(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.LOG10, 0); } + public LOG2(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.LOG2, 0); } + public MOD(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.MOD, 0); } + public PI(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.PI, 0); } + public POW(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.POW, 0); } + public POWER(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.POWER, 0); } + public RAND(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.RAND, 0); } + public ROUND(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.ROUND, 0); } + public SIGN(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.SIGN, 0); } + public SQRT(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.SQRT, 0); } + public TRUNCATE(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.TRUNCATE, 0); } + public trigonometricFunctionName(): TrigonometricFunctionNameContext | undefined { + return this.tryGetRuleContext(0, TrigonometricFunctionNameContext); + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_mathematicalFunctionBase; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterMathematicalFunctionBase) { + listener.enterMathematicalFunctionBase(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitMathematicalFunctionBase) { + listener.exitMathematicalFunctionBase(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitMathematicalFunctionBase) { + return visitor.visitMathematicalFunctionBase(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class TrigonometricFunctionNameContext extends ParserRuleContext { + public ACOS(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.ACOS, 0); } + public ASIN(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.ASIN, 0); } + public ATAN(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.ATAN, 0); } + public ATAN2(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.ATAN2, 0); } + public COS(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.COS, 0); } + public COT(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.COT, 0); } + public DEGREES(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.DEGREES, 0); } + public RADIANS(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.RADIANS, 0); } + public SIN(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.SIN, 0); } + public TAN(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.TAN, 0); } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_trigonometricFunctionName; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterTrigonometricFunctionName) { + listener.enterTrigonometricFunctionName(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitTrigonometricFunctionName) { + listener.exitTrigonometricFunctionName(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitTrigonometricFunctionName) { + return visitor.visitTrigonometricFunctionName(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class DateAndTimeFunctionBaseContext extends ParserRuleContext { + public ADDDATE(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.ADDDATE, 0); } + public CONVERT_TZ(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.CONVERT_TZ, 0); } + public DATE(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.DATE, 0); } + public DATE_ADD(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.DATE_ADD, 0); } + public DATE_FORMAT(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.DATE_FORMAT, 0); } + public DATE_SUB(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.DATE_SUB, 0); } + public DATETIME(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.DATETIME, 0); } + public DAY(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.DAY, 0); } + public DAYNAME(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.DAYNAME, 0); } + public DAYOFMONTH(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.DAYOFMONTH, 0); } + public DAYOFWEEK(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.DAYOFWEEK, 0); } + public DAYOFYEAR(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.DAYOFYEAR, 0); } + public FROM_DAYS(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.FROM_DAYS, 0); } + public FROM_UNIXTIME(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.FROM_UNIXTIME, 0); } + public HOUR(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.HOUR, 0); } + public MAKEDATE(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.MAKEDATE, 0); } + public MAKETIME(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.MAKETIME, 0); } + public MICROSECOND(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.MICROSECOND, 0); } + public MINUTE(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.MINUTE, 0); } + public MONTH(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.MONTH, 0); } + public MONTHNAME(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.MONTHNAME, 0); } + public PERIOD_ADD(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.PERIOD_ADD, 0); } + public PERIOD_DIFF(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.PERIOD_DIFF, 0); } + public QUARTER(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.QUARTER, 0); } + public SECOND(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.SECOND, 0); } + public SUBDATE(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.SUBDATE, 0); } + public SYSDATE(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.SYSDATE, 0); } + public TIME(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.TIME, 0); } + public TIME_TO_SEC(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.TIME_TO_SEC, 0); } + public TIMESTAMP(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.TIMESTAMP, 0); } + public TO_DAYS(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.TO_DAYS, 0); } + public UNIX_TIMESTAMP(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.UNIX_TIMESTAMP, 0); } + public WEEK(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.WEEK, 0); } + public YEAR(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.YEAR, 0); } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_dateAndTimeFunctionBase; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterDateAndTimeFunctionBase) { + listener.enterDateAndTimeFunctionBase(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitDateAndTimeFunctionBase) { + listener.exitDateAndTimeFunctionBase(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitDateAndTimeFunctionBase) { + return visitor.visitDateAndTimeFunctionBase(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class ConstantFunctionNameContext extends ParserRuleContext { + public CURRENT_DATE(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.CURRENT_DATE, 0); } + public CURRENT_TIME(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.CURRENT_TIME, 0); } + public CURRENT_TIMESTAMP(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.CURRENT_TIMESTAMP, 0); } + public LOCALTIME(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.LOCALTIME, 0); } + public LOCALTIMESTAMP(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.LOCALTIMESTAMP, 0); } + public UTC_TIMESTAMP(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.UTC_TIMESTAMP, 0); } + public UTC_DATE(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.UTC_DATE, 0); } + public UTC_TIME(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.UTC_TIME, 0); } + public CURDATE(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.CURDATE, 0); } + public CURTIME(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.CURTIME, 0); } + public NOW(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.NOW, 0); } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_constantFunctionName; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterConstantFunctionName) { + listener.enterConstantFunctionName(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitConstantFunctionName) { + listener.exitConstantFunctionName(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitConstantFunctionName) { + return visitor.visitConstantFunctionName(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class ConditionFunctionBaseContext extends ParserRuleContext { + public LIKE(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.LIKE, 0); } + public IF(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.IF, 0); } + public ISNULL(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.ISNULL, 0); } + public ISNOTNULL(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.ISNOTNULL, 0); } + public IFNULL(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.IFNULL, 0); } + public NULLIF(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.NULLIF, 0); } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_conditionFunctionBase; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterConditionFunctionBase) { + listener.enterConditionFunctionBase(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitConditionFunctionBase) { + listener.exitConditionFunctionBase(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitConditionFunctionBase) { + return visitor.visitConditionFunctionBase(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class SystemFunctionBaseContext extends ParserRuleContext { + public TYPEOF(): TerminalNode { return this.getToken(OpenSearchPPLParser.TYPEOF, 0); } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_systemFunctionBase; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterSystemFunctionBase) { + listener.enterSystemFunctionBase(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitSystemFunctionBase) { + listener.exitSystemFunctionBase(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitSystemFunctionBase) { + return visitor.visitSystemFunctionBase(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class TextFunctionBaseContext extends ParserRuleContext { + public SUBSTR(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.SUBSTR, 0); } + public SUBSTRING(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.SUBSTRING, 0); } + public TRIM(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.TRIM, 0); } + public LTRIM(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.LTRIM, 0); } + public RTRIM(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.RTRIM, 0); } + public LOWER(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.LOWER, 0); } + public UPPER(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.UPPER, 0); } + public CONCAT(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.CONCAT, 0); } + public CONCAT_WS(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.CONCAT_WS, 0); } + public LENGTH(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.LENGTH, 0); } + public STRCMP(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.STRCMP, 0); } + public RIGHT(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.RIGHT, 0); } + public LEFT(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.LEFT, 0); } + public ASCII(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.ASCII, 0); } + public LOCATE(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.LOCATE, 0); } + public REPLACE(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.REPLACE, 0); } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_textFunctionBase; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterTextFunctionBase) { + listener.enterTextFunctionBase(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitTextFunctionBase) { + listener.exitTextFunctionBase(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitTextFunctionBase) { + return visitor.visitTextFunctionBase(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class ComparisonOperatorContext extends ParserRuleContext { + public EQUAL(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.EQUAL, 0); } + public NOT_EQUAL(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.NOT_EQUAL, 0); } + public LESS(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.LESS, 0); } + public NOT_LESS(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.NOT_LESS, 0); } + public GREATER(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.GREATER, 0); } + public NOT_GREATER(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.NOT_GREATER, 0); } + public REGEXP(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.REGEXP, 0); } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_comparisonOperator; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterComparisonOperator) { + listener.enterComparisonOperator(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitComparisonOperator) { + listener.exitComparisonOperator(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitComparisonOperator) { + return visitor.visitComparisonOperator(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class BinaryOperatorContext extends ParserRuleContext { + public PLUS(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.PLUS, 0); } + public MINUS(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.MINUS, 0); } + public STAR(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.STAR, 0); } + public DIVIDE(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.DIVIDE, 0); } + public MODULE(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.MODULE, 0); } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_binaryOperator; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterBinaryOperator) { + listener.enterBinaryOperator(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitBinaryOperator) { + listener.exitBinaryOperator(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitBinaryOperator) { + return visitor.visitBinaryOperator(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class SingleFieldRelevanceFunctionNameContext extends ParserRuleContext { + public MATCH(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.MATCH, 0); } + public MATCH_PHRASE(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.MATCH_PHRASE, 0); } + public MATCH_BOOL_PREFIX(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.MATCH_BOOL_PREFIX, 0); } + public MATCH_PHRASE_PREFIX(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.MATCH_PHRASE_PREFIX, 0); } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_singleFieldRelevanceFunctionName; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterSingleFieldRelevanceFunctionName) { + listener.enterSingleFieldRelevanceFunctionName(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitSingleFieldRelevanceFunctionName) { + listener.exitSingleFieldRelevanceFunctionName(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitSingleFieldRelevanceFunctionName) { + return visitor.visitSingleFieldRelevanceFunctionName(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class MultiFieldRelevanceFunctionNameContext extends ParserRuleContext { + public SIMPLE_QUERY_STRING(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.SIMPLE_QUERY_STRING, 0); } + public MULTI_MATCH(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.MULTI_MATCH, 0); } + public QUERY_STRING(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.QUERY_STRING, 0); } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_multiFieldRelevanceFunctionName; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterMultiFieldRelevanceFunctionName) { + listener.enterMultiFieldRelevanceFunctionName(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitMultiFieldRelevanceFunctionName) { + listener.exitMultiFieldRelevanceFunctionName(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitMultiFieldRelevanceFunctionName) { + return visitor.visitMultiFieldRelevanceFunctionName(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class LiteralValueContext extends ParserRuleContext { + public intervalLiteral(): IntervalLiteralContext | undefined { + return this.tryGetRuleContext(0, IntervalLiteralContext); + } + public stringLiteral(): StringLiteralContext | undefined { + return this.tryGetRuleContext(0, StringLiteralContext); + } + public integerLiteral(): IntegerLiteralContext | undefined { + return this.tryGetRuleContext(0, IntegerLiteralContext); + } + public decimalLiteral(): DecimalLiteralContext | undefined { + return this.tryGetRuleContext(0, DecimalLiteralContext); + } + public booleanLiteral(): BooleanLiteralContext | undefined { + return this.tryGetRuleContext(0, BooleanLiteralContext); + } + public datetimeLiteral(): DatetimeLiteralContext | undefined { + return this.tryGetRuleContext(0, DatetimeLiteralContext); + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_literalValue; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterLiteralValue) { + listener.enterLiteralValue(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitLiteralValue) { + listener.exitLiteralValue(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitLiteralValue) { + return visitor.visitLiteralValue(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class IntervalLiteralContext extends ParserRuleContext { + public INTERVAL(): TerminalNode { return this.getToken(OpenSearchPPLParser.INTERVAL, 0); } + public valueExpression(): ValueExpressionContext { + return this.getRuleContext(0, ValueExpressionContext); + } + public intervalUnit(): IntervalUnitContext { + return this.getRuleContext(0, IntervalUnitContext); + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_intervalLiteral; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterIntervalLiteral) { + listener.enterIntervalLiteral(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitIntervalLiteral) { + listener.exitIntervalLiteral(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitIntervalLiteral) { + return visitor.visitIntervalLiteral(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class StringLiteralContext extends ParserRuleContext { + public DQUOTA_STRING(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.DQUOTA_STRING, 0); } + public SQUOTA_STRING(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.SQUOTA_STRING, 0); } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_stringLiteral; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterStringLiteral) { + listener.enterStringLiteral(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitStringLiteral) { + listener.exitStringLiteral(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitStringLiteral) { + return visitor.visitStringLiteral(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class IntegerLiteralContext extends ParserRuleContext { + public INTEGER_LITERAL(): TerminalNode { return this.getToken(OpenSearchPPLParser.INTEGER_LITERAL, 0); } + public PLUS(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.PLUS, 0); } + public MINUS(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.MINUS, 0); } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_integerLiteral; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterIntegerLiteral) { + listener.enterIntegerLiteral(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitIntegerLiteral) { + listener.exitIntegerLiteral(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitIntegerLiteral) { + return visitor.visitIntegerLiteral(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class DecimalLiteralContext extends ParserRuleContext { + public DECIMAL_LITERAL(): TerminalNode { return this.getToken(OpenSearchPPLParser.DECIMAL_LITERAL, 0); } + public PLUS(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.PLUS, 0); } + public MINUS(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.MINUS, 0); } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_decimalLiteral; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterDecimalLiteral) { + listener.enterDecimalLiteral(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitDecimalLiteral) { + listener.exitDecimalLiteral(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitDecimalLiteral) { + return visitor.visitDecimalLiteral(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class BooleanLiteralContext extends ParserRuleContext { + public TRUE(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.TRUE, 0); } + public FALSE(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.FALSE, 0); } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_booleanLiteral; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterBooleanLiteral) { + listener.enterBooleanLiteral(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitBooleanLiteral) { + listener.exitBooleanLiteral(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitBooleanLiteral) { + return visitor.visitBooleanLiteral(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class DatetimeLiteralContext extends ParserRuleContext { + public dateLiteral(): DateLiteralContext | undefined { + return this.tryGetRuleContext(0, DateLiteralContext); + } + public timeLiteral(): TimeLiteralContext | undefined { + return this.tryGetRuleContext(0, TimeLiteralContext); + } + public timestampLiteral(): TimestampLiteralContext | undefined { + return this.tryGetRuleContext(0, TimestampLiteralContext); + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_datetimeLiteral; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterDatetimeLiteral) { + listener.enterDatetimeLiteral(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitDatetimeLiteral) { + listener.exitDatetimeLiteral(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitDatetimeLiteral) { + return visitor.visitDatetimeLiteral(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class DateLiteralContext extends ParserRuleContext { + public _date!: StringLiteralContext; + public DATE(): TerminalNode { return this.getToken(OpenSearchPPLParser.DATE, 0); } + public stringLiteral(): StringLiteralContext { + return this.getRuleContext(0, StringLiteralContext); + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_dateLiteral; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterDateLiteral) { + listener.enterDateLiteral(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitDateLiteral) { + listener.exitDateLiteral(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitDateLiteral) { + return visitor.visitDateLiteral(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class TimeLiteralContext extends ParserRuleContext { + public _time!: StringLiteralContext; + public TIME(): TerminalNode { return this.getToken(OpenSearchPPLParser.TIME, 0); } + public stringLiteral(): StringLiteralContext { + return this.getRuleContext(0, StringLiteralContext); + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_timeLiteral; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterTimeLiteral) { + listener.enterTimeLiteral(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitTimeLiteral) { + listener.exitTimeLiteral(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitTimeLiteral) { + return visitor.visitTimeLiteral(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class TimestampLiteralContext extends ParserRuleContext { + public _timestamp!: StringLiteralContext; + public TIMESTAMP(): TerminalNode { return this.getToken(OpenSearchPPLParser.TIMESTAMP, 0); } + public stringLiteral(): StringLiteralContext { + return this.getRuleContext(0, StringLiteralContext); + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_timestampLiteral; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterTimestampLiteral) { + listener.enterTimestampLiteral(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitTimestampLiteral) { + listener.exitTimestampLiteral(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitTimestampLiteral) { + return visitor.visitTimestampLiteral(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class IntervalUnitContext extends ParserRuleContext { + public MICROSECOND(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.MICROSECOND, 0); } + public SECOND(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.SECOND, 0); } + public MINUTE(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.MINUTE, 0); } + public HOUR(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.HOUR, 0); } + public DAY(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.DAY, 0); } + public WEEK(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.WEEK, 0); } + public MONTH(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.MONTH, 0); } + public QUARTER(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.QUARTER, 0); } + public YEAR(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.YEAR, 0); } + public SECOND_MICROSECOND(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.SECOND_MICROSECOND, 0); } + public MINUTE_MICROSECOND(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.MINUTE_MICROSECOND, 0); } + public MINUTE_SECOND(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.MINUTE_SECOND, 0); } + public HOUR_MICROSECOND(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.HOUR_MICROSECOND, 0); } + public HOUR_SECOND(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.HOUR_SECOND, 0); } + public HOUR_MINUTE(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.HOUR_MINUTE, 0); } + public DAY_MICROSECOND(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.DAY_MICROSECOND, 0); } + public DAY_SECOND(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.DAY_SECOND, 0); } + public DAY_MINUTE(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.DAY_MINUTE, 0); } + public DAY_HOUR(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.DAY_HOUR, 0); } + public YEAR_MONTH(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.YEAR_MONTH, 0); } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_intervalUnit; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterIntervalUnit) { + listener.enterIntervalUnit(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitIntervalUnit) { + listener.exitIntervalUnit(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitIntervalUnit) { + return visitor.visitIntervalUnit(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class TimespanUnitContext extends ParserRuleContext { + public MS(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.MS, 0); } + public S(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.S, 0); } + public M(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.M, 0); } + public H(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.H, 0); } + public D(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.D, 0); } + public W(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.W, 0); } + public Q(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.Q, 0); } + public Y(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.Y, 0); } + public MILLISECOND(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.MILLISECOND, 0); } + public SECOND(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.SECOND, 0); } + public MINUTE(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.MINUTE, 0); } + public HOUR(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.HOUR, 0); } + public DAY(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.DAY, 0); } + public WEEK(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.WEEK, 0); } + public MONTH(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.MONTH, 0); } + public QUARTER(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.QUARTER, 0); } + public YEAR(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.YEAR, 0); } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_timespanUnit; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterTimespanUnit) { + listener.enterTimespanUnit(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitTimespanUnit) { + listener.exitTimespanUnit(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitTimespanUnit) { + return visitor.visitTimespanUnit(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class ValueListContext extends ParserRuleContext { + public LT_PRTHS(): TerminalNode { return this.getToken(OpenSearchPPLParser.LT_PRTHS, 0); } + public literalValue(): LiteralValueContext[]; + public literalValue(i: number): LiteralValueContext; + public literalValue(i?: number): LiteralValueContext | LiteralValueContext[] { + if (i === undefined) { + return this.getRuleContexts(LiteralValueContext); + } else { + return this.getRuleContext(i, LiteralValueContext); + } + } + public RT_PRTHS(): TerminalNode { return this.getToken(OpenSearchPPLParser.RT_PRTHS, 0); } + public COMMA(): TerminalNode[]; + public COMMA(i: number): TerminalNode; + public COMMA(i?: number): TerminalNode | TerminalNode[] { + if (i === undefined) { + return this.getTokens(OpenSearchPPLParser.COMMA); + } else { + return this.getToken(OpenSearchPPLParser.COMMA, i); + } + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_valueList; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterValueList) { + listener.enterValueList(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitValueList) { + listener.exitValueList(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitValueList) { + return visitor.visitValueList(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class QualifiedNameContext extends ParserRuleContext { + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_qualifiedName; } + public copyFrom(ctx: QualifiedNameContext): void { + super.copyFrom(ctx); + } +} +export class IdentsAsQualifiedNameContext extends QualifiedNameContext { + public ident(): IdentContext[]; + public ident(i: number): IdentContext; + public ident(i?: number): IdentContext | IdentContext[] { + if (i === undefined) { + return this.getRuleContexts(IdentContext); + } else { + return this.getRuleContext(i, IdentContext); + } + } + public DOT(): TerminalNode[]; + public DOT(i: number): TerminalNode; + public DOT(i?: number): TerminalNode | TerminalNode[] { + if (i === undefined) { + return this.getTokens(OpenSearchPPLParser.DOT); + } else { + return this.getToken(OpenSearchPPLParser.DOT, i); + } + } + constructor(ctx: QualifiedNameContext) { + super(ctx.parent, ctx.invokingState); + this.copyFrom(ctx); + } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterIdentsAsQualifiedName) { + listener.enterIdentsAsQualifiedName(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitIdentsAsQualifiedName) { + listener.exitIdentsAsQualifiedName(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitIdentsAsQualifiedName) { + return visitor.visitIdentsAsQualifiedName(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class WcQualifiedNameContext extends ParserRuleContext { + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_wcQualifiedName; } + public copyFrom(ctx: WcQualifiedNameContext): void { + super.copyFrom(ctx); + } +} +export class IdentsAsWildcardQualifiedNameContext extends WcQualifiedNameContext { + public wildcard(): WildcardContext[]; + public wildcard(i: number): WildcardContext; + public wildcard(i?: number): WildcardContext | WildcardContext[] { + if (i === undefined) { + return this.getRuleContexts(WildcardContext); + } else { + return this.getRuleContext(i, WildcardContext); + } + } + public DOT(): TerminalNode[]; + public DOT(i: number): TerminalNode; + public DOT(i?: number): TerminalNode | TerminalNode[] { + if (i === undefined) { + return this.getTokens(OpenSearchPPLParser.DOT); + } else { + return this.getToken(OpenSearchPPLParser.DOT, i); + } + } + constructor(ctx: WcQualifiedNameContext) { + super(ctx.parent, ctx.invokingState); + this.copyFrom(ctx); + } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterIdentsAsWildcardQualifiedName) { + listener.enterIdentsAsWildcardQualifiedName(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitIdentsAsWildcardQualifiedName) { + listener.exitIdentsAsWildcardQualifiedName(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitIdentsAsWildcardQualifiedName) { + return visitor.visitIdentsAsWildcardQualifiedName(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class IdentContext extends ParserRuleContext { + public ID(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.ID, 0); } + public DOT(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.DOT, 0); } + public BACKTICK(): TerminalNode[]; + public BACKTICK(i: number): TerminalNode; + public BACKTICK(i?: number): TerminalNode | TerminalNode[] { + if (i === undefined) { + return this.getTokens(OpenSearchPPLParser.BACKTICK); + } else { + return this.getToken(OpenSearchPPLParser.BACKTICK, i); + } + } + public ident(): IdentContext | undefined { + return this.tryGetRuleContext(0, IdentContext); + } + public BQUOTA_STRING(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.BQUOTA_STRING, 0); } + public keywordsCanBeId(): KeywordsCanBeIdContext | undefined { + return this.tryGetRuleContext(0, KeywordsCanBeIdContext); + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_ident; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterIdent) { + listener.enterIdent(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitIdent) { + listener.exitIdent(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitIdent) { + return visitor.visitIdent(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class WildcardContext extends ParserRuleContext { + public ident(): IdentContext[]; + public ident(i: number): IdentContext; + public ident(i?: number): IdentContext | IdentContext[] { + if (i === undefined) { + return this.getRuleContexts(IdentContext); + } else { + return this.getRuleContext(i, IdentContext); + } + } + public MODULE(): TerminalNode[]; + public MODULE(i: number): TerminalNode; + public MODULE(i?: number): TerminalNode | TerminalNode[] { + if (i === undefined) { + return this.getTokens(OpenSearchPPLParser.MODULE); + } else { + return this.getToken(OpenSearchPPLParser.MODULE, i); + } + } + public SINGLE_QUOTE(): TerminalNode[]; + public SINGLE_QUOTE(i: number): TerminalNode; + public SINGLE_QUOTE(i?: number): TerminalNode | TerminalNode[] { + if (i === undefined) { + return this.getTokens(OpenSearchPPLParser.SINGLE_QUOTE); + } else { + return this.getToken(OpenSearchPPLParser.SINGLE_QUOTE, i); + } + } + public wildcard(): WildcardContext | undefined { + return this.tryGetRuleContext(0, WildcardContext); + } + public DOUBLE_QUOTE(): TerminalNode[]; + public DOUBLE_QUOTE(i: number): TerminalNode; + public DOUBLE_QUOTE(i?: number): TerminalNode | TerminalNode[] { + if (i === undefined) { + return this.getTokens(OpenSearchPPLParser.DOUBLE_QUOTE); + } else { + return this.getToken(OpenSearchPPLParser.DOUBLE_QUOTE, i); + } + } + public BACKTICK(): TerminalNode[]; + public BACKTICK(i: number): TerminalNode; + public BACKTICK(i?: number): TerminalNode | TerminalNode[] { + if (i === undefined) { + return this.getTokens(OpenSearchPPLParser.BACKTICK); + } else { + return this.getToken(OpenSearchPPLParser.BACKTICK, i); + } + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_wildcard; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterWildcard) { + listener.enterWildcard(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitWildcard) { + listener.exitWildcard(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitWildcard) { + return visitor.visitWildcard(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class KeywordsCanBeIdContext extends ParserRuleContext { + public D(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.D, 0); } + public statsFunctionName(): StatsFunctionNameContext | undefined { + return this.tryGetRuleContext(0, StatsFunctionNameContext); + } + public TIMESTAMP(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.TIMESTAMP, 0); } + public DATE(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.DATE, 0); } + public TIME(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.TIME, 0); } + public FIRST(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.FIRST, 0); } + public LAST(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.LAST, 0); } + public timespanUnit(): TimespanUnitContext | undefined { + return this.tryGetRuleContext(0, TimespanUnitContext); + } + public SPAN(): TerminalNode | undefined { return this.tryGetToken(OpenSearchPPLParser.SPAN, 0); } + public constantFunctionName(): ConstantFunctionNameContext | undefined { + return this.tryGetRuleContext(0, ConstantFunctionNameContext); + } + public dateAndTimeFunctionBase(): DateAndTimeFunctionBaseContext | undefined { + return this.tryGetRuleContext(0, DateAndTimeFunctionBaseContext); + } + public textFunctionBase(): TextFunctionBaseContext | undefined { + return this.tryGetRuleContext(0, TextFunctionBaseContext); + } + public mathematicalFunctionBase(): MathematicalFunctionBaseContext | undefined { + return this.tryGetRuleContext(0, MathematicalFunctionBaseContext); + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return OpenSearchPPLParser.RULE_keywordsCanBeId; } + // @Override + public enterRule(listener: OpenSearchPPLParserListener): void { + if (listener.enterKeywordsCanBeId) { + listener.enterKeywordsCanBeId(this); + } + } + // @Override + public exitRule(listener: OpenSearchPPLParserListener): void { + if (listener.exitKeywordsCanBeId) { + listener.exitKeywordsCanBeId(this); + } + } + // @Override + public accept(visitor: OpenSearchPPLParserVisitor): Result { + if (visitor.visitKeywordsCanBeId) { + return visitor.visitKeywordsCanBeId(this); + } else { + return visitor.visitChildren(this); + } + } +} + + diff --git a/dashboards-observability/common/query_manager/antlr/output/OpenSearchPPLParserListener.ts b/dashboards-observability/common/query_manager/antlr/output/OpenSearchPPLParserListener.ts new file mode 100644 index 000000000..c5a00ad0f --- /dev/null +++ b/dashboards-observability/common/query_manager/antlr/output/OpenSearchPPLParserListener.ts @@ -0,0 +1,1557 @@ +// Generated from ./common/query_manager/antlr/grammar/OpenSearchPPLParser.g4 by ANTLR 4.9.0-SNAPSHOT + + +import { ParseTreeListener } from "antlr4ts/tree/ParseTreeListener"; + +import { BinaryArithmeticContext } from "./OpenSearchPPLParser"; +import { ParentheticBinaryArithmeticContext } from "./OpenSearchPPLParser"; +import { ValueExpressionDefaultContext } from "./OpenSearchPPLParser"; +import { CompareExprContext } from "./OpenSearchPPLParser"; +import { InExprContext } from "./OpenSearchPPLParser"; +import { IdentsAsWildcardQualifiedNameContext } from "./OpenSearchPPLParser"; +import { SearchFromContext } from "./OpenSearchPPLParser"; +import { SearchFromFilterContext } from "./OpenSearchPPLParser"; +import { SearchFilterFromContext } from "./OpenSearchPPLParser"; +import { StatsFunctionCallContext } from "./OpenSearchPPLParser"; +import { CountAllFunctionCallContext } from "./OpenSearchPPLParser"; +import { DistinctCountFunctionCallContext } from "./OpenSearchPPLParser"; +import { PercentileAggFunctionCallContext } from "./OpenSearchPPLParser"; +import { TakeAggFunctionCallContext } from "./OpenSearchPPLParser"; +import { IdentsAsQualifiedNameContext } from "./OpenSearchPPLParser"; +import { ComparsionContext } from "./OpenSearchPPLParser"; +import { LogicalNotContext } from "./OpenSearchPPLParser"; +import { LogicalOrContext } from "./OpenSearchPPLParser"; +import { LogicalAndContext } from "./OpenSearchPPLParser"; +import { LogicalXorContext } from "./OpenSearchPPLParser"; +import { BooleanExprContext } from "./OpenSearchPPLParser"; +import { RelevanceExprContext } from "./OpenSearchPPLParser"; +import { RootContext } from "./OpenSearchPPLParser"; +import { PplStatementContext } from "./OpenSearchPPLParser"; +import { PplCommandsContext } from "./OpenSearchPPLParser"; +import { CommandsContext } from "./OpenSearchPPLParser"; +import { SearchCommandContext } from "./OpenSearchPPLParser"; +import { DescribeCommandContext } from "./OpenSearchPPLParser"; +import { ShowCatalogsCommandContext } from "./OpenSearchPPLParser"; +import { WhereCommandContext } from "./OpenSearchPPLParser"; +import { FieldsCommandContext } from "./OpenSearchPPLParser"; +import { RenameCommandContext } from "./OpenSearchPPLParser"; +import { StatsCommandContext } from "./OpenSearchPPLParser"; +import { DedupCommandContext } from "./OpenSearchPPLParser"; +import { SortCommandContext } from "./OpenSearchPPLParser"; +import { EvalCommandContext } from "./OpenSearchPPLParser"; +import { HeadCommandContext } from "./OpenSearchPPLParser"; +import { TopCommandContext } from "./OpenSearchPPLParser"; +import { RareCommandContext } from "./OpenSearchPPLParser"; +import { GrokCommandContext } from "./OpenSearchPPLParser"; +import { ParseCommandContext } from "./OpenSearchPPLParser"; +import { PatternsCommandContext } from "./OpenSearchPPLParser"; +import { PatternsParameterContext } from "./OpenSearchPPLParser"; +import { PatternsMethodContext } from "./OpenSearchPPLParser"; +import { KmeansCommandContext } from "./OpenSearchPPLParser"; +import { KmeansParameterContext } from "./OpenSearchPPLParser"; +import { AdCommandContext } from "./OpenSearchPPLParser"; +import { AdParameterContext } from "./OpenSearchPPLParser"; +import { MlCommandContext } from "./OpenSearchPPLParser"; +import { MlArgContext } from "./OpenSearchPPLParser"; +import { FromClauseContext } from "./OpenSearchPPLParser"; +import { TableSourceClauseContext } from "./OpenSearchPPLParser"; +import { RenameClasueContext } from "./OpenSearchPPLParser"; +import { ByClauseContext } from "./OpenSearchPPLParser"; +import { StatsByClauseContext } from "./OpenSearchPPLParser"; +import { BySpanClauseContext } from "./OpenSearchPPLParser"; +import { SpanClauseContext } from "./OpenSearchPPLParser"; +import { SortbyClauseContext } from "./OpenSearchPPLParser"; +import { EvalClauseContext } from "./OpenSearchPPLParser"; +import { StatsAggTermContext } from "./OpenSearchPPLParser"; +import { StatsFunctionContext } from "./OpenSearchPPLParser"; +import { StatsFunctionNameContext } from "./OpenSearchPPLParser"; +import { TakeAggFunctionContext } from "./OpenSearchPPLParser"; +import { PercentileAggFunctionContext } from "./OpenSearchPPLParser"; +import { ExpressionContext } from "./OpenSearchPPLParser"; +import { LogicalExpressionContext } from "./OpenSearchPPLParser"; +import { ComparisonExpressionContext } from "./OpenSearchPPLParser"; +import { ValueExpressionContext } from "./OpenSearchPPLParser"; +import { PrimaryExpressionContext } from "./OpenSearchPPLParser"; +import { ConstantFunctionContext } from "./OpenSearchPPLParser"; +import { BooleanExpressionContext } from "./OpenSearchPPLParser"; +import { RelevanceExpressionContext } from "./OpenSearchPPLParser"; +import { SingleFieldRelevanceFunctionContext } from "./OpenSearchPPLParser"; +import { MultiFieldRelevanceFunctionContext } from "./OpenSearchPPLParser"; +import { TableSourceContext } from "./OpenSearchPPLParser"; +import { TableFunctionContext } from "./OpenSearchPPLParser"; +import { FieldListContext } from "./OpenSearchPPLParser"; +import { WcFieldListContext } from "./OpenSearchPPLParser"; +import { SortFieldContext } from "./OpenSearchPPLParser"; +import { SortFieldExpressionContext } from "./OpenSearchPPLParser"; +import { FieldExpressionContext } from "./OpenSearchPPLParser"; +import { WcFieldExpressionContext } from "./OpenSearchPPLParser"; +import { EvalFunctionCallContext } from "./OpenSearchPPLParser"; +import { DataTypeFunctionCallContext } from "./OpenSearchPPLParser"; +import { BooleanFunctionCallContext } from "./OpenSearchPPLParser"; +import { ConvertedDataTypeContext } from "./OpenSearchPPLParser"; +import { EvalFunctionNameContext } from "./OpenSearchPPLParser"; +import { FunctionArgsContext } from "./OpenSearchPPLParser"; +import { FunctionArgContext } from "./OpenSearchPPLParser"; +import { RelevanceArgContext } from "./OpenSearchPPLParser"; +import { RelevanceArgNameContext } from "./OpenSearchPPLParser"; +import { RelevanceFieldAndWeightContext } from "./OpenSearchPPLParser"; +import { RelevanceFieldWeightContext } from "./OpenSearchPPLParser"; +import { RelevanceFieldContext } from "./OpenSearchPPLParser"; +import { RelevanceQueryContext } from "./OpenSearchPPLParser"; +import { RelevanceArgValueContext } from "./OpenSearchPPLParser"; +import { MathematicalFunctionBaseContext } from "./OpenSearchPPLParser"; +import { TrigonometricFunctionNameContext } from "./OpenSearchPPLParser"; +import { DateAndTimeFunctionBaseContext } from "./OpenSearchPPLParser"; +import { ConstantFunctionNameContext } from "./OpenSearchPPLParser"; +import { ConditionFunctionBaseContext } from "./OpenSearchPPLParser"; +import { SystemFunctionBaseContext } from "./OpenSearchPPLParser"; +import { TextFunctionBaseContext } from "./OpenSearchPPLParser"; +import { ComparisonOperatorContext } from "./OpenSearchPPLParser"; +import { BinaryOperatorContext } from "./OpenSearchPPLParser"; +import { SingleFieldRelevanceFunctionNameContext } from "./OpenSearchPPLParser"; +import { MultiFieldRelevanceFunctionNameContext } from "./OpenSearchPPLParser"; +import { LiteralValueContext } from "./OpenSearchPPLParser"; +import { IntervalLiteralContext } from "./OpenSearchPPLParser"; +import { StringLiteralContext } from "./OpenSearchPPLParser"; +import { IntegerLiteralContext } from "./OpenSearchPPLParser"; +import { DecimalLiteralContext } from "./OpenSearchPPLParser"; +import { BooleanLiteralContext } from "./OpenSearchPPLParser"; +import { DatetimeLiteralContext } from "./OpenSearchPPLParser"; +import { DateLiteralContext } from "./OpenSearchPPLParser"; +import { TimeLiteralContext } from "./OpenSearchPPLParser"; +import { TimestampLiteralContext } from "./OpenSearchPPLParser"; +import { IntervalUnitContext } from "./OpenSearchPPLParser"; +import { TimespanUnitContext } from "./OpenSearchPPLParser"; +import { ValueListContext } from "./OpenSearchPPLParser"; +import { QualifiedNameContext } from "./OpenSearchPPLParser"; +import { WcQualifiedNameContext } from "./OpenSearchPPLParser"; +import { IdentContext } from "./OpenSearchPPLParser"; +import { WildcardContext } from "./OpenSearchPPLParser"; +import { KeywordsCanBeIdContext } from "./OpenSearchPPLParser"; + + +/** + * This interface defines a complete listener for a parse tree produced by + * `OpenSearchPPLParser`. + */ +export interface OpenSearchPPLParserListener extends ParseTreeListener { + /** + * Enter a parse tree produced by the `binaryArithmetic` + * labeled alternative in `OpenSearchPPLParser.valueExpression`. + * @param ctx the parse tree + */ + enterBinaryArithmetic?: (ctx: BinaryArithmeticContext) => void; + /** + * Exit a parse tree produced by the `binaryArithmetic` + * labeled alternative in `OpenSearchPPLParser.valueExpression`. + * @param ctx the parse tree + */ + exitBinaryArithmetic?: (ctx: BinaryArithmeticContext) => void; + + /** + * Enter a parse tree produced by the `parentheticBinaryArithmetic` + * labeled alternative in `OpenSearchPPLParser.valueExpression`. + * @param ctx the parse tree + */ + enterParentheticBinaryArithmetic?: (ctx: ParentheticBinaryArithmeticContext) => void; + /** + * Exit a parse tree produced by the `parentheticBinaryArithmetic` + * labeled alternative in `OpenSearchPPLParser.valueExpression`. + * @param ctx the parse tree + */ + exitParentheticBinaryArithmetic?: (ctx: ParentheticBinaryArithmeticContext) => void; + + /** + * Enter a parse tree produced by the `valueExpressionDefault` + * labeled alternative in `OpenSearchPPLParser.valueExpression`. + * @param ctx the parse tree + */ + enterValueExpressionDefault?: (ctx: ValueExpressionDefaultContext) => void; + /** + * Exit a parse tree produced by the `valueExpressionDefault` + * labeled alternative in `OpenSearchPPLParser.valueExpression`. + * @param ctx the parse tree + */ + exitValueExpressionDefault?: (ctx: ValueExpressionDefaultContext) => void; + + /** + * Enter a parse tree produced by the `compareExpr` + * labeled alternative in `OpenSearchPPLParser.comparisonExpression`. + * @param ctx the parse tree + */ + enterCompareExpr?: (ctx: CompareExprContext) => void; + /** + * Exit a parse tree produced by the `compareExpr` + * labeled alternative in `OpenSearchPPLParser.comparisonExpression`. + * @param ctx the parse tree + */ + exitCompareExpr?: (ctx: CompareExprContext) => void; + + /** + * Enter a parse tree produced by the `inExpr` + * labeled alternative in `OpenSearchPPLParser.comparisonExpression`. + * @param ctx the parse tree + */ + enterInExpr?: (ctx: InExprContext) => void; + /** + * Exit a parse tree produced by the `inExpr` + * labeled alternative in `OpenSearchPPLParser.comparisonExpression`. + * @param ctx the parse tree + */ + exitInExpr?: (ctx: InExprContext) => void; + + /** + * Enter a parse tree produced by the `identsAsWildcardQualifiedName` + * labeled alternative in `OpenSearchPPLParser.wcQualifiedName`. + * @param ctx the parse tree + */ + enterIdentsAsWildcardQualifiedName?: (ctx: IdentsAsWildcardQualifiedNameContext) => void; + /** + * Exit a parse tree produced by the `identsAsWildcardQualifiedName` + * labeled alternative in `OpenSearchPPLParser.wcQualifiedName`. + * @param ctx the parse tree + */ + exitIdentsAsWildcardQualifiedName?: (ctx: IdentsAsWildcardQualifiedNameContext) => void; + + /** + * Enter a parse tree produced by the `searchFrom` + * labeled alternative in `OpenSearchPPLParser.searchCommand`. + * @param ctx the parse tree + */ + enterSearchFrom?: (ctx: SearchFromContext) => void; + /** + * Exit a parse tree produced by the `searchFrom` + * labeled alternative in `OpenSearchPPLParser.searchCommand`. + * @param ctx the parse tree + */ + exitSearchFrom?: (ctx: SearchFromContext) => void; + + /** + * Enter a parse tree produced by the `searchFromFilter` + * labeled alternative in `OpenSearchPPLParser.searchCommand`. + * @param ctx the parse tree + */ + enterSearchFromFilter?: (ctx: SearchFromFilterContext) => void; + /** + * Exit a parse tree produced by the `searchFromFilter` + * labeled alternative in `OpenSearchPPLParser.searchCommand`. + * @param ctx the parse tree + */ + exitSearchFromFilter?: (ctx: SearchFromFilterContext) => void; + + /** + * Enter a parse tree produced by the `searchFilterFrom` + * labeled alternative in `OpenSearchPPLParser.searchCommand`. + * @param ctx the parse tree + */ + enterSearchFilterFrom?: (ctx: SearchFilterFromContext) => void; + /** + * Exit a parse tree produced by the `searchFilterFrom` + * labeled alternative in `OpenSearchPPLParser.searchCommand`. + * @param ctx the parse tree + */ + exitSearchFilterFrom?: (ctx: SearchFilterFromContext) => void; + + /** + * Enter a parse tree produced by the `statsFunctionCall` + * labeled alternative in `OpenSearchPPLParser.statsFunction`. + * @param ctx the parse tree + */ + enterStatsFunctionCall?: (ctx: StatsFunctionCallContext) => void; + /** + * Exit a parse tree produced by the `statsFunctionCall` + * labeled alternative in `OpenSearchPPLParser.statsFunction`. + * @param ctx the parse tree + */ + exitStatsFunctionCall?: (ctx: StatsFunctionCallContext) => void; + + /** + * Enter a parse tree produced by the `countAllFunctionCall` + * labeled alternative in `OpenSearchPPLParser.statsFunction`. + * @param ctx the parse tree + */ + enterCountAllFunctionCall?: (ctx: CountAllFunctionCallContext) => void; + /** + * Exit a parse tree produced by the `countAllFunctionCall` + * labeled alternative in `OpenSearchPPLParser.statsFunction`. + * @param ctx the parse tree + */ + exitCountAllFunctionCall?: (ctx: CountAllFunctionCallContext) => void; + + /** + * Enter a parse tree produced by the `distinctCountFunctionCall` + * labeled alternative in `OpenSearchPPLParser.statsFunction`. + * @param ctx the parse tree + */ + enterDistinctCountFunctionCall?: (ctx: DistinctCountFunctionCallContext) => void; + /** + * Exit a parse tree produced by the `distinctCountFunctionCall` + * labeled alternative in `OpenSearchPPLParser.statsFunction`. + * @param ctx the parse tree + */ + exitDistinctCountFunctionCall?: (ctx: DistinctCountFunctionCallContext) => void; + + /** + * Enter a parse tree produced by the `percentileAggFunctionCall` + * labeled alternative in `OpenSearchPPLParser.statsFunction`. + * @param ctx the parse tree + */ + enterPercentileAggFunctionCall?: (ctx: PercentileAggFunctionCallContext) => void; + /** + * Exit a parse tree produced by the `percentileAggFunctionCall` + * labeled alternative in `OpenSearchPPLParser.statsFunction`. + * @param ctx the parse tree + */ + exitPercentileAggFunctionCall?: (ctx: PercentileAggFunctionCallContext) => void; + + /** + * Enter a parse tree produced by the `takeAggFunctionCall` + * labeled alternative in `OpenSearchPPLParser.statsFunction`. + * @param ctx the parse tree + */ + enterTakeAggFunctionCall?: (ctx: TakeAggFunctionCallContext) => void; + /** + * Exit a parse tree produced by the `takeAggFunctionCall` + * labeled alternative in `OpenSearchPPLParser.statsFunction`. + * @param ctx the parse tree + */ + exitTakeAggFunctionCall?: (ctx: TakeAggFunctionCallContext) => void; + + /** + * Enter a parse tree produced by the `identsAsQualifiedName` + * labeled alternative in `OpenSearchPPLParser.qualifiedName`. + * @param ctx the parse tree + */ + enterIdentsAsQualifiedName?: (ctx: IdentsAsQualifiedNameContext) => void; + /** + * Exit a parse tree produced by the `identsAsQualifiedName` + * labeled alternative in `OpenSearchPPLParser.qualifiedName`. + * @param ctx the parse tree + */ + exitIdentsAsQualifiedName?: (ctx: IdentsAsQualifiedNameContext) => void; + + /** + * Enter a parse tree produced by the `comparsion` + * labeled alternative in `OpenSearchPPLParser.logicalExpression`. + * @param ctx the parse tree + */ + enterComparsion?: (ctx: ComparsionContext) => void; + /** + * Exit a parse tree produced by the `comparsion` + * labeled alternative in `OpenSearchPPLParser.logicalExpression`. + * @param ctx the parse tree + */ + exitComparsion?: (ctx: ComparsionContext) => void; + + /** + * Enter a parse tree produced by the `logicalNot` + * labeled alternative in `OpenSearchPPLParser.logicalExpression`. + * @param ctx the parse tree + */ + enterLogicalNot?: (ctx: LogicalNotContext) => void; + /** + * Exit a parse tree produced by the `logicalNot` + * labeled alternative in `OpenSearchPPLParser.logicalExpression`. + * @param ctx the parse tree + */ + exitLogicalNot?: (ctx: LogicalNotContext) => void; + + /** + * Enter a parse tree produced by the `logicalOr` + * labeled alternative in `OpenSearchPPLParser.logicalExpression`. + * @param ctx the parse tree + */ + enterLogicalOr?: (ctx: LogicalOrContext) => void; + /** + * Exit a parse tree produced by the `logicalOr` + * labeled alternative in `OpenSearchPPLParser.logicalExpression`. + * @param ctx the parse tree + */ + exitLogicalOr?: (ctx: LogicalOrContext) => void; + + /** + * Enter a parse tree produced by the `logicalAnd` + * labeled alternative in `OpenSearchPPLParser.logicalExpression`. + * @param ctx the parse tree + */ + enterLogicalAnd?: (ctx: LogicalAndContext) => void; + /** + * Exit a parse tree produced by the `logicalAnd` + * labeled alternative in `OpenSearchPPLParser.logicalExpression`. + * @param ctx the parse tree + */ + exitLogicalAnd?: (ctx: LogicalAndContext) => void; + + /** + * Enter a parse tree produced by the `logicalXor` + * labeled alternative in `OpenSearchPPLParser.logicalExpression`. + * @param ctx the parse tree + */ + enterLogicalXor?: (ctx: LogicalXorContext) => void; + /** + * Exit a parse tree produced by the `logicalXor` + * labeled alternative in `OpenSearchPPLParser.logicalExpression`. + * @param ctx the parse tree + */ + exitLogicalXor?: (ctx: LogicalXorContext) => void; + + /** + * Enter a parse tree produced by the `booleanExpr` + * labeled alternative in `OpenSearchPPLParser.logicalExpression`. + * @param ctx the parse tree + */ + enterBooleanExpr?: (ctx: BooleanExprContext) => void; + /** + * Exit a parse tree produced by the `booleanExpr` + * labeled alternative in `OpenSearchPPLParser.logicalExpression`. + * @param ctx the parse tree + */ + exitBooleanExpr?: (ctx: BooleanExprContext) => void; + + /** + * Enter a parse tree produced by the `relevanceExpr` + * labeled alternative in `OpenSearchPPLParser.logicalExpression`. + * @param ctx the parse tree + */ + enterRelevanceExpr?: (ctx: RelevanceExprContext) => void; + /** + * Exit a parse tree produced by the `relevanceExpr` + * labeled alternative in `OpenSearchPPLParser.logicalExpression`. + * @param ctx the parse tree + */ + exitRelevanceExpr?: (ctx: RelevanceExprContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.root`. + * @param ctx the parse tree + */ + enterRoot?: (ctx: RootContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.root`. + * @param ctx the parse tree + */ + exitRoot?: (ctx: RootContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.pplStatement`. + * @param ctx the parse tree + */ + enterPplStatement?: (ctx: PplStatementContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.pplStatement`. + * @param ctx the parse tree + */ + exitPplStatement?: (ctx: PplStatementContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.pplCommands`. + * @param ctx the parse tree + */ + enterPplCommands?: (ctx: PplCommandsContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.pplCommands`. + * @param ctx the parse tree + */ + exitPplCommands?: (ctx: PplCommandsContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.commands`. + * @param ctx the parse tree + */ + enterCommands?: (ctx: CommandsContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.commands`. + * @param ctx the parse tree + */ + exitCommands?: (ctx: CommandsContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.searchCommand`. + * @param ctx the parse tree + */ + enterSearchCommand?: (ctx: SearchCommandContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.searchCommand`. + * @param ctx the parse tree + */ + exitSearchCommand?: (ctx: SearchCommandContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.describeCommand`. + * @param ctx the parse tree + */ + enterDescribeCommand?: (ctx: DescribeCommandContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.describeCommand`. + * @param ctx the parse tree + */ + exitDescribeCommand?: (ctx: DescribeCommandContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.showCatalogsCommand`. + * @param ctx the parse tree + */ + enterShowCatalogsCommand?: (ctx: ShowCatalogsCommandContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.showCatalogsCommand`. + * @param ctx the parse tree + */ + exitShowCatalogsCommand?: (ctx: ShowCatalogsCommandContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.whereCommand`. + * @param ctx the parse tree + */ + enterWhereCommand?: (ctx: WhereCommandContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.whereCommand`. + * @param ctx the parse tree + */ + exitWhereCommand?: (ctx: WhereCommandContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.fieldsCommand`. + * @param ctx the parse tree + */ + enterFieldsCommand?: (ctx: FieldsCommandContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.fieldsCommand`. + * @param ctx the parse tree + */ + exitFieldsCommand?: (ctx: FieldsCommandContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.renameCommand`. + * @param ctx the parse tree + */ + enterRenameCommand?: (ctx: RenameCommandContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.renameCommand`. + * @param ctx the parse tree + */ + exitRenameCommand?: (ctx: RenameCommandContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.statsCommand`. + * @param ctx the parse tree + */ + enterStatsCommand?: (ctx: StatsCommandContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.statsCommand`. + * @param ctx the parse tree + */ + exitStatsCommand?: (ctx: StatsCommandContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.dedupCommand`. + * @param ctx the parse tree + */ + enterDedupCommand?: (ctx: DedupCommandContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.dedupCommand`. + * @param ctx the parse tree + */ + exitDedupCommand?: (ctx: DedupCommandContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.sortCommand`. + * @param ctx the parse tree + */ + enterSortCommand?: (ctx: SortCommandContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.sortCommand`. + * @param ctx the parse tree + */ + exitSortCommand?: (ctx: SortCommandContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.evalCommand`. + * @param ctx the parse tree + */ + enterEvalCommand?: (ctx: EvalCommandContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.evalCommand`. + * @param ctx the parse tree + */ + exitEvalCommand?: (ctx: EvalCommandContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.headCommand`. + * @param ctx the parse tree + */ + enterHeadCommand?: (ctx: HeadCommandContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.headCommand`. + * @param ctx the parse tree + */ + exitHeadCommand?: (ctx: HeadCommandContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.topCommand`. + * @param ctx the parse tree + */ + enterTopCommand?: (ctx: TopCommandContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.topCommand`. + * @param ctx the parse tree + */ + exitTopCommand?: (ctx: TopCommandContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.rareCommand`. + * @param ctx the parse tree + */ + enterRareCommand?: (ctx: RareCommandContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.rareCommand`. + * @param ctx the parse tree + */ + exitRareCommand?: (ctx: RareCommandContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.grokCommand`. + * @param ctx the parse tree + */ + enterGrokCommand?: (ctx: GrokCommandContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.grokCommand`. + * @param ctx the parse tree + */ + exitGrokCommand?: (ctx: GrokCommandContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.parseCommand`. + * @param ctx the parse tree + */ + enterParseCommand?: (ctx: ParseCommandContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.parseCommand`. + * @param ctx the parse tree + */ + exitParseCommand?: (ctx: ParseCommandContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.patternsCommand`. + * @param ctx the parse tree + */ + enterPatternsCommand?: (ctx: PatternsCommandContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.patternsCommand`. + * @param ctx the parse tree + */ + exitPatternsCommand?: (ctx: PatternsCommandContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.patternsParameter`. + * @param ctx the parse tree + */ + enterPatternsParameter?: (ctx: PatternsParameterContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.patternsParameter`. + * @param ctx the parse tree + */ + exitPatternsParameter?: (ctx: PatternsParameterContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.patternsMethod`. + * @param ctx the parse tree + */ + enterPatternsMethod?: (ctx: PatternsMethodContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.patternsMethod`. + * @param ctx the parse tree + */ + exitPatternsMethod?: (ctx: PatternsMethodContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.kmeansCommand`. + * @param ctx the parse tree + */ + enterKmeansCommand?: (ctx: KmeansCommandContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.kmeansCommand`. + * @param ctx the parse tree + */ + exitKmeansCommand?: (ctx: KmeansCommandContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.kmeansParameter`. + * @param ctx the parse tree + */ + enterKmeansParameter?: (ctx: KmeansParameterContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.kmeansParameter`. + * @param ctx the parse tree + */ + exitKmeansParameter?: (ctx: KmeansParameterContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.adCommand`. + * @param ctx the parse tree + */ + enterAdCommand?: (ctx: AdCommandContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.adCommand`. + * @param ctx the parse tree + */ + exitAdCommand?: (ctx: AdCommandContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.adParameter`. + * @param ctx the parse tree + */ + enterAdParameter?: (ctx: AdParameterContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.adParameter`. + * @param ctx the parse tree + */ + exitAdParameter?: (ctx: AdParameterContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.mlCommand`. + * @param ctx the parse tree + */ + enterMlCommand?: (ctx: MlCommandContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.mlCommand`. + * @param ctx the parse tree + */ + exitMlCommand?: (ctx: MlCommandContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.mlArg`. + * @param ctx the parse tree + */ + enterMlArg?: (ctx: MlArgContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.mlArg`. + * @param ctx the parse tree + */ + exitMlArg?: (ctx: MlArgContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.fromClause`. + * @param ctx the parse tree + */ + enterFromClause?: (ctx: FromClauseContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.fromClause`. + * @param ctx the parse tree + */ + exitFromClause?: (ctx: FromClauseContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.tableSourceClause`. + * @param ctx the parse tree + */ + enterTableSourceClause?: (ctx: TableSourceClauseContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.tableSourceClause`. + * @param ctx the parse tree + */ + exitTableSourceClause?: (ctx: TableSourceClauseContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.renameClasue`. + * @param ctx the parse tree + */ + enterRenameClasue?: (ctx: RenameClasueContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.renameClasue`. + * @param ctx the parse tree + */ + exitRenameClasue?: (ctx: RenameClasueContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.byClause`. + * @param ctx the parse tree + */ + enterByClause?: (ctx: ByClauseContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.byClause`. + * @param ctx the parse tree + */ + exitByClause?: (ctx: ByClauseContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.statsByClause`. + * @param ctx the parse tree + */ + enterStatsByClause?: (ctx: StatsByClauseContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.statsByClause`. + * @param ctx the parse tree + */ + exitStatsByClause?: (ctx: StatsByClauseContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.bySpanClause`. + * @param ctx the parse tree + */ + enterBySpanClause?: (ctx: BySpanClauseContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.bySpanClause`. + * @param ctx the parse tree + */ + exitBySpanClause?: (ctx: BySpanClauseContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.spanClause`. + * @param ctx the parse tree + */ + enterSpanClause?: (ctx: SpanClauseContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.spanClause`. + * @param ctx the parse tree + */ + exitSpanClause?: (ctx: SpanClauseContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.sortbyClause`. + * @param ctx the parse tree + */ + enterSortbyClause?: (ctx: SortbyClauseContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.sortbyClause`. + * @param ctx the parse tree + */ + exitSortbyClause?: (ctx: SortbyClauseContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.evalClause`. + * @param ctx the parse tree + */ + enterEvalClause?: (ctx: EvalClauseContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.evalClause`. + * @param ctx the parse tree + */ + exitEvalClause?: (ctx: EvalClauseContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.statsAggTerm`. + * @param ctx the parse tree + */ + enterStatsAggTerm?: (ctx: StatsAggTermContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.statsAggTerm`. + * @param ctx the parse tree + */ + exitStatsAggTerm?: (ctx: StatsAggTermContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.statsFunction`. + * @param ctx the parse tree + */ + enterStatsFunction?: (ctx: StatsFunctionContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.statsFunction`. + * @param ctx the parse tree + */ + exitStatsFunction?: (ctx: StatsFunctionContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.statsFunctionName`. + * @param ctx the parse tree + */ + enterStatsFunctionName?: (ctx: StatsFunctionNameContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.statsFunctionName`. + * @param ctx the parse tree + */ + exitStatsFunctionName?: (ctx: StatsFunctionNameContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.takeAggFunction`. + * @param ctx the parse tree + */ + enterTakeAggFunction?: (ctx: TakeAggFunctionContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.takeAggFunction`. + * @param ctx the parse tree + */ + exitTakeAggFunction?: (ctx: TakeAggFunctionContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.percentileAggFunction`. + * @param ctx the parse tree + */ + enterPercentileAggFunction?: (ctx: PercentileAggFunctionContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.percentileAggFunction`. + * @param ctx the parse tree + */ + exitPercentileAggFunction?: (ctx: PercentileAggFunctionContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.expression`. + * @param ctx the parse tree + */ + enterExpression?: (ctx: ExpressionContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.expression`. + * @param ctx the parse tree + */ + exitExpression?: (ctx: ExpressionContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.logicalExpression`. + * @param ctx the parse tree + */ + enterLogicalExpression?: (ctx: LogicalExpressionContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.logicalExpression`. + * @param ctx the parse tree + */ + exitLogicalExpression?: (ctx: LogicalExpressionContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.comparisonExpression`. + * @param ctx the parse tree + */ + enterComparisonExpression?: (ctx: ComparisonExpressionContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.comparisonExpression`. + * @param ctx the parse tree + */ + exitComparisonExpression?: (ctx: ComparisonExpressionContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.valueExpression`. + * @param ctx the parse tree + */ + enterValueExpression?: (ctx: ValueExpressionContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.valueExpression`. + * @param ctx the parse tree + */ + exitValueExpression?: (ctx: ValueExpressionContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.primaryExpression`. + * @param ctx the parse tree + */ + enterPrimaryExpression?: (ctx: PrimaryExpressionContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.primaryExpression`. + * @param ctx the parse tree + */ + exitPrimaryExpression?: (ctx: PrimaryExpressionContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.constantFunction`. + * @param ctx the parse tree + */ + enterConstantFunction?: (ctx: ConstantFunctionContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.constantFunction`. + * @param ctx the parse tree + */ + exitConstantFunction?: (ctx: ConstantFunctionContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.booleanExpression`. + * @param ctx the parse tree + */ + enterBooleanExpression?: (ctx: BooleanExpressionContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.booleanExpression`. + * @param ctx the parse tree + */ + exitBooleanExpression?: (ctx: BooleanExpressionContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.relevanceExpression`. + * @param ctx the parse tree + */ + enterRelevanceExpression?: (ctx: RelevanceExpressionContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.relevanceExpression`. + * @param ctx the parse tree + */ + exitRelevanceExpression?: (ctx: RelevanceExpressionContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.singleFieldRelevanceFunction`. + * @param ctx the parse tree + */ + enterSingleFieldRelevanceFunction?: (ctx: SingleFieldRelevanceFunctionContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.singleFieldRelevanceFunction`. + * @param ctx the parse tree + */ + exitSingleFieldRelevanceFunction?: (ctx: SingleFieldRelevanceFunctionContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.multiFieldRelevanceFunction`. + * @param ctx the parse tree + */ + enterMultiFieldRelevanceFunction?: (ctx: MultiFieldRelevanceFunctionContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.multiFieldRelevanceFunction`. + * @param ctx the parse tree + */ + exitMultiFieldRelevanceFunction?: (ctx: MultiFieldRelevanceFunctionContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.tableSource`. + * @param ctx the parse tree + */ + enterTableSource?: (ctx: TableSourceContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.tableSource`. + * @param ctx the parse tree + */ + exitTableSource?: (ctx: TableSourceContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.tableFunction`. + * @param ctx the parse tree + */ + enterTableFunction?: (ctx: TableFunctionContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.tableFunction`. + * @param ctx the parse tree + */ + exitTableFunction?: (ctx: TableFunctionContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.fieldList`. + * @param ctx the parse tree + */ + enterFieldList?: (ctx: FieldListContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.fieldList`. + * @param ctx the parse tree + */ + exitFieldList?: (ctx: FieldListContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.wcFieldList`. + * @param ctx the parse tree + */ + enterWcFieldList?: (ctx: WcFieldListContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.wcFieldList`. + * @param ctx the parse tree + */ + exitWcFieldList?: (ctx: WcFieldListContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.sortField`. + * @param ctx the parse tree + */ + enterSortField?: (ctx: SortFieldContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.sortField`. + * @param ctx the parse tree + */ + exitSortField?: (ctx: SortFieldContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.sortFieldExpression`. + * @param ctx the parse tree + */ + enterSortFieldExpression?: (ctx: SortFieldExpressionContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.sortFieldExpression`. + * @param ctx the parse tree + */ + exitSortFieldExpression?: (ctx: SortFieldExpressionContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.fieldExpression`. + * @param ctx the parse tree + */ + enterFieldExpression?: (ctx: FieldExpressionContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.fieldExpression`. + * @param ctx the parse tree + */ + exitFieldExpression?: (ctx: FieldExpressionContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.wcFieldExpression`. + * @param ctx the parse tree + */ + enterWcFieldExpression?: (ctx: WcFieldExpressionContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.wcFieldExpression`. + * @param ctx the parse tree + */ + exitWcFieldExpression?: (ctx: WcFieldExpressionContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.evalFunctionCall`. + * @param ctx the parse tree + */ + enterEvalFunctionCall?: (ctx: EvalFunctionCallContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.evalFunctionCall`. + * @param ctx the parse tree + */ + exitEvalFunctionCall?: (ctx: EvalFunctionCallContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.dataTypeFunctionCall`. + * @param ctx the parse tree + */ + enterDataTypeFunctionCall?: (ctx: DataTypeFunctionCallContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.dataTypeFunctionCall`. + * @param ctx the parse tree + */ + exitDataTypeFunctionCall?: (ctx: DataTypeFunctionCallContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.booleanFunctionCall`. + * @param ctx the parse tree + */ + enterBooleanFunctionCall?: (ctx: BooleanFunctionCallContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.booleanFunctionCall`. + * @param ctx the parse tree + */ + exitBooleanFunctionCall?: (ctx: BooleanFunctionCallContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.convertedDataType`. + * @param ctx the parse tree + */ + enterConvertedDataType?: (ctx: ConvertedDataTypeContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.convertedDataType`. + * @param ctx the parse tree + */ + exitConvertedDataType?: (ctx: ConvertedDataTypeContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.evalFunctionName`. + * @param ctx the parse tree + */ + enterEvalFunctionName?: (ctx: EvalFunctionNameContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.evalFunctionName`. + * @param ctx the parse tree + */ + exitEvalFunctionName?: (ctx: EvalFunctionNameContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.functionArgs`. + * @param ctx the parse tree + */ + enterFunctionArgs?: (ctx: FunctionArgsContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.functionArgs`. + * @param ctx the parse tree + */ + exitFunctionArgs?: (ctx: FunctionArgsContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.functionArg`. + * @param ctx the parse tree + */ + enterFunctionArg?: (ctx: FunctionArgContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.functionArg`. + * @param ctx the parse tree + */ + exitFunctionArg?: (ctx: FunctionArgContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.relevanceArg`. + * @param ctx the parse tree + */ + enterRelevanceArg?: (ctx: RelevanceArgContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.relevanceArg`. + * @param ctx the parse tree + */ + exitRelevanceArg?: (ctx: RelevanceArgContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.relevanceArgName`. + * @param ctx the parse tree + */ + enterRelevanceArgName?: (ctx: RelevanceArgNameContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.relevanceArgName`. + * @param ctx the parse tree + */ + exitRelevanceArgName?: (ctx: RelevanceArgNameContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.relevanceFieldAndWeight`. + * @param ctx the parse tree + */ + enterRelevanceFieldAndWeight?: (ctx: RelevanceFieldAndWeightContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.relevanceFieldAndWeight`. + * @param ctx the parse tree + */ + exitRelevanceFieldAndWeight?: (ctx: RelevanceFieldAndWeightContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.relevanceFieldWeight`. + * @param ctx the parse tree + */ + enterRelevanceFieldWeight?: (ctx: RelevanceFieldWeightContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.relevanceFieldWeight`. + * @param ctx the parse tree + */ + exitRelevanceFieldWeight?: (ctx: RelevanceFieldWeightContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.relevanceField`. + * @param ctx the parse tree + */ + enterRelevanceField?: (ctx: RelevanceFieldContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.relevanceField`. + * @param ctx the parse tree + */ + exitRelevanceField?: (ctx: RelevanceFieldContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.relevanceQuery`. + * @param ctx the parse tree + */ + enterRelevanceQuery?: (ctx: RelevanceQueryContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.relevanceQuery`. + * @param ctx the parse tree + */ + exitRelevanceQuery?: (ctx: RelevanceQueryContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.relevanceArgValue`. + * @param ctx the parse tree + */ + enterRelevanceArgValue?: (ctx: RelevanceArgValueContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.relevanceArgValue`. + * @param ctx the parse tree + */ + exitRelevanceArgValue?: (ctx: RelevanceArgValueContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.mathematicalFunctionBase`. + * @param ctx the parse tree + */ + enterMathematicalFunctionBase?: (ctx: MathematicalFunctionBaseContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.mathematicalFunctionBase`. + * @param ctx the parse tree + */ + exitMathematicalFunctionBase?: (ctx: MathematicalFunctionBaseContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.trigonometricFunctionName`. + * @param ctx the parse tree + */ + enterTrigonometricFunctionName?: (ctx: TrigonometricFunctionNameContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.trigonometricFunctionName`. + * @param ctx the parse tree + */ + exitTrigonometricFunctionName?: (ctx: TrigonometricFunctionNameContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.dateAndTimeFunctionBase`. + * @param ctx the parse tree + */ + enterDateAndTimeFunctionBase?: (ctx: DateAndTimeFunctionBaseContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.dateAndTimeFunctionBase`. + * @param ctx the parse tree + */ + exitDateAndTimeFunctionBase?: (ctx: DateAndTimeFunctionBaseContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.constantFunctionName`. + * @param ctx the parse tree + */ + enterConstantFunctionName?: (ctx: ConstantFunctionNameContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.constantFunctionName`. + * @param ctx the parse tree + */ + exitConstantFunctionName?: (ctx: ConstantFunctionNameContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.conditionFunctionBase`. + * @param ctx the parse tree + */ + enterConditionFunctionBase?: (ctx: ConditionFunctionBaseContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.conditionFunctionBase`. + * @param ctx the parse tree + */ + exitConditionFunctionBase?: (ctx: ConditionFunctionBaseContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.systemFunctionBase`. + * @param ctx the parse tree + */ + enterSystemFunctionBase?: (ctx: SystemFunctionBaseContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.systemFunctionBase`. + * @param ctx the parse tree + */ + exitSystemFunctionBase?: (ctx: SystemFunctionBaseContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.textFunctionBase`. + * @param ctx the parse tree + */ + enterTextFunctionBase?: (ctx: TextFunctionBaseContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.textFunctionBase`. + * @param ctx the parse tree + */ + exitTextFunctionBase?: (ctx: TextFunctionBaseContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.comparisonOperator`. + * @param ctx the parse tree + */ + enterComparisonOperator?: (ctx: ComparisonOperatorContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.comparisonOperator`. + * @param ctx the parse tree + */ + exitComparisonOperator?: (ctx: ComparisonOperatorContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.binaryOperator`. + * @param ctx the parse tree + */ + enterBinaryOperator?: (ctx: BinaryOperatorContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.binaryOperator`. + * @param ctx the parse tree + */ + exitBinaryOperator?: (ctx: BinaryOperatorContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.singleFieldRelevanceFunctionName`. + * @param ctx the parse tree + */ + enterSingleFieldRelevanceFunctionName?: (ctx: SingleFieldRelevanceFunctionNameContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.singleFieldRelevanceFunctionName`. + * @param ctx the parse tree + */ + exitSingleFieldRelevanceFunctionName?: (ctx: SingleFieldRelevanceFunctionNameContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.multiFieldRelevanceFunctionName`. + * @param ctx the parse tree + */ + enterMultiFieldRelevanceFunctionName?: (ctx: MultiFieldRelevanceFunctionNameContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.multiFieldRelevanceFunctionName`. + * @param ctx the parse tree + */ + exitMultiFieldRelevanceFunctionName?: (ctx: MultiFieldRelevanceFunctionNameContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.literalValue`. + * @param ctx the parse tree + */ + enterLiteralValue?: (ctx: LiteralValueContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.literalValue`. + * @param ctx the parse tree + */ + exitLiteralValue?: (ctx: LiteralValueContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.intervalLiteral`. + * @param ctx the parse tree + */ + enterIntervalLiteral?: (ctx: IntervalLiteralContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.intervalLiteral`. + * @param ctx the parse tree + */ + exitIntervalLiteral?: (ctx: IntervalLiteralContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.stringLiteral`. + * @param ctx the parse tree + */ + enterStringLiteral?: (ctx: StringLiteralContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.stringLiteral`. + * @param ctx the parse tree + */ + exitStringLiteral?: (ctx: StringLiteralContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.integerLiteral`. + * @param ctx the parse tree + */ + enterIntegerLiteral?: (ctx: IntegerLiteralContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.integerLiteral`. + * @param ctx the parse tree + */ + exitIntegerLiteral?: (ctx: IntegerLiteralContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.decimalLiteral`. + * @param ctx the parse tree + */ + enterDecimalLiteral?: (ctx: DecimalLiteralContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.decimalLiteral`. + * @param ctx the parse tree + */ + exitDecimalLiteral?: (ctx: DecimalLiteralContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.booleanLiteral`. + * @param ctx the parse tree + */ + enterBooleanLiteral?: (ctx: BooleanLiteralContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.booleanLiteral`. + * @param ctx the parse tree + */ + exitBooleanLiteral?: (ctx: BooleanLiteralContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.datetimeLiteral`. + * @param ctx the parse tree + */ + enterDatetimeLiteral?: (ctx: DatetimeLiteralContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.datetimeLiteral`. + * @param ctx the parse tree + */ + exitDatetimeLiteral?: (ctx: DatetimeLiteralContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.dateLiteral`. + * @param ctx the parse tree + */ + enterDateLiteral?: (ctx: DateLiteralContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.dateLiteral`. + * @param ctx the parse tree + */ + exitDateLiteral?: (ctx: DateLiteralContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.timeLiteral`. + * @param ctx the parse tree + */ + enterTimeLiteral?: (ctx: TimeLiteralContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.timeLiteral`. + * @param ctx the parse tree + */ + exitTimeLiteral?: (ctx: TimeLiteralContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.timestampLiteral`. + * @param ctx the parse tree + */ + enterTimestampLiteral?: (ctx: TimestampLiteralContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.timestampLiteral`. + * @param ctx the parse tree + */ + exitTimestampLiteral?: (ctx: TimestampLiteralContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.intervalUnit`. + * @param ctx the parse tree + */ + enterIntervalUnit?: (ctx: IntervalUnitContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.intervalUnit`. + * @param ctx the parse tree + */ + exitIntervalUnit?: (ctx: IntervalUnitContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.timespanUnit`. + * @param ctx the parse tree + */ + enterTimespanUnit?: (ctx: TimespanUnitContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.timespanUnit`. + * @param ctx the parse tree + */ + exitTimespanUnit?: (ctx: TimespanUnitContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.valueList`. + * @param ctx the parse tree + */ + enterValueList?: (ctx: ValueListContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.valueList`. + * @param ctx the parse tree + */ + exitValueList?: (ctx: ValueListContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.qualifiedName`. + * @param ctx the parse tree + */ + enterQualifiedName?: (ctx: QualifiedNameContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.qualifiedName`. + * @param ctx the parse tree + */ + exitQualifiedName?: (ctx: QualifiedNameContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.wcQualifiedName`. + * @param ctx the parse tree + */ + enterWcQualifiedName?: (ctx: WcQualifiedNameContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.wcQualifiedName`. + * @param ctx the parse tree + */ + exitWcQualifiedName?: (ctx: WcQualifiedNameContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.ident`. + * @param ctx the parse tree + */ + enterIdent?: (ctx: IdentContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.ident`. + * @param ctx the parse tree + */ + exitIdent?: (ctx: IdentContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.wildcard`. + * @param ctx the parse tree + */ + enterWildcard?: (ctx: WildcardContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.wildcard`. + * @param ctx the parse tree + */ + exitWildcard?: (ctx: WildcardContext) => void; + + /** + * Enter a parse tree produced by `OpenSearchPPLParser.keywordsCanBeId`. + * @param ctx the parse tree + */ + enterKeywordsCanBeId?: (ctx: KeywordsCanBeIdContext) => void; + /** + * Exit a parse tree produced by `OpenSearchPPLParser.keywordsCanBeId`. + * @param ctx the parse tree + */ + exitKeywordsCanBeId?: (ctx: KeywordsCanBeIdContext) => void; +} + diff --git a/dashboards-observability/common/query_manager/antlr/output/OpenSearchPPLParserVisitor.ts b/dashboards-observability/common/query_manager/antlr/output/OpenSearchPPLParserVisitor.ts new file mode 100644 index 000000000..b9261e6a3 --- /dev/null +++ b/dashboards-observability/common/query_manager/antlr/output/OpenSearchPPLParserVisitor.ts @@ -0,0 +1,1038 @@ +// Generated from ./common/query_manager/antlr/grammar/OpenSearchPPLParser.g4 by ANTLR 4.9.0-SNAPSHOT + + +import { ParseTreeVisitor } from "antlr4ts/tree/ParseTreeVisitor"; + +import { BinaryArithmeticContext } from "./OpenSearchPPLParser"; +import { ParentheticBinaryArithmeticContext } from "./OpenSearchPPLParser"; +import { ValueExpressionDefaultContext } from "./OpenSearchPPLParser"; +import { CompareExprContext } from "./OpenSearchPPLParser"; +import { InExprContext } from "./OpenSearchPPLParser"; +import { IdentsAsWildcardQualifiedNameContext } from "./OpenSearchPPLParser"; +import { SearchFromContext } from "./OpenSearchPPLParser"; +import { SearchFromFilterContext } from "./OpenSearchPPLParser"; +import { SearchFilterFromContext } from "./OpenSearchPPLParser"; +import { StatsFunctionCallContext } from "./OpenSearchPPLParser"; +import { CountAllFunctionCallContext } from "./OpenSearchPPLParser"; +import { DistinctCountFunctionCallContext } from "./OpenSearchPPLParser"; +import { PercentileAggFunctionCallContext } from "./OpenSearchPPLParser"; +import { TakeAggFunctionCallContext } from "./OpenSearchPPLParser"; +import { IdentsAsQualifiedNameContext } from "./OpenSearchPPLParser"; +import { ComparsionContext } from "./OpenSearchPPLParser"; +import { LogicalNotContext } from "./OpenSearchPPLParser"; +import { LogicalOrContext } from "./OpenSearchPPLParser"; +import { LogicalAndContext } from "./OpenSearchPPLParser"; +import { LogicalXorContext } from "./OpenSearchPPLParser"; +import { BooleanExprContext } from "./OpenSearchPPLParser"; +import { RelevanceExprContext } from "./OpenSearchPPLParser"; +import { RootContext } from "./OpenSearchPPLParser"; +import { PplStatementContext } from "./OpenSearchPPLParser"; +import { PplCommandsContext } from "./OpenSearchPPLParser"; +import { CommandsContext } from "./OpenSearchPPLParser"; +import { SearchCommandContext } from "./OpenSearchPPLParser"; +import { DescribeCommandContext } from "./OpenSearchPPLParser"; +import { ShowCatalogsCommandContext } from "./OpenSearchPPLParser"; +import { WhereCommandContext } from "./OpenSearchPPLParser"; +import { FieldsCommandContext } from "./OpenSearchPPLParser"; +import { RenameCommandContext } from "./OpenSearchPPLParser"; +import { StatsCommandContext } from "./OpenSearchPPLParser"; +import { DedupCommandContext } from "./OpenSearchPPLParser"; +import { SortCommandContext } from "./OpenSearchPPLParser"; +import { EvalCommandContext } from "./OpenSearchPPLParser"; +import { HeadCommandContext } from "./OpenSearchPPLParser"; +import { TopCommandContext } from "./OpenSearchPPLParser"; +import { RareCommandContext } from "./OpenSearchPPLParser"; +import { GrokCommandContext } from "./OpenSearchPPLParser"; +import { ParseCommandContext } from "./OpenSearchPPLParser"; +import { PatternsCommandContext } from "./OpenSearchPPLParser"; +import { PatternsParameterContext } from "./OpenSearchPPLParser"; +import { PatternsMethodContext } from "./OpenSearchPPLParser"; +import { KmeansCommandContext } from "./OpenSearchPPLParser"; +import { KmeansParameterContext } from "./OpenSearchPPLParser"; +import { AdCommandContext } from "./OpenSearchPPLParser"; +import { AdParameterContext } from "./OpenSearchPPLParser"; +import { MlCommandContext } from "./OpenSearchPPLParser"; +import { MlArgContext } from "./OpenSearchPPLParser"; +import { FromClauseContext } from "./OpenSearchPPLParser"; +import { TableSourceClauseContext } from "./OpenSearchPPLParser"; +import { RenameClasueContext } from "./OpenSearchPPLParser"; +import { ByClauseContext } from "./OpenSearchPPLParser"; +import { StatsByClauseContext } from "./OpenSearchPPLParser"; +import { BySpanClauseContext } from "./OpenSearchPPLParser"; +import { SpanClauseContext } from "./OpenSearchPPLParser"; +import { SortbyClauseContext } from "./OpenSearchPPLParser"; +import { EvalClauseContext } from "./OpenSearchPPLParser"; +import { StatsAggTermContext } from "./OpenSearchPPLParser"; +import { StatsFunctionContext } from "./OpenSearchPPLParser"; +import { StatsFunctionNameContext } from "./OpenSearchPPLParser"; +import { TakeAggFunctionContext } from "./OpenSearchPPLParser"; +import { PercentileAggFunctionContext } from "./OpenSearchPPLParser"; +import { ExpressionContext } from "./OpenSearchPPLParser"; +import { LogicalExpressionContext } from "./OpenSearchPPLParser"; +import { ComparisonExpressionContext } from "./OpenSearchPPLParser"; +import { ValueExpressionContext } from "./OpenSearchPPLParser"; +import { PrimaryExpressionContext } from "./OpenSearchPPLParser"; +import { ConstantFunctionContext } from "./OpenSearchPPLParser"; +import { BooleanExpressionContext } from "./OpenSearchPPLParser"; +import { RelevanceExpressionContext } from "./OpenSearchPPLParser"; +import { SingleFieldRelevanceFunctionContext } from "./OpenSearchPPLParser"; +import { MultiFieldRelevanceFunctionContext } from "./OpenSearchPPLParser"; +import { TableSourceContext } from "./OpenSearchPPLParser"; +import { TableFunctionContext } from "./OpenSearchPPLParser"; +import { FieldListContext } from "./OpenSearchPPLParser"; +import { WcFieldListContext } from "./OpenSearchPPLParser"; +import { SortFieldContext } from "./OpenSearchPPLParser"; +import { SortFieldExpressionContext } from "./OpenSearchPPLParser"; +import { FieldExpressionContext } from "./OpenSearchPPLParser"; +import { WcFieldExpressionContext } from "./OpenSearchPPLParser"; +import { EvalFunctionCallContext } from "./OpenSearchPPLParser"; +import { DataTypeFunctionCallContext } from "./OpenSearchPPLParser"; +import { BooleanFunctionCallContext } from "./OpenSearchPPLParser"; +import { ConvertedDataTypeContext } from "./OpenSearchPPLParser"; +import { EvalFunctionNameContext } from "./OpenSearchPPLParser"; +import { FunctionArgsContext } from "./OpenSearchPPLParser"; +import { FunctionArgContext } from "./OpenSearchPPLParser"; +import { RelevanceArgContext } from "./OpenSearchPPLParser"; +import { RelevanceArgNameContext } from "./OpenSearchPPLParser"; +import { RelevanceFieldAndWeightContext } from "./OpenSearchPPLParser"; +import { RelevanceFieldWeightContext } from "./OpenSearchPPLParser"; +import { RelevanceFieldContext } from "./OpenSearchPPLParser"; +import { RelevanceQueryContext } from "./OpenSearchPPLParser"; +import { RelevanceArgValueContext } from "./OpenSearchPPLParser"; +import { MathematicalFunctionBaseContext } from "./OpenSearchPPLParser"; +import { TrigonometricFunctionNameContext } from "./OpenSearchPPLParser"; +import { DateAndTimeFunctionBaseContext } from "./OpenSearchPPLParser"; +import { ConstantFunctionNameContext } from "./OpenSearchPPLParser"; +import { ConditionFunctionBaseContext } from "./OpenSearchPPLParser"; +import { SystemFunctionBaseContext } from "./OpenSearchPPLParser"; +import { TextFunctionBaseContext } from "./OpenSearchPPLParser"; +import { ComparisonOperatorContext } from "./OpenSearchPPLParser"; +import { BinaryOperatorContext } from "./OpenSearchPPLParser"; +import { SingleFieldRelevanceFunctionNameContext } from "./OpenSearchPPLParser"; +import { MultiFieldRelevanceFunctionNameContext } from "./OpenSearchPPLParser"; +import { LiteralValueContext } from "./OpenSearchPPLParser"; +import { IntervalLiteralContext } from "./OpenSearchPPLParser"; +import { StringLiteralContext } from "./OpenSearchPPLParser"; +import { IntegerLiteralContext } from "./OpenSearchPPLParser"; +import { DecimalLiteralContext } from "./OpenSearchPPLParser"; +import { BooleanLiteralContext } from "./OpenSearchPPLParser"; +import { DatetimeLiteralContext } from "./OpenSearchPPLParser"; +import { DateLiteralContext } from "./OpenSearchPPLParser"; +import { TimeLiteralContext } from "./OpenSearchPPLParser"; +import { TimestampLiteralContext } from "./OpenSearchPPLParser"; +import { IntervalUnitContext } from "./OpenSearchPPLParser"; +import { TimespanUnitContext } from "./OpenSearchPPLParser"; +import { ValueListContext } from "./OpenSearchPPLParser"; +import { QualifiedNameContext } from "./OpenSearchPPLParser"; +import { WcQualifiedNameContext } from "./OpenSearchPPLParser"; +import { IdentContext } from "./OpenSearchPPLParser"; +import { WildcardContext } from "./OpenSearchPPLParser"; +import { KeywordsCanBeIdContext } from "./OpenSearchPPLParser"; + + +/** + * This interface defines a complete generic visitor for a parse tree produced + * by `OpenSearchPPLParser`. + * + * @param The return type of the visit operation. Use `void` for + * operations with no return type. + */ +export interface OpenSearchPPLParserVisitor extends ParseTreeVisitor { + /** + * Visit a parse tree produced by the `binaryArithmetic` + * labeled alternative in `OpenSearchPPLParser.valueExpression`. + * @param ctx the parse tree + * @return the visitor result + */ + visitBinaryArithmetic?: (ctx: BinaryArithmeticContext) => Result; + + /** + * Visit a parse tree produced by the `parentheticBinaryArithmetic` + * labeled alternative in `OpenSearchPPLParser.valueExpression`. + * @param ctx the parse tree + * @return the visitor result + */ + visitParentheticBinaryArithmetic?: (ctx: ParentheticBinaryArithmeticContext) => Result; + + /** + * Visit a parse tree produced by the `valueExpressionDefault` + * labeled alternative in `OpenSearchPPLParser.valueExpression`. + * @param ctx the parse tree + * @return the visitor result + */ + visitValueExpressionDefault?: (ctx: ValueExpressionDefaultContext) => Result; + + /** + * Visit a parse tree produced by the `compareExpr` + * labeled alternative in `OpenSearchPPLParser.comparisonExpression`. + * @param ctx the parse tree + * @return the visitor result + */ + visitCompareExpr?: (ctx: CompareExprContext) => Result; + + /** + * Visit a parse tree produced by the `inExpr` + * labeled alternative in `OpenSearchPPLParser.comparisonExpression`. + * @param ctx the parse tree + * @return the visitor result + */ + visitInExpr?: (ctx: InExprContext) => Result; + + /** + * Visit a parse tree produced by the `identsAsWildcardQualifiedName` + * labeled alternative in `OpenSearchPPLParser.wcQualifiedName`. + * @param ctx the parse tree + * @return the visitor result + */ + visitIdentsAsWildcardQualifiedName?: (ctx: IdentsAsWildcardQualifiedNameContext) => Result; + + /** + * Visit a parse tree produced by the `searchFrom` + * labeled alternative in `OpenSearchPPLParser.searchCommand`. + * @param ctx the parse tree + * @return the visitor result + */ + visitSearchFrom?: (ctx: SearchFromContext) => Result; + + /** + * Visit a parse tree produced by the `searchFromFilter` + * labeled alternative in `OpenSearchPPLParser.searchCommand`. + * @param ctx the parse tree + * @return the visitor result + */ + visitSearchFromFilter?: (ctx: SearchFromFilterContext) => Result; + + /** + * Visit a parse tree produced by the `searchFilterFrom` + * labeled alternative in `OpenSearchPPLParser.searchCommand`. + * @param ctx the parse tree + * @return the visitor result + */ + visitSearchFilterFrom?: (ctx: SearchFilterFromContext) => Result; + + /** + * Visit a parse tree produced by the `statsFunctionCall` + * labeled alternative in `OpenSearchPPLParser.statsFunction`. + * @param ctx the parse tree + * @return the visitor result + */ + visitStatsFunctionCall?: (ctx: StatsFunctionCallContext) => Result; + + /** + * Visit a parse tree produced by the `countAllFunctionCall` + * labeled alternative in `OpenSearchPPLParser.statsFunction`. + * @param ctx the parse tree + * @return the visitor result + */ + visitCountAllFunctionCall?: (ctx: CountAllFunctionCallContext) => Result; + + /** + * Visit a parse tree produced by the `distinctCountFunctionCall` + * labeled alternative in `OpenSearchPPLParser.statsFunction`. + * @param ctx the parse tree + * @return the visitor result + */ + visitDistinctCountFunctionCall?: (ctx: DistinctCountFunctionCallContext) => Result; + + /** + * Visit a parse tree produced by the `percentileAggFunctionCall` + * labeled alternative in `OpenSearchPPLParser.statsFunction`. + * @param ctx the parse tree + * @return the visitor result + */ + visitPercentileAggFunctionCall?: (ctx: PercentileAggFunctionCallContext) => Result; + + /** + * Visit a parse tree produced by the `takeAggFunctionCall` + * labeled alternative in `OpenSearchPPLParser.statsFunction`. + * @param ctx the parse tree + * @return the visitor result + */ + visitTakeAggFunctionCall?: (ctx: TakeAggFunctionCallContext) => Result; + + /** + * Visit a parse tree produced by the `identsAsQualifiedName` + * labeled alternative in `OpenSearchPPLParser.qualifiedName`. + * @param ctx the parse tree + * @return the visitor result + */ + visitIdentsAsQualifiedName?: (ctx: IdentsAsQualifiedNameContext) => Result; + + /** + * Visit a parse tree produced by the `comparsion` + * labeled alternative in `OpenSearchPPLParser.logicalExpression`. + * @param ctx the parse tree + * @return the visitor result + */ + visitComparsion?: (ctx: ComparsionContext) => Result; + + /** + * Visit a parse tree produced by the `logicalNot` + * labeled alternative in `OpenSearchPPLParser.logicalExpression`. + * @param ctx the parse tree + * @return the visitor result + */ + visitLogicalNot?: (ctx: LogicalNotContext) => Result; + + /** + * Visit a parse tree produced by the `logicalOr` + * labeled alternative in `OpenSearchPPLParser.logicalExpression`. + * @param ctx the parse tree + * @return the visitor result + */ + visitLogicalOr?: (ctx: LogicalOrContext) => Result; + + /** + * Visit a parse tree produced by the `logicalAnd` + * labeled alternative in `OpenSearchPPLParser.logicalExpression`. + * @param ctx the parse tree + * @return the visitor result + */ + visitLogicalAnd?: (ctx: LogicalAndContext) => Result; + + /** + * Visit a parse tree produced by the `logicalXor` + * labeled alternative in `OpenSearchPPLParser.logicalExpression`. + * @param ctx the parse tree + * @return the visitor result + */ + visitLogicalXor?: (ctx: LogicalXorContext) => Result; + + /** + * Visit a parse tree produced by the `booleanExpr` + * labeled alternative in `OpenSearchPPLParser.logicalExpression`. + * @param ctx the parse tree + * @return the visitor result + */ + visitBooleanExpr?: (ctx: BooleanExprContext) => Result; + + /** + * Visit a parse tree produced by the `relevanceExpr` + * labeled alternative in `OpenSearchPPLParser.logicalExpression`. + * @param ctx the parse tree + * @return the visitor result + */ + visitRelevanceExpr?: (ctx: RelevanceExprContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.root`. + * @param ctx the parse tree + * @return the visitor result + */ + visitRoot?: (ctx: RootContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.pplStatement`. + * @param ctx the parse tree + * @return the visitor result + */ + visitPplStatement?: (ctx: PplStatementContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.pplCommands`. + * @param ctx the parse tree + * @return the visitor result + */ + visitPplCommands?: (ctx: PplCommandsContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.commands`. + * @param ctx the parse tree + * @return the visitor result + */ + visitCommands?: (ctx: CommandsContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.searchCommand`. + * @param ctx the parse tree + * @return the visitor result + */ + visitSearchCommand?: (ctx: SearchCommandContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.describeCommand`. + * @param ctx the parse tree + * @return the visitor result + */ + visitDescribeCommand?: (ctx: DescribeCommandContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.showCatalogsCommand`. + * @param ctx the parse tree + * @return the visitor result + */ + visitShowCatalogsCommand?: (ctx: ShowCatalogsCommandContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.whereCommand`. + * @param ctx the parse tree + * @return the visitor result + */ + visitWhereCommand?: (ctx: WhereCommandContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.fieldsCommand`. + * @param ctx the parse tree + * @return the visitor result + */ + visitFieldsCommand?: (ctx: FieldsCommandContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.renameCommand`. + * @param ctx the parse tree + * @return the visitor result + */ + visitRenameCommand?: (ctx: RenameCommandContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.statsCommand`. + * @param ctx the parse tree + * @return the visitor result + */ + visitStatsCommand?: (ctx: StatsCommandContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.dedupCommand`. + * @param ctx the parse tree + * @return the visitor result + */ + visitDedupCommand?: (ctx: DedupCommandContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.sortCommand`. + * @param ctx the parse tree + * @return the visitor result + */ + visitSortCommand?: (ctx: SortCommandContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.evalCommand`. + * @param ctx the parse tree + * @return the visitor result + */ + visitEvalCommand?: (ctx: EvalCommandContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.headCommand`. + * @param ctx the parse tree + * @return the visitor result + */ + visitHeadCommand?: (ctx: HeadCommandContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.topCommand`. + * @param ctx the parse tree + * @return the visitor result + */ + visitTopCommand?: (ctx: TopCommandContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.rareCommand`. + * @param ctx the parse tree + * @return the visitor result + */ + visitRareCommand?: (ctx: RareCommandContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.grokCommand`. + * @param ctx the parse tree + * @return the visitor result + */ + visitGrokCommand?: (ctx: GrokCommandContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.parseCommand`. + * @param ctx the parse tree + * @return the visitor result + */ + visitParseCommand?: (ctx: ParseCommandContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.patternsCommand`. + * @param ctx the parse tree + * @return the visitor result + */ + visitPatternsCommand?: (ctx: PatternsCommandContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.patternsParameter`. + * @param ctx the parse tree + * @return the visitor result + */ + visitPatternsParameter?: (ctx: PatternsParameterContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.patternsMethod`. + * @param ctx the parse tree + * @return the visitor result + */ + visitPatternsMethod?: (ctx: PatternsMethodContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.kmeansCommand`. + * @param ctx the parse tree + * @return the visitor result + */ + visitKmeansCommand?: (ctx: KmeansCommandContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.kmeansParameter`. + * @param ctx the parse tree + * @return the visitor result + */ + visitKmeansParameter?: (ctx: KmeansParameterContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.adCommand`. + * @param ctx the parse tree + * @return the visitor result + */ + visitAdCommand?: (ctx: AdCommandContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.adParameter`. + * @param ctx the parse tree + * @return the visitor result + */ + visitAdParameter?: (ctx: AdParameterContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.mlCommand`. + * @param ctx the parse tree + * @return the visitor result + */ + visitMlCommand?: (ctx: MlCommandContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.mlArg`. + * @param ctx the parse tree + * @return the visitor result + */ + visitMlArg?: (ctx: MlArgContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.fromClause`. + * @param ctx the parse tree + * @return the visitor result + */ + visitFromClause?: (ctx: FromClauseContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.tableSourceClause`. + * @param ctx the parse tree + * @return the visitor result + */ + visitTableSourceClause?: (ctx: TableSourceClauseContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.renameClasue`. + * @param ctx the parse tree + * @return the visitor result + */ + visitRenameClasue?: (ctx: RenameClasueContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.byClause`. + * @param ctx the parse tree + * @return the visitor result + */ + visitByClause?: (ctx: ByClauseContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.statsByClause`. + * @param ctx the parse tree + * @return the visitor result + */ + visitStatsByClause?: (ctx: StatsByClauseContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.bySpanClause`. + * @param ctx the parse tree + * @return the visitor result + */ + visitBySpanClause?: (ctx: BySpanClauseContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.spanClause`. + * @param ctx the parse tree + * @return the visitor result + */ + visitSpanClause?: (ctx: SpanClauseContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.sortbyClause`. + * @param ctx the parse tree + * @return the visitor result + */ + visitSortbyClause?: (ctx: SortbyClauseContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.evalClause`. + * @param ctx the parse tree + * @return the visitor result + */ + visitEvalClause?: (ctx: EvalClauseContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.statsAggTerm`. + * @param ctx the parse tree + * @return the visitor result + */ + visitStatsAggTerm?: (ctx: StatsAggTermContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.statsFunction`. + * @param ctx the parse tree + * @return the visitor result + */ + visitStatsFunction?: (ctx: StatsFunctionContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.statsFunctionName`. + * @param ctx the parse tree + * @return the visitor result + */ + visitStatsFunctionName?: (ctx: StatsFunctionNameContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.takeAggFunction`. + * @param ctx the parse tree + * @return the visitor result + */ + visitTakeAggFunction?: (ctx: TakeAggFunctionContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.percentileAggFunction`. + * @param ctx the parse tree + * @return the visitor result + */ + visitPercentileAggFunction?: (ctx: PercentileAggFunctionContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.expression`. + * @param ctx the parse tree + * @return the visitor result + */ + visitExpression?: (ctx: ExpressionContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.logicalExpression`. + * @param ctx the parse tree + * @return the visitor result + */ + visitLogicalExpression?: (ctx: LogicalExpressionContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.comparisonExpression`. + * @param ctx the parse tree + * @return the visitor result + */ + visitComparisonExpression?: (ctx: ComparisonExpressionContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.valueExpression`. + * @param ctx the parse tree + * @return the visitor result + */ + visitValueExpression?: (ctx: ValueExpressionContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.primaryExpression`. + * @param ctx the parse tree + * @return the visitor result + */ + visitPrimaryExpression?: (ctx: PrimaryExpressionContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.constantFunction`. + * @param ctx the parse tree + * @return the visitor result + */ + visitConstantFunction?: (ctx: ConstantFunctionContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.booleanExpression`. + * @param ctx the parse tree + * @return the visitor result + */ + visitBooleanExpression?: (ctx: BooleanExpressionContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.relevanceExpression`. + * @param ctx the parse tree + * @return the visitor result + */ + visitRelevanceExpression?: (ctx: RelevanceExpressionContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.singleFieldRelevanceFunction`. + * @param ctx the parse tree + * @return the visitor result + */ + visitSingleFieldRelevanceFunction?: (ctx: SingleFieldRelevanceFunctionContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.multiFieldRelevanceFunction`. + * @param ctx the parse tree + * @return the visitor result + */ + visitMultiFieldRelevanceFunction?: (ctx: MultiFieldRelevanceFunctionContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.tableSource`. + * @param ctx the parse tree + * @return the visitor result + */ + visitTableSource?: (ctx: TableSourceContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.tableFunction`. + * @param ctx the parse tree + * @return the visitor result + */ + visitTableFunction?: (ctx: TableFunctionContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.fieldList`. + * @param ctx the parse tree + * @return the visitor result + */ + visitFieldList?: (ctx: FieldListContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.wcFieldList`. + * @param ctx the parse tree + * @return the visitor result + */ + visitWcFieldList?: (ctx: WcFieldListContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.sortField`. + * @param ctx the parse tree + * @return the visitor result + */ + visitSortField?: (ctx: SortFieldContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.sortFieldExpression`. + * @param ctx the parse tree + * @return the visitor result + */ + visitSortFieldExpression?: (ctx: SortFieldExpressionContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.fieldExpression`. + * @param ctx the parse tree + * @return the visitor result + */ + visitFieldExpression?: (ctx: FieldExpressionContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.wcFieldExpression`. + * @param ctx the parse tree + * @return the visitor result + */ + visitWcFieldExpression?: (ctx: WcFieldExpressionContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.evalFunctionCall`. + * @param ctx the parse tree + * @return the visitor result + */ + visitEvalFunctionCall?: (ctx: EvalFunctionCallContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.dataTypeFunctionCall`. + * @param ctx the parse tree + * @return the visitor result + */ + visitDataTypeFunctionCall?: (ctx: DataTypeFunctionCallContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.booleanFunctionCall`. + * @param ctx the parse tree + * @return the visitor result + */ + visitBooleanFunctionCall?: (ctx: BooleanFunctionCallContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.convertedDataType`. + * @param ctx the parse tree + * @return the visitor result + */ + visitConvertedDataType?: (ctx: ConvertedDataTypeContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.evalFunctionName`. + * @param ctx the parse tree + * @return the visitor result + */ + visitEvalFunctionName?: (ctx: EvalFunctionNameContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.functionArgs`. + * @param ctx the parse tree + * @return the visitor result + */ + visitFunctionArgs?: (ctx: FunctionArgsContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.functionArg`. + * @param ctx the parse tree + * @return the visitor result + */ + visitFunctionArg?: (ctx: FunctionArgContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.relevanceArg`. + * @param ctx the parse tree + * @return the visitor result + */ + visitRelevanceArg?: (ctx: RelevanceArgContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.relevanceArgName`. + * @param ctx the parse tree + * @return the visitor result + */ + visitRelevanceArgName?: (ctx: RelevanceArgNameContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.relevanceFieldAndWeight`. + * @param ctx the parse tree + * @return the visitor result + */ + visitRelevanceFieldAndWeight?: (ctx: RelevanceFieldAndWeightContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.relevanceFieldWeight`. + * @param ctx the parse tree + * @return the visitor result + */ + visitRelevanceFieldWeight?: (ctx: RelevanceFieldWeightContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.relevanceField`. + * @param ctx the parse tree + * @return the visitor result + */ + visitRelevanceField?: (ctx: RelevanceFieldContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.relevanceQuery`. + * @param ctx the parse tree + * @return the visitor result + */ + visitRelevanceQuery?: (ctx: RelevanceQueryContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.relevanceArgValue`. + * @param ctx the parse tree + * @return the visitor result + */ + visitRelevanceArgValue?: (ctx: RelevanceArgValueContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.mathematicalFunctionBase`. + * @param ctx the parse tree + * @return the visitor result + */ + visitMathematicalFunctionBase?: (ctx: MathematicalFunctionBaseContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.trigonometricFunctionName`. + * @param ctx the parse tree + * @return the visitor result + */ + visitTrigonometricFunctionName?: (ctx: TrigonometricFunctionNameContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.dateAndTimeFunctionBase`. + * @param ctx the parse tree + * @return the visitor result + */ + visitDateAndTimeFunctionBase?: (ctx: DateAndTimeFunctionBaseContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.constantFunctionName`. + * @param ctx the parse tree + * @return the visitor result + */ + visitConstantFunctionName?: (ctx: ConstantFunctionNameContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.conditionFunctionBase`. + * @param ctx the parse tree + * @return the visitor result + */ + visitConditionFunctionBase?: (ctx: ConditionFunctionBaseContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.systemFunctionBase`. + * @param ctx the parse tree + * @return the visitor result + */ + visitSystemFunctionBase?: (ctx: SystemFunctionBaseContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.textFunctionBase`. + * @param ctx the parse tree + * @return the visitor result + */ + visitTextFunctionBase?: (ctx: TextFunctionBaseContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.comparisonOperator`. + * @param ctx the parse tree + * @return the visitor result + */ + visitComparisonOperator?: (ctx: ComparisonOperatorContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.binaryOperator`. + * @param ctx the parse tree + * @return the visitor result + */ + visitBinaryOperator?: (ctx: BinaryOperatorContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.singleFieldRelevanceFunctionName`. + * @param ctx the parse tree + * @return the visitor result + */ + visitSingleFieldRelevanceFunctionName?: (ctx: SingleFieldRelevanceFunctionNameContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.multiFieldRelevanceFunctionName`. + * @param ctx the parse tree + * @return the visitor result + */ + visitMultiFieldRelevanceFunctionName?: (ctx: MultiFieldRelevanceFunctionNameContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.literalValue`. + * @param ctx the parse tree + * @return the visitor result + */ + visitLiteralValue?: (ctx: LiteralValueContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.intervalLiteral`. + * @param ctx the parse tree + * @return the visitor result + */ + visitIntervalLiteral?: (ctx: IntervalLiteralContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.stringLiteral`. + * @param ctx the parse tree + * @return the visitor result + */ + visitStringLiteral?: (ctx: StringLiteralContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.integerLiteral`. + * @param ctx the parse tree + * @return the visitor result + */ + visitIntegerLiteral?: (ctx: IntegerLiteralContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.decimalLiteral`. + * @param ctx the parse tree + * @return the visitor result + */ + visitDecimalLiteral?: (ctx: DecimalLiteralContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.booleanLiteral`. + * @param ctx the parse tree + * @return the visitor result + */ + visitBooleanLiteral?: (ctx: BooleanLiteralContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.datetimeLiteral`. + * @param ctx the parse tree + * @return the visitor result + */ + visitDatetimeLiteral?: (ctx: DatetimeLiteralContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.dateLiteral`. + * @param ctx the parse tree + * @return the visitor result + */ + visitDateLiteral?: (ctx: DateLiteralContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.timeLiteral`. + * @param ctx the parse tree + * @return the visitor result + */ + visitTimeLiteral?: (ctx: TimeLiteralContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.timestampLiteral`. + * @param ctx the parse tree + * @return the visitor result + */ + visitTimestampLiteral?: (ctx: TimestampLiteralContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.intervalUnit`. + * @param ctx the parse tree + * @return the visitor result + */ + visitIntervalUnit?: (ctx: IntervalUnitContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.timespanUnit`. + * @param ctx the parse tree + * @return the visitor result + */ + visitTimespanUnit?: (ctx: TimespanUnitContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.valueList`. + * @param ctx the parse tree + * @return the visitor result + */ + visitValueList?: (ctx: ValueListContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.qualifiedName`. + * @param ctx the parse tree + * @return the visitor result + */ + visitQualifiedName?: (ctx: QualifiedNameContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.wcQualifiedName`. + * @param ctx the parse tree + * @return the visitor result + */ + visitWcQualifiedName?: (ctx: WcQualifiedNameContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.ident`. + * @param ctx the parse tree + * @return the visitor result + */ + visitIdent?: (ctx: IdentContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.wildcard`. + * @param ctx the parse tree + * @return the visitor result + */ + visitWildcard?: (ctx: WildcardContext) => Result; + + /** + * Visit a parse tree produced by `OpenSearchPPLParser.keywordsCanBeId`. + * @param ctx the parse tree + * @return the visitor result + */ + visitKeywordsCanBeId?: (ctx: KeywordsCanBeIdContext) => Result; +} + diff --git a/dashboards-observability/common/query_manager/antlr/ppl_syntax_parser.ts b/dashboards-observability/common/query_manager/antlr/ppl_syntax_parser.ts index 6f62bce1c..9af9bc893 100644 --- a/dashboards-observability/common/query_manager/antlr/ppl_syntax_parser.ts +++ b/dashboards-observability/common/query_manager/antlr/ppl_syntax_parser.ts @@ -20,7 +20,7 @@ export class PPLSyntaxParser { return this.createParser(this.createLexer(query)); } - createLexer(query: string) { + createLexer(query: string = '') { return new OpenSearchPPLLexer(new CaseInsensitiveCharStream(CharStreams.fromString(query))); } diff --git a/dashboards-observability/common/query_manager/ast/builder/stats_ast_builder.ts b/dashboards-observability/common/query_manager/ast/builder/stats_ast_builder.ts index 6a396654a..6556347ab 100644 --- a/dashboards-observability/common/query_manager/ast/builder/stats_ast_builder.ts +++ b/dashboards-observability/common/query_manager/ast/builder/stats_ast_builder.ts @@ -181,17 +181,17 @@ export class StatsAstBuilder visitStatsFunction(ctx: StatsFunctionContext): PPLNode { let funcName = ''; let valueExpr = ''; - - if (typeof ctx.valueExpression === 'function') { + + if (isFunction(ctx.valueExpression)) { valueExpr = this.visitValueExpression(ctx.valueExpression()); - if (typeof ctx.statsFunctionName === 'function') { + if (isFunction(ctx.statsFunctionName)) { funcName = this.visitStatsFunctionName(ctx.statsFunctionName()); } else { funcName = ctx.DISTINCT_COUNT() ? ctx.DISTINCT_COUNT().text : ctx.DC().text; } - } else if (typeof ctx.percentileAggFunction === 'function') { + } else if (isFunction(ctx.percentileAggFunction)) { // for now just return plain text - } else { + } else if (isFunction(ctx.COUNT)) { funcName = ctx.COUNT().text; } @@ -200,7 +200,7 @@ export class StatsAstBuilder [] as Array, funcName, valueExpr, - typeof ctx.percentileAggFunction === 'function' ? ctx.text : '' + isFunction(ctx.percentileAggFunction) ? ctx.text : '' ); } diff --git a/dashboards-observability/common/query_manager/ast/expression/group_by.ts b/dashboards-observability/common/query_manager/ast/expression/group_by.ts index ce6d8ffef..1d0a1ad07 100644 --- a/dashboards-observability/common/query_manager/ast/expression/group_by.ts +++ b/dashboards-observability/common/query_manager/ast/expression/group_by.ts @@ -3,6 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ +import { isEmpty } from 'lodash'; import { PPLNode } from '../node'; import { Field } from './field'; @@ -24,8 +25,11 @@ export class GroupBy extends PPLNode { } toString(): string { - return `by ${this.span ? `${this.span.toString()}${this.fields.length > 0 ? ', ' : ''}` : ''}${this.fields - .map((field) => field.toString()) - .join(', ')}`; + return ( + `${!isEmpty(this.fields) || !isEmpty(this.span) ? 'by ' : ''}` + + `${ + !isEmpty(this.span) ? `${this.span.toString()}${this.fields.length > 0 ? ', ' : ''}` : '' + }${this.fields.map((field) => field.toString()).join(', ')}` + ); } } diff --git a/dashboards-observability/common/query_manager/utils/index.ts b/dashboards-observability/common/query_manager/utils/index.ts index b8644f050..bdc77f38f 100644 --- a/dashboards-observability/common/query_manager/utils/index.ts +++ b/dashboards-observability/common/query_manager/utils/index.ts @@ -5,6 +5,7 @@ import { CUSTOM_LABEL } from '../../../common/constants/explorer'; import { AggregationConfigurations, PreviouslyParsedStaleStats } from '../ast/types'; +import { removeBacktick } from '../../../common/utils'; export const composeAggregations = ( aggConfig: AggregationConfigurations, @@ -23,7 +24,7 @@ export const composeAggregations = ( group_fields: [ ...(aggConfig.dimensions || []), ...(aggConfig.breakdowns || []), - ].map((dimension) => ({ name: dimension.name })), + ].map((dimension) => ({ name: `\`${removeBacktick(dimension.name)}\`` })), ...(aggConfig.span && JSON.stringify(aggConfig?.span) !== '{}' && { span: composeSpan(aggConfig.span) }), }, @@ -34,7 +35,7 @@ export const composeAggregations = ( }; }; -const composeSpan = (spanConfig) => { +export const composeSpan = (spanConfig) => { return { [CUSTOM_LABEL]: spanConfig[CUSTOM_LABEL] ?? '', span_expression: { diff --git a/dashboards-observability/common/types/explorer.ts b/dashboards-observability/common/types/explorer.ts index 27cad10e8..cf4ade2f6 100644 --- a/dashboards-observability/common/types/explorer.ts +++ b/dashboards-observability/common/types/explorer.ts @@ -34,6 +34,7 @@ import TimestampUtils from '../../public/services/timestamp/timestamp'; import PPLService from '../../public/services/requests/ppl'; import DSLService from '../../public/services/requests/dsl'; import { SavedObjectsStart } from '../../../../src/core/public/saved_objects'; + export interface IQueryTab { id: string; name: React.ReactNode | string; @@ -139,7 +140,7 @@ export interface IExplorerProps { appBaseQuery?: string; callback?: any; callbackInApp?: any; - queryManager: QueryManager; + queryManager?: QueryManager; } export interface SavedQuery { @@ -147,8 +148,8 @@ export interface SavedQuery { name: string; query: string; selected_date_range: { start: string; end: string; text: string }; - selected_fields: { text: string; tokens: [{ name: string; type: string }] }; - selected_timestamp: { name: string; type: string }; + selected_fields: { text: string; tokens: IField[] }; + selected_timestamp: IField; } export interface SavedVisualization { @@ -157,7 +158,7 @@ export interface SavedVisualization { query: string; selected_date_range: { start: string; end: string; text: string }; selected_fields: { text: string; tokens: [] }; - selected_timestamp: { name: string; type: string }; + selected_timestamp: IField; type: string; application_id?: string; } @@ -284,6 +285,13 @@ export interface LiveTailProps { dataTestSubj: string; } +export interface PatternTableData { + count: number; + pattern: string; + sampleLog: string; + anomalyCount?: number; +}; + export interface ConfigListEntry { label: string; aggregation: string; diff --git a/dashboards-observability/common/types/metrics.ts b/dashboards-observability/common/types/metrics.ts new file mode 100644 index 000000000..64ebd07ab --- /dev/null +++ b/dashboards-observability/common/types/metrics.ts @@ -0,0 +1,22 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +import { VisualizationType } from './custom_panels'; + +export interface MetricData { + metricId: string; + metricType: 'savedCustomMetric' | 'prometheusMetric'; + metricName: string; +} + +export interface MetricType extends VisualizationType { + id: string; + savedVisualizationId: string; + x: number; + y: number; + w: number; + h: number; + metricType: 'savedCustomMetric' | 'prometheusMetric'; +} diff --git a/dashboards-observability/common/utils/index.ts b/dashboards-observability/common/utils/index.ts index 6999e7cd3..8ec98b14f 100644 --- a/dashboards-observability/common/utils/index.ts +++ b/dashboards-observability/common/utils/index.ts @@ -3,5 +3,11 @@ * SPDX-License-Identifier: Apache-2.0 */ -export { getIndexPatternFromRawQuery, preprocessQuery, buildQuery, composeFinalQuery } from './query_utils'; +export { + getIndexPatternFromRawQuery, + preprocessQuery, + buildQuery, + composeFinalQuery, + removeBacktick, +} from './query_utils'; export { uiSettingsService } from './settings_service'; diff --git a/dashboards-observability/common/utils/query_utils.ts b/dashboards-observability/common/utils/query_utils.ts index 977014146..eec15aa2d 100644 --- a/dashboards-observability/common/utils/query_utils.ts +++ b/dashboards-observability/common/utils/query_utils.ts @@ -5,13 +5,25 @@ import datemath from '@elastic/datemath'; import { isEmpty } from 'lodash'; -import { DATE_PICKER_FORMAT } from '../../common/constants/explorer'; +import { + DATE_PICKER_FORMAT, + PPL_DEFAULT_PATTERN_REGEX_FILETER, +} from '../../common/constants/explorer'; import { PPL_INDEX_INSERT_POINT_REGEX, PPL_INDEX_REGEX, PPL_NEWLINE_REGEX, + PPL_STATS_REGEX, } from '../../common/constants/shared'; +/** + * @param literal - string literal that will be put inside single quotes in PPL command + * @returns string with inner single quotes escaped + */ +const escapeQuotes = (literal: string) => { + return literal.replaceAll("'", "''"); +}; + export const getIndexPatternFromRawQuery = (query: string): string => { const matches = query.match(PPL_INDEX_REGEX); if (matches) { @@ -27,12 +39,18 @@ export const preprocessQuery = ({ endTime, timeField, isLiveQuery, + selectedPatternField, + patternRegex, + filteredPattern, }: { rawQuery: string; startTime: string; endTime: string; timeField?: string; isLiveQuery: boolean; + selectedPatternField?: string; + patternRegex?: string; + filteredPattern?: string; }) => { let finalQuery = ''; @@ -48,9 +66,40 @@ export const preprocessQuery = ({ finalQuery = `${tokens![1]}=${ tokens![2] } | where ${timeField} >= '${start}' and ${timeField} <= '${end}'${tokens![3]}`; + if (isLiveQuery) { finalQuery = finalQuery + ` | sort - ${timeField}`; } + + // if a pattern is selected as filter, build it into finalQuery + if (selectedPatternField && filteredPattern) + finalQuery = buildPatternsQuery( + finalQuery, + selectedPatternField, + patternRegex, + filteredPattern + ); + + return finalQuery; +}; + +export const buildPatternsQuery = ( + baseQuery: string, + selectedPatternField?: string, + patternRegex?: string, + filteredPattern?: string +) => { + let finalQuery = baseQuery; + if (selectedPatternField) { + finalQuery += ` | patterns `; + if (patternRegex && patternRegex !== PPL_DEFAULT_PATTERN_REGEX_FILETER) { + finalQuery += `pattern='${escapeQuotes(patternRegex)}' `; + } + finalQuery += `\`${selectedPatternField}\` `; + if (filteredPattern) { + finalQuery += `| where patterns_field='${escapeQuotes(filteredPattern)}'`; + } + } return finalQuery; }; @@ -73,9 +122,12 @@ export const composeFinalQuery = ( endingTime: string, timeField: string, isLiveQuery: boolean, - appBaseQuery: string + appBaseQuery: string, + selectedPatternField?: string, + patternRegex?: string, + filteredPattern?: string ) => { - const fullQuery = buildQuery(appBaseQuery, curQuery); + const fullQuery = curQuery.includes(appBaseQuery) ? curQuery : buildQuery(appBaseQuery, curQuery); if (isEmpty(fullQuery)) return ''; return preprocessQuery({ rawQuery: fullQuery, @@ -83,5 +135,13 @@ export const composeFinalQuery = ( endTime: endingTime, timeField, isLiveQuery, + selectedPatternField, + patternRegex, + filteredPattern, }); }; + +export const removeBacktick = (stringContainsBacktick: string) => { + if (!stringContainsBacktick) return ''; + return stringContainsBacktick.replace(/`/g, ''); +}; diff --git a/dashboards-observability/package.json b/dashboards-observability/package.json index 7626c0681..617f86afb 100644 --- a/dashboards-observability/package.json +++ b/dashboards-observability/package.json @@ -47,6 +47,8 @@ "lodash": "^4.17.21", "glob-parent": "^6.0.1", "ansi-regex": "^5.0.1", - "json-schema": "^0.4.0" + "json-schema": "^0.4.0", + "qs": "~6.5.3", + "minimatch": "^3.0.5" } } diff --git a/dashboards-observability/public/components/app.tsx b/dashboards-observability/public/components/app.tsx index 307a0edcf..20538007a 100644 --- a/dashboards-observability/public/components/app.tsx +++ b/dashboards-observability/public/components/app.tsx @@ -4,17 +4,19 @@ */ import { I18nProvider } from '@osd/i18n/react'; +import { QueryManager } from 'common/query_manager'; import React from 'react'; import { Provider } from 'react-redux'; import { HashRouter, Route, Switch } from 'react-router-dom'; -import { QueryManager } from 'common/query_manager'; import { CoreStart } from '../../../../src/core/public'; import { observabilityID, observabilityTitle } from '../../common/constants/shared'; import store from '../framework/redux/store'; import { AppPluginStartDependencies } from '../types'; import { Home as ApplicationAnalyticsHome } from './application_analytics/home'; +import { MetricsListener } from './common/metrics_listener'; import { Home as CustomPanelsHome } from './custom_panels/home'; import { EventAnalytics } from './event_analytics'; +import { Home as MetricsHome } from './metrics/index'; import { Main as NotebooksHome } from './notebooks/components/main'; import { Home as TraceAnalyticsHome } from './trace_analytics/home'; @@ -57,8 +59,27 @@ export const App = ({ - <> + + { + chrome.setBreadcrumbs([ + parentBreadcrumb, + { text: 'Metrics analytics', href: '#/metrics_analytics/' }, + ]); + return ( + + ); + }} + /> { @@ -73,6 +94,7 @@ export const App = ({ dslService={dslService} savedObjects={savedObjects} timestampUtils={timestampUtils} + queryManager={queryManager} /> ); }} @@ -140,7 +162,7 @@ export const App = ({ }} /> - + diff --git a/dashboards-observability/public/components/application_analytics/components/application.tsx b/dashboards-observability/public/components/application_analytics/components/application.tsx index ba5132be7..69006f179 100644 --- a/dashboards-observability/public/components/application_analytics/components/application.tsx +++ b/dashboards-observability/public/components/application_analytics/components/application.tsx @@ -66,6 +66,7 @@ import { ServiceDetailFlyout } from './flyout_components/service_detail_flyout'; import { SpanDetailFlyout } from '../../../../public/components/trace_analytics/components/traces/span_detail_flyout'; import { TraceDetailFlyout } from './flyout_components/trace_detail_flyout'; import { fetchAppById, initializeTabData } from '../helpers/utils'; +import { QueryManager } from '../../../../common/query_manager/ppl_query_manager'; const searchBarConfigs = { [TAB_EVENT_ID]: { @@ -86,6 +87,7 @@ interface AppDetailProps extends AppAnalyticsComponentDeps { savedObjects: SavedObjects; timestampUtils: TimestampUtils; notifications: NotificationsStart; + queryManager: QueryManager; updateApp: (appId: string, updateAppData: Partial, type: string) => void; setToasts: (title: string, color?: string, text?: ReactChild) => void; callback: (childfunction: () => void) => void; @@ -110,6 +112,7 @@ export function Application(props: AppDetailProps) { setToasts, setFilters, callback, + queryManager, } = props; const [application, setApplication] = useState({ id: '', @@ -374,9 +377,10 @@ export function Application(props: AppDetailProps) { endTime={appEndTime} setStartTime={setStartTimeForApp} setEndTime={setEndTimeForApp} - appBaseQuery={application.baseQuery} + appBaseQuery={application.baseQuery.trim()} callback={callback} callbackInApp={callbackInApp} + queryManager={queryManager} curSelectedTabId={selectedTabId} /> ); diff --git a/dashboards-observability/public/components/application_analytics/components/config_components/trace_config.tsx b/dashboards-observability/public/components/application_analytics/components/config_components/trace_config.tsx index e0ff9a1bb..92d0d40bf 100644 --- a/dashboards-observability/public/components/application_analytics/components/config_components/trace_config.tsx +++ b/dashboards-observability/public/components/application_analytics/components/config_components/trace_config.tsx @@ -55,7 +55,7 @@ export const TraceConfig = (props: TraceConfigProps) => { useEffect(() => { setLoading(true); const timeFilterDSL = filtersToDsl([], '', startTime, endTime); - const latencyTrendStartTime = dateMath.parse(endTime)?.subtract(24, 'hours').toISOString()!; + const latencyTrendStartTime = dateMath.parse(endTime, { roundUp: true })?.subtract(24, 'hours').toISOString()!; const latencyTrendDSL = filtersToDsl(filters, query, latencyTrendStartTime, endTime); handleDashboardRequest( http, diff --git a/dashboards-observability/public/components/application_analytics/helpers/utils.tsx b/dashboards-observability/public/components/application_analytics/helpers/utils.tsx index f212a3caf..a9df996b1 100644 --- a/dashboards-observability/public/components/application_analytics/helpers/utils.tsx +++ b/dashboards-observability/public/components/application_analytics/helpers/utils.tsx @@ -10,6 +10,7 @@ import { FilterType } from 'public/components/trace_analytics/components/common/ import React, { Dispatch, ReactChild } from 'react'; import { batch } from 'react-redux'; import PPLService from 'public/services/requests/ppl'; +import { IField } from '../../../../common/types/explorer'; import { preprocessQuery } from '../../../../common/utils/query_utils'; import { SPAN_REGEX } from '../../../../common/constants/shared'; import { fetchVisualizationById } from '../../../components/custom_panels/helpers/utils'; @@ -36,6 +37,10 @@ import { remove as removeQueryResult, } from '../../event_analytics/redux/slices/query_result_slice'; import { addTab, removeTab } from '../../event_analytics/redux/slices/query_tab_slice'; +import { + init as initPatterns, + remove as removePatterns, +} from '../../event_analytics/redux/slices/patterns_slice'; // Name validation export const isNameValid = (name: string, existingNames: string[]) => { @@ -153,6 +158,7 @@ export const removeTabData = ( [NEW_SELECTED_QUERY_TAB]: newIdToFocus, }) ); + dispatch(removePatterns({ tabId: TabIdToBeClosed })); }); }; @@ -172,6 +178,7 @@ export const initializeTabData = async (dispatch: Dispatch, tabId: string, }, }) ); + dispatch(initPatterns({ tabId })); }); }; @@ -234,7 +241,7 @@ export const calculateAvailability = async ( }) .then((res) => { const stat = res.metadata.fields.filter( - (field: { name: string; type: string }) => !field.name.match(SPAN_REGEX) + (field: IField) => !field.name.match(SPAN_REGEX) )[0].name; const value = res.data[stat]; currValue = value[value.length - 1]; diff --git a/dashboards-observability/public/components/application_analytics/home.tsx b/dashboards-observability/public/components/application_analytics/home.tsx index 95ab3d978..4e44470fd 100644 --- a/dashboards-observability/public/components/application_analytics/home.tsx +++ b/dashboards-observability/public/components/application_analytics/home.tsx @@ -38,6 +38,7 @@ import { CUSTOM_PANELS_API_PREFIX, CUSTOM_PANELS_DOCUMENTATION_URL, } from '../../../common/constants/custom_panels'; +import { QueryManager } from '../../../common/query_manager/ppl_query_manager'; export type AppAnalyticsCoreDeps = TraceAnalyticsCoreDeps; @@ -47,6 +48,7 @@ interface HomeProps extends RouteComponentProps, AppAnalyticsCoreDeps { savedObjects: SavedObjects; timestampUtils: TimestampUtils; notifications: NotificationsStart; + queryManager: QueryManager; } export interface AppAnalyticsComponentDeps extends TraceAnalyticsComponentDeps { @@ -69,6 +71,7 @@ export const Home = (props: HomeProps) => { http, chrome, notifications, + queryManager, } = props; const [triggerSwitchToEvent, setTriggerSwitchToEvent] = useState(0); const dispatch = useDispatch(); @@ -435,6 +438,7 @@ export const Home = (props: HomeProps) => { setToasts={setToast} updateApp={updateApp} callback={callback} + queryManager={queryManager} {...commonProps} /> )} diff --git a/dashboards-observability/public/components/common/metrics_listener.tsx b/dashboards-observability/public/components/common/metrics_listener.tsx new file mode 100644 index 000000000..ab971bb51 --- /dev/null +++ b/dashboards-observability/public/components/common/metrics_listener.tsx @@ -0,0 +1,31 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +import React from 'react'; +import { HttpStart } from '../../../../../src/core/public'; +import { OBSERVABILITY_BASE } from '../../../common/constants/shared'; + +interface MetricsListenerProps { + http: HttpStart; +} + +export const MetricsListener: React.FC = (props) => { + const incrementCountMetric = (element?: string | null) => { + if (!element) return; + props.http.post(`${OBSERVABILITY_BASE}/stats`, { + body: JSON.stringify({ element }), + }); + }; + + const onClick: React.MouseEventHandler = (e) => { + incrementCountMetric( + (e.target as HTMLElement | null) + ?.closest('[data-click-metric-element]') + ?.getAttribute('data-click-metric-element') + ); + }; + + return
{props.children}
; +}; diff --git a/dashboards-observability/public/components/common/search/search.test.tsx b/dashboards-observability/public/components/common/search/search.test.tsx index 6a7543fec..f204369c4 100644 --- a/dashboards-observability/public/components/common/search/search.test.tsx +++ b/dashboards-observability/public/components/common/search/search.test.tsx @@ -33,6 +33,7 @@ describe('Search bar', () => { const popoverItems = jest.fn(); const isLiveTailOn = jest.fn(); const countDistribution = jest.fn(); + const setMetricLabel = jest.fn(); const utils = render( { popoverItems={popoverItems} isLiveTailOn={isLiveTailOn} countDistribution={countDistribution} + curVisId={'line'} + spanValue={false} + setSubType={'metric'} + setMetricMeasure={'hours (h)'} + setMetricLabel={setMetricLabel} /> ); diff --git a/dashboards-observability/public/components/common/search/search.tsx b/dashboards-observability/public/components/common/search/search.tsx index ed9f85381..f6d30725a 100644 --- a/dashboards-observability/public/components/common/search/search.tsx +++ b/dashboards-observability/public/components/common/search/search.tsx @@ -83,6 +83,13 @@ export const Search = (props: any) => { setIsLiveTailPopoverOpen, liveTailName, searchError = null, + curVisId, + spanValue, + setSubType, + metricMeasure, + setMetricMeasure, + setMetricLabel, + metricChecked, } = props; const appLogEvents = tabId.match(APP_ANALYTICS_TAB_ID_REGEX); @@ -214,7 +221,15 @@ export const Search = (props: any) => { showOptionList={ showSavePanelOptionsList && searchBarConfigs[selectedSubTabId]?.showSavePanelOptionsList + } + curVisId={curVisId} + spanValue={spanValue} + setSubType={setSubType} + metricMeasure={metricMeasure} + setMetricMeasure={setMetricMeasure} + setMetricLabel={setMetricLabel} + metricChecked={metricChecked} /> diff --git a/dashboards-observability/public/components/common/side_nav.tsx b/dashboards-observability/public/components/common/side_nav.tsx index 0f63ed243..cf6f46714 100644 --- a/dashboards-observability/public/components/common/side_nav.tsx +++ b/dashboards-observability/public/components/common/side_nav.tsx @@ -79,13 +79,18 @@ export function ObservabilitySideBar(props: { children: React.ReactNode }) { href: '#/event_analytics', }, { - name: 'Operational panels', + name: 'Metrics analytics', id: 4, + href: '#/metrics_analytics/', + }, + { + name: 'Operational panels', + id: 5, href: '#/operational_panels/', }, { name: 'Notebooks', - id: 5, + id: 6, href: '#/notebooks', }, ], diff --git a/dashboards-observability/public/components/custom_panels/helpers/__tests__/__snapshots__/utils.test.tsx.snap b/dashboards-observability/public/components/custom_panels/helpers/__tests__/__snapshots__/utils.test.tsx.snap index a61ee008d..5876133be 100644 --- a/dashboards-observability/public/components/custom_panels/helpers/__tests__/__snapshots__/utils.test.tsx.snap +++ b/dashboards-observability/public/components/custom_panels/helpers/__tests__/__snapshots__/utils.test.tsx.snap @@ -135,7 +135,29 @@ exports[`Utils helper functions renders displayVisualization function 1`] = ` "size": 4, "status": 200, }, - "userConfigs": Object {}, + "userConfigs": Object { + "availabilityConfig": Object {}, + "dataConfig": Object { + "breakdowns": Array [], + "dimensions": Array [ + Object { + "customLabel": "", + "label": "Carrier", + "name": "Carrier", + }, + ], + "series": Array [ + Object { + "aggregation": "sum", + "customLabel": "delays", + "label": "FlightDelayMin", + "name": "FlightDelayMin", + }, + ], + "span": undefined, + }, + "layoutConfig": Object {}, + }, }, "vis": Object { "barwidth": 0.97, @@ -578,7 +600,29 @@ exports[`Utils helper functions renders displayVisualization function 1`] = ` "size": 4, "status": 200, }, - "userConfigs": Object {}, + "userConfigs": Object { + "availabilityConfig": Object {}, + "dataConfig": Object { + "breakdowns": Array [], + "dimensions": Array [ + Object { + "customLabel": "", + "label": "Carrier", + "name": "Carrier", + }, + ], + "series": Array [ + Object { + "aggregation": "sum", + "customLabel": "delays", + "label": "FlightDelayMin", + "name": "FlightDelayMin", + }, + ], + "span": undefined, + }, + "layoutConfig": Object {}, + }, }, "vis": Object { "barwidth": 0.97, @@ -1028,7 +1072,29 @@ exports[`Utils helper functions renders displayVisualization function 1`] = ` "size": 4, "status": 200, }, - "userConfigs": Object {}, + "userConfigs": Object { + "availabilityConfig": Object {}, + "dataConfig": Object { + "breakdowns": Array [], + "dimensions": Array [ + Object { + "customLabel": "", + "label": "Carrier", + "name": "Carrier", + }, + ], + "series": Array [ + Object { + "aggregation": "sum", + "customLabel": "delays", + "label": "FlightDelayMin", + "name": "FlightDelayMin", + }, + ], + "span": undefined, + }, + "layoutConfig": Object {}, + }, }, "vis": Object { "barwidth": 0.97, @@ -1345,7 +1411,41 @@ exports[`Utils helper functions renders displayVisualization function 1`] = ` "responsive": true, } } - data={Array []} + data={ + Array [ + Object { + "hoverinfo": "all", + "marker": Object { + "color": "rgba(60,161,199,0.35)", + "line": Object { + "color": "#3CA1C7", + "width": 2, + }, + }, + "name": "delays", + "orientation": "v", + "type": "bar", + "x": Array [ + "BeatsWest", + "Logstash Airways", + "OpenSearch Dashboards Airlines", + "OpenSearch-Air", + ], + "y": Array [ + undefined, + undefined, + undefined, + undefined, + ], + }, + Object { + "mode": "text", + "text": Array [], + "x": Array [], + "y": Array [], + }, + ] + } layout={ Object { "bargap": 0.30000000000000004, @@ -1374,6 +1474,7 @@ exports[`Utils helper functions renders displayVisualization function 1`] = ` "r": 5, "t": 50, }, + "shapes": Array [], "showlegend": "show", "title": "", "xaxis": Object { @@ -1400,7 +1501,41 @@ exports[`Utils helper functions renders displayVisualization function 1`] = ` "responsive": true, } } - data={Array []} + data={ + Array [ + Object { + "hoverinfo": "all", + "marker": Object { + "color": "rgba(60,161,199,0.35)", + "line": Object { + "color": "#3CA1C7", + "width": 2, + }, + }, + "name": "delays", + "orientation": "v", + "type": "bar", + "x": Array [ + "BeatsWest", + "Logstash Airways", + "OpenSearch Dashboards Airlines", + "OpenSearch-Air", + ], + "y": Array [ + undefined, + undefined, + undefined, + undefined, + ], + }, + Object { + "mode": "text", + "text": Array [], + "x": Array [], + "y": Array [], + }, + ] + } debug={false} divId="explorerPlotComponent" layout={ @@ -1432,6 +1567,7 @@ exports[`Utils helper functions renders displayVisualization function 1`] = ` "r": 5, "t": 50, }, + "shapes": Array [], "showlegend": "show", "title": "", "xaxis": Object { @@ -1613,7 +1749,39 @@ exports[`Utils helper functions renders displayVisualization function 2`] = ` "size": 4, "status": 200, }, - "userConfigs": Object {}, + "userConfigs": Object { + "availabilityConfig": Object {}, + "dataConfig": Object { + "breakdowns": Array [], + "dimensions": Array [], + "series": Array [ + Object { + "aggregation": "avg", + "customLabel": "", + "label": "machine.ram", + "name": "machine.ram", + }, + ], + "span": Object { + "interval": "1", + "time_field": Array [ + Object { + "label": "timestamp", + "name": "timestamp", + "type": "timestamp", + }, + ], + "unit": Array [ + Object { + "label": "Day", + "text": "Day", + "value": "d", + }, + ], + }, + }, + "layoutConfig": Object {}, + }, }, "vis": Object { "category": "Visualizations", @@ -1885,20 +2053,6 @@ exports[`Utils helper functions renders displayVisualization function 2`] = ` }, ], }, - Object { - "editor": [Function], - "id": "yaxis-side", - "mapTo": "seriesPosition", - "name": "Series label position", - "schemas": Array [], - }, - Object { - "editor": [Function], - "id": "color-theme", - "mapTo": "colorTheme", - "name": "Color theme", - "schemas": Array [], - }, Object { "defaultState": Array [], "editor": [Function], @@ -2121,7 +2275,39 @@ exports[`Utils helper functions renders displayVisualization function 2`] = ` "size": 4, "status": 200, }, - "userConfigs": Object {}, + "userConfigs": Object { + "availabilityConfig": Object {}, + "dataConfig": Object { + "breakdowns": Array [], + "dimensions": Array [], + "series": Array [ + Object { + "aggregation": "avg", + "customLabel": "", + "label": "machine.ram", + "name": "machine.ram", + }, + ], + "span": Object { + "interval": "1", + "time_field": Array [ + Object { + "label": "timestamp", + "name": "timestamp", + "type": "timestamp", + }, + ], + "unit": Array [ + Object { + "label": "Day", + "text": "Day", + "value": "d", + }, + ], + }, + }, + "layoutConfig": Object {}, + }, }, "vis": Object { "category": "Visualizations", @@ -2393,20 +2579,6 @@ exports[`Utils helper functions renders displayVisualization function 2`] = ` }, ], }, - Object { - "editor": [Function], - "id": "yaxis-side", - "mapTo": "seriesPosition", - "name": "Series label position", - "schemas": Array [], - }, - Object { - "editor": [Function], - "id": "color-theme", - "mapTo": "colorTheme", - "name": "Color theme", - "schemas": Array [], - }, Object { "defaultState": Array [], "editor": [Function], @@ -2643,7 +2815,39 @@ exports[`Utils helper functions renders displayVisualization function 2`] = ` "size": 4, "status": 200, }, - "userConfigs": Object {}, + "userConfigs": Object { + "availabilityConfig": Object {}, + "dataConfig": Object { + "breakdowns": Array [], + "dimensions": Array [], + "series": Array [ + Object { + "aggregation": "avg", + "customLabel": "", + "label": "machine.ram", + "name": "machine.ram", + }, + ], + "span": Object { + "interval": "1", + "time_field": Array [ + Object { + "label": "timestamp", + "name": "timestamp", + "type": "timestamp", + }, + ], + "unit": Array [ + Object { + "label": "Day", + "text": "Day", + "value": "d", + }, + ], + }, + }, + "layoutConfig": Object {}, + }, }, "vis": Object { "category": "Visualizations", @@ -2915,20 +3119,6 @@ exports[`Utils helper functions renders displayVisualization function 2`] = ` }, ], }, - Object { - "editor": [Function], - "id": "yaxis-side", - "mapTo": "seriesPosition", - "name": "Series label position", - "schemas": Array [], - }, - Object { - "editor": [Function], - "id": "color-theme", - "mapTo": "colorTheme", - "name": "Color theme", - "schemas": Array [], - }, Object { "defaultState": Array [], "editor": [Function], @@ -3014,83 +3204,201 @@ exports[`Utils helper functions renders displayVisualization function 2`] = ` } } > - -
- -
- -
- - - - - - -
- -

- - - No results found - - -

-
- -
- -
- - + id="explorerPlotComponent" + style={ + Object { + "height": "100%", + "width": "100%", + } + } + /> + + @@ -3232,7 +3540,29 @@ exports[`Utils helper functions renders displayVisualization function 3`] = ` "size": 4, "status": 200, }, - "userConfigs": Object {}, + "userConfigs": Object { + "availabilityConfig": Object {}, + "dataConfig": Object { + "breakdowns": Array [], + "dimensions": Array [ + Object { + "customLabel": "", + "label": "machine.os", + "name": "machine.os", + }, + ], + "series": Array [ + Object { + "aggregation": "avg", + "customLabel": "", + "label": "machine.ram", + "name": "machine.ram", + }, + ], + "span": undefined, + }, + "layoutConfig": Object {}, + }, }, "vis": Object { "barwidth": 0.97, @@ -3675,7 +4005,29 @@ exports[`Utils helper functions renders displayVisualization function 3`] = ` "size": 4, "status": 200, }, - "userConfigs": Object {}, + "userConfigs": Object { + "availabilityConfig": Object {}, + "dataConfig": Object { + "breakdowns": Array [], + "dimensions": Array [ + Object { + "customLabel": "", + "label": "machine.os", + "name": "machine.os", + }, + ], + "series": Array [ + Object { + "aggregation": "avg", + "customLabel": "", + "label": "machine.ram", + "name": "machine.ram", + }, + ], + "span": undefined, + }, + "layoutConfig": Object {}, + }, }, "vis": Object { "barwidth": 0.97, @@ -4125,7 +4477,29 @@ exports[`Utils helper functions renders displayVisualization function 3`] = ` "size": 4, "status": 200, }, - "userConfigs": Object {}, + "userConfigs": Object { + "availabilityConfig": Object {}, + "dataConfig": Object { + "breakdowns": Array [], + "dimensions": Array [ + Object { + "customLabel": "", + "label": "machine.os", + "name": "machine.os", + }, + ], + "series": Array [ + Object { + "aggregation": "avg", + "customLabel": "", + "label": "machine.ram", + "name": "machine.ram", + }, + ], + "span": undefined, + }, + "layoutConfig": Object {}, + }, }, "vis": Object { "barwidth": 0.97, @@ -4442,7 +4816,41 @@ exports[`Utils helper functions renders displayVisualization function 3`] = ` "responsive": true, } } - data={Array []} + data={ + Array [ + Object { + "hoverinfo": "all", + "marker": Object { + "color": "rgba(60,161,199,0.35)", + "line": Object { + "color": "#3CA1C7", + "width": 2, + }, + }, + "name": "avg(machine.ram)", + "orientation": "h", + "type": "bar", + "x": Array [ + undefined, + undefined, + undefined, + undefined, + ], + "y": Array [ + "", + "", + "", + "", + ], + }, + Object { + "mode": "text", + "text": Array [], + "x": Array [], + "y": Array [], + }, + ] + } layout={ Object { "bargap": 0.30000000000000004, @@ -4471,6 +4879,7 @@ exports[`Utils helper functions renders displayVisualization function 3`] = ` "r": 5, "t": 50, }, + "shapes": Array [], "showlegend": "show", "title": "", "xaxis": Object { @@ -4497,7 +4906,41 @@ exports[`Utils helper functions renders displayVisualization function 3`] = ` "responsive": true, } } - data={Array []} + data={ + Array [ + Object { + "hoverinfo": "all", + "marker": Object { + "color": "rgba(60,161,199,0.35)", + "line": Object { + "color": "#3CA1C7", + "width": 2, + }, + }, + "name": "avg(machine.ram)", + "orientation": "h", + "type": "bar", + "x": Array [ + undefined, + undefined, + undefined, + undefined, + ], + "y": Array [ + "", + "", + "", + "", + ], + }, + Object { + "mode": "text", + "text": Array [], + "x": Array [], + "y": Array [], + }, + ] + } debug={false} divId="explorerPlotComponent" layout={ @@ -4529,6 +4972,7 @@ exports[`Utils helper functions renders displayVisualization function 3`] = ` "r": 5, "t": 50, }, + "shapes": Array [], "showlegend": "show", "title": "", "xaxis": Object { diff --git a/dashboards-observability/public/components/custom_panels/helpers/utils.tsx b/dashboards-observability/public/components/custom_panels/helpers/utils.tsx index 855dd55b8..226153b13 100644 --- a/dashboards-observability/public/components/custom_panels/helpers/utils.tsx +++ b/dashboards-observability/public/components/custom_panels/helpers/utils.tsx @@ -18,6 +18,9 @@ import { CUSTOM_PANELS_API_PREFIX } from '../../../../common/constants/custom_pa import { VisualizationType, SavedVisualizationType } from '../../../../common/types/custom_panels'; import { Visualization } from '../../visualizations/visualization'; import { getVizContainerProps } from '../../../components/visualizations/charts/helpers'; +import { QueryManager } from '../../../../common/query_manager'; +import { getDefaultVisConfig } from '../../event_analytics/utils'; +import { removeBacktick } from '../../../../common/utils'; /* * "Utils" This file contains different reused functions in operational panels @@ -75,6 +78,24 @@ export const mergeLayoutAndVisualizations = ( setPanelVisualizations(newPanelVisualizations); }; +/* Update Span interval for a Query + * Input query -> source = opensearch_dashboards_sample_data_logs | stats avg(bytes) by span(timestamp,1d) + * spanParam -> 1M + * + * Updates the span command interval + * Returns -> source = opensearch_dashboards_sample_data_logs | stats avg(bytes) by span(timestamp,1M) + */ +export const updateQuerySpanInterval = ( + query: string, + timestampField: string, + spanParam: string +) => { + return query.replace( + new RegExp(`span\\(\\s*${timestampField}\\s*,(.*?)\\)`), + `span(${timestampField},${spanParam})` + ); +}; + /* Builds Final Query by adding time and query filters(From panel UI) to the original visualization query * -> Final Query is as follows: * -> finalQuery = indexPartOfQuery + timeQueryFilter + panelFilterQuery + filterPartOfQuery @@ -82,6 +103,7 @@ export const mergeLayoutAndVisualizations = ( * + | where utc_time > ‘2021-07-01 00:00:00’ and utc_time < ‘2021-07-02 00:00:00’ * + | where Carrier='OpenSearch-Air' * + | stats sum(FlightDelayMin) as delays by Carrier + * */ const queryAccumulator = ( originalQuery: string, @@ -100,7 +122,9 @@ const queryAccumulator = ( startTime )}' and ${timestampField} <= '${convertDateTime(endTime, false)}'`; const pplFilterQuery = panelFilterQuery === '' ? '' : ` | ${panelFilterQuery}`; - return indexPartOfQuery + timeQueryFilter + pplFilterQuery + filterPartOfQuery; + + const finalQuery = indexPartOfQuery + timeQueryFilter + pplFilterQuery + filterPartOfQuery; + return finalQuery; }; // PPL Service requestor @@ -143,7 +167,6 @@ export const fetchVisualizationById = async ( setIsError(`Could not locate saved visualization id:${savedVisualizationId}`); console.error('Issue in fetching the saved Visualization by Id', err); }); - return savedVisualization; }; @@ -185,6 +208,7 @@ export const renderSavedVisualization = async ( startTime: string, endTime: string, filterQuery: string, + spanParam: string | undefined, setVisualizationTitle: React.Dispatch>, setVisualizationType: React.Dispatch>, setVisualizationData: React.Dispatch>, @@ -196,6 +220,7 @@ export const renderSavedVisualization = async ( setIsError(''); let visualization = {} as SavedVisualizationType; + let updatedVisualizationQuery = ''; visualization = await fetchVisualizationById(http, savedVisualizationId, setIsError); if (_.isEmpty(visualization)) { @@ -211,11 +236,21 @@ export const renderSavedVisualization = async ( setVisualizationType(visualization.type); } - setVisualizationMetaData(visualization); + if (spanParam !== undefined) { + updatedVisualizationQuery = updateQuerySpanInterval( + visualization.query, + visualization.timeField, + spanParam + ); + } else { + updatedVisualizationQuery = visualization.query; + } + + setVisualizationMetaData({ ...visualization, query: updatedVisualizationQuery }); getQueryResponse( pplService, - visualization.query, + updatedVisualizationQuery, visualization.type, startTime, endTime, @@ -227,6 +262,90 @@ export const renderSavedVisualization = async ( ); }; +const createCatalogVisualizationMetaData = ( + catalogSource: string, + visualizationQuery: string, + visualizationType: string, + visualizationTimeField: string +) => { + return { + name: catalogSource, + description: '', + query: visualizationQuery, + type: visualizationType, + selected_date_range: { + start: 'now/y', + end: 'now', + text: '', + }, + selected_timestamp: { + name: visualizationTimeField, + type: 'timestamp', + }, + selected_fields: { + text: '', + tokens: [], + }, + }; +}; + +//Creates a catalogVisualization for a runtime catalog based PPL query and runs getQueryResponse +export const renderCatalogVisualization = async ( + http: CoreStart['http'], + pplService: PPLService, + catalogSource: string, + startTime: string, + endTime: string, + filterQuery: string, + spanParam: string | undefined, + setVisualizationTitle: React.Dispatch>, + setVisualizationType: React.Dispatch>, + setVisualizationData: React.Dispatch>, + setVisualizationMetaData: React.Dispatch>, + setIsLoading: React.Dispatch>, + setIsError: React.Dispatch>, + spanResolution?: string +) => { + setIsLoading(true); + setIsError(''); + + const visualizationType = 'line'; + const visualizationTimeField = '@timestamp'; + let visualizationQuery = `source = ${catalogSource} | stats avg(@value) by span(${visualizationTimeField},1h)`; + + if (spanParam !== undefined) { + visualizationQuery = updateQuerySpanInterval( + visualizationQuery, + visualizationTimeField, + spanParam + ); + } + + const visualizationMetaData = createCatalogVisualizationMetaData( + catalogSource, + visualizationQuery, + visualizationType, + visualizationTimeField + ); + setVisualizationTitle(catalogSource); + setVisualizationType(visualizationType); + + setVisualizationMetaData({ ...visualizationMetaData, query: visualizationQuery }); + + getQueryResponse( + pplService, + visualizationQuery, + visualizationType, + startTime, + endTime, + setVisualizationData, + setIsLoading, + setIsError, + filterQuery, + visualizationTimeField + ); +}; + // Function to store recently used time filters and set start and end time. export const onTimeChange = ( start: ShortDate, @@ -292,6 +411,40 @@ export const displayVisualization = (metaData: any, data: any, type: string) => if (metaData === undefined || isEmpty(metaData)) { return <>; } + const dataConfig = { ...(metaData.user_configs?.dataConfig || {}) }; + const hasBreakdowns = !_.isEmpty(dataConfig.breakdowns); + const realTimeParsedStats = { + ...getDefaultVisConfig(new QueryManager().queryParser().parse(metaData.query).getStats()), + }; + let finalDimensions = [...(realTimeParsedStats.dimensions || [])]; + let breakdowns = [...(dataConfig.breakdowns || [])]; + + // filter out breakdowns from dimnesions + if (hasBreakdowns) { + finalDimensions = _.differenceWith(finalDimensions, breakdowns, (dimn, brkdwn) => + _.isEqual(removeBacktick(dimn.name), removeBacktick(brkdwn.name)) + ); + } + + const finalDataConfig = { + ...dataConfig, + ...realTimeParsedStats, + dimensions: finalDimensions, + breakdowns, + }; + + const mixedUserConfigs = { + availabilityConfig: { + ...(metaData.user_configs?.availabilityConfig || {}) + }, + dataConfig: { + ...finalDataConfig, + }, + layoutConfig: { + ...(metaData.user_configs?.layoutConfig || {}), + }, + }; + return ( rawVizData: data, query: { rawQuery: metaData.query }, indexFields: {}, - userConfigs: metaData.user_configs, + userConfigs: mixedUserConfigs, explorer: { explorerData: data, explorerFields: data.metadata.fields }, })} /> diff --git a/dashboards-observability/public/components/custom_panels/panel_modules/visualization_container/visualization_container.tsx b/dashboards-observability/public/components/custom_panels/panel_modules/visualization_container/visualization_container.tsx index bb1a25e04..12eaa4977 100644 --- a/dashboards-observability/public/components/custom_panels/panel_modules/visualization_container/visualization_container.tsx +++ b/dashboards-observability/public/components/custom_panels/panel_modules/visualization_container/visualization_container.tsx @@ -4,13 +4,20 @@ */ import { + EuiButton, EuiButtonIcon, + EuiCodeBlock, EuiContextMenuItem, EuiContextMenuPanel, EuiFlexGroup, EuiFlexItem, EuiIcon, EuiLoadingChart, + EuiModal, + EuiModalBody, + EuiModalFooter, + EuiModalHeader, + EuiModalHeaderTitle, EuiPanel, EuiPopover, EuiSpacer, @@ -20,7 +27,11 @@ import { import React, { useEffect, useMemo, useState } from 'react'; import { CoreStart } from '../../../../../../../src/core/public'; import PPLService from '../../../../services/requests/ppl'; -import { displayVisualization, renderSavedVisualization } from '../../helpers/utils'; +import { + displayVisualization, + renderCatalogVisualization, + renderSavedVisualization, +} from '../../helpers/utils'; import './visualization_container.scss'; /* @@ -40,6 +51,8 @@ import './visualization_container.scss'; * pplFilterValue: string with panel PPL filter value * showFlyout: function to show the flyout * removeVisualization: function to remove all the visualizations + * catalogVisualization: boolean pointing if the container is used for catalog metrics + * spanParam: Override the span(timestamp, 1h) in visualization to span(timestamp, spanParam) */ interface Props { @@ -57,6 +70,8 @@ interface Props { cloneVisualization?: (visualzationTitle: string, savedVisualizationId: string) => void; showFlyout?: (isReplacement?: boolean | undefined, replaceVizId?: string | undefined) => void; removeVisualization?: (visualizationId: string) => void; + catalogVisualization?: boolean; + spanParam?: string; } export const VisualizationContainer = ({ @@ -74,6 +89,8 @@ export const VisualizationContainer = ({ cloneVisualization, showFlyout, removeVisualization, + catalogVisualization, + spanParam, }: Props) => { const [isPopoverOpen, setIsPopoverOpen] = useState(false); const [disablePopover, setDisablePopover] = useState(false); @@ -86,6 +103,39 @@ export const VisualizationContainer = ({ const onActionsMenuClick = () => setIsPopoverOpen((currPopoverOpen) => !currPopoverOpen); const closeActionsMenu = () => setIsPopoverOpen(false); + const [isModalVisible, setIsModalVisible] = useState(false); + + const closeModal = () => setIsModalVisible(false); + const showModal = () => setIsModalVisible(true); + + let modal; + + if (isModalVisible) { + modal = ( + + + +

{visualizationMetaData.name}

+
+
+ + + This PPL Query is generated in runtime from selected data source + + + {visualizationMetaData.query} + + + + + + Close + + +
+ ); + } + let popoverPanel = [ , ]; + let showModelPanel = [ + { + closeActionsMenu(); + showModal(); + }} + > + View query + , + ]; + if (usedInNotebooks) { - popoverPanel = [popoverPanel[0]]; + popoverPanel = catalogVisualization ? [showModelPanel] : [popoverPanel[0]]; } const loadVisaulization = async () => { - await renderSavedVisualization( - http, - pplService, - savedVisualizationId, - fromTime, - toTime, - pplFilterValue, - setVisualizationTitle, - setVisualizationType, - setVisualizationData, - setVisualizationMetaData, - setIsLoading, - setIsError - ); + if (catalogVisualization) + await renderCatalogVisualization( + http, + pplService, + savedVisualizationId, + fromTime, + toTime, + pplFilterValue, + spanParam, + setVisualizationTitle, + setVisualizationType, + setVisualizationData, + setVisualizationMetaData, + setIsLoading, + setIsError + ); + else + await renderSavedVisualization( + http, + pplService, + savedVisualizationId, + fromTime, + toTime, + pplFilterValue, + spanParam, + setVisualizationTitle, + setVisualizationType, + setVisualizationData, + setVisualizationMetaData, + setIsLoading, + setIsError + ); }; const memoisedVisualizationBox = useMemo( @@ -171,52 +253,55 @@ export const VisualizationContainer = ({ }, [editMode]); return ( - -
- - - - -
{visualizationTitle}
-
-
-
- - {disablePopover ? ( - { - removeVisualization(visualizationId); - }} - /> - ) : ( - - } - isOpen={isPopoverOpen} - closePopover={closeActionsMenu} - anchorPosition="downLeft" - > - - - )} - -
-
- {memoisedVisualizationBox} -
+ <> + +
+ + + + +
{visualizationTitle}
+
+
+
+ + {disablePopover ? ( + { + removeVisualization(visualizationId); + }} + /> + ) : ( + + } + isOpen={isPopoverOpen} + closePopover={closeActionsMenu} + anchorPosition="downLeft" + > + + + )} + +
+
+ {memoisedVisualizationBox} +
+ {modal} + ); }; diff --git a/dashboards-observability/public/components/event_analytics/explorer/explorer.scss b/dashboards-observability/public/components/event_analytics/explorer/explorer.scss index 242e611e6..33acd6b44 100644 --- a/dashboards-observability/public/components/event_analytics/explorer/explorer.scss +++ b/dashboards-observability/public/components/event_analytics/explorer/explorer.scss @@ -8,7 +8,7 @@ } .liveStream { - margin: 8px; + margin : 8px; height: 40px; align-items: center; justify-content: center; diff --git a/dashboards-observability/public/components/event_analytics/explorer/explorer.tsx b/dashboards-observability/public/components/event_analytics/explorer/explorer.tsx index 49969dffe..1294d03a1 100644 --- a/dashboards-observability/public/components/event_analytics/explorer/explorer.tsx +++ b/dashboards-observability/public/components/event_analytics/explorer/explorer.tsx @@ -3,97 +3,107 @@ * SPDX-License-Identifier: Apache-2.0 */ -import './explorer.scss'; -import React, { useState, useMemo, useEffect, useRef, useCallback, ReactElement } from 'react'; -import { batch, useDispatch, useSelector } from 'react-redux'; -import { isEmpty, cloneDeep, isEqual, has, reduce } from 'lodash'; -import { FormattedMessage } from '@osd/i18n/react'; -import { EuiLoadingSpinner, EuiSpacer } from '@elastic/eui'; +import dateMath from '@elastic/datemath'; import { - EuiText, + EuiButton, + EuiButtonEmpty, EuiButtonIcon, - EuiTabbedContent, - EuiTabbedContentTab, + EuiContextMenuItem, + EuiFieldText, EuiFlexGroup, EuiFlexItem, + EuiFormRow, + EuiHorizontalRule, EuiLink, - EuiContextMenuItem, + EuiLoadingSpinner, + EuiPopover, + EuiPopoverFooter, + EuiSpacer, + EuiTabbedContent, + EuiTabbedContentTab, + EuiText, + EuiTitle, } from '@elastic/eui'; -import dateMath from '@elastic/datemath'; +import { FormattedMessage } from '@osd/i18n/react'; import classNames from 'classnames'; -import { Search } from '../../common/search/search'; -import { CountDistribution } from './visualizations/count_distribution'; -import { DataGrid } from './events_views/data_grid'; -import { Sidebar } from './sidebar'; -import { NoResults } from './no_results'; -import { HitsCounter } from './hits_counter/hits_counter'; -import { TimechartHeader } from './timechart_header'; -import { ExplorerVisualizations } from './visualizations'; -import { - IField, - IQueryTab, - IDefaultTimestampState, - ConfigListEntry, - DimensionSpan, -} from '../../../../common/types/explorer'; +import { cloneDeep, has, isEmpty, isEqual, reduce } from 'lodash'; +import React, { ReactElement, useCallback, useEffect, useMemo, useRef, useState } from 'react'; +import { batch, useDispatch, useSelector } from 'react-redux'; import { - TAB_CHART_TITLE, - TAB_EVENT_TITLE, + AVAILABLE_FIELDS, + DATE_PICKER_FORMAT, + DEFAULT_AVAILABILITY_QUERY, + EVENT_ANALYTICS_DOCUMENTATION_URL, + FILTERED_PATTERN, + NEW_TAB, + PATTERNS_EXTRACTOR_REGEX, + PATTERNS_REGEX, + PATTERN_REGEX, + PPL_DEFAULT_PATTERN_REGEX_FILETER, RAW_QUERY, + SAVED_OBJECT_ID, + SAVED_OBJECT_TYPE, + SAVED_QUERY, + SAVED_VISUALIZATION, SELECTED_DATE_RANGE, SELECTED_FIELDS, + SELECTED_PATTERN_FIELD, SELECTED_TIMESTAMP, - AVAILABLE_FIELDS, - TIME_INTERVAL_OPTIONS, - SAVED_QUERY, - SAVED_VISUALIZATION, - SAVED_OBJECT_ID, - SAVED_OBJECT_TYPE, - NEW_TAB, + TAB_CHART_ID, + TAB_CHART_TITLE, TAB_CREATED_TYPE, - EVENT_ANALYTICS_DOCUMENTATION_URL, TAB_EVENT_ID, - TAB_CHART_ID, - DEFAULT_AVAILABILITY_QUERY, - DATE_PICKER_FORMAT, - GROUPBY, - AGGREGATIONS, - CUSTOM_LABEL, - VIZ_CONTAIN_XY_AXIS, + TAB_EVENT_TITLE, + TIME_INTERVAL_OPTIONS, } from '../../../../common/constants/explorer'; import { - PPL_STATS_REGEX, - PPL_NEWLINE_REGEX, - LIVE_OPTIONS, LIVE_END_TIME, - VIS_CHART_TYPES, + LIVE_OPTIONS, + PPL_NEWLINE_REGEX, + PPL_PATTERNS_DOCUMENTATION_URL, + PPL_STATS_REGEX, } from '../../../../common/constants/shared'; -import { getIndexPatternFromRawQuery, preprocessQuery, buildQuery, composeFinalQuery } from '../../../../common/utils'; -import { useFetchEvents, useFetchVisualizations } from '../hooks'; -import { changeQuery, changeDateRange, selectQueries } from '../redux/slices/query_slice'; +import { + IDefaultTimestampState, + IExplorerProps, + IField, + IQueryTab, + IVisualizationContainerProps, +} from '../../../../common/types/explorer'; +import { + buildQuery, + composeFinalQuery, + getIndexPatternFromRawQuery, +} from '../../../../common/utils'; +import { sleep } from '../../common/live_tail/live_tail_button'; +import { onItemSelect, parseGetSuggestions } from '../../common/search/autocomplete_logic'; +import { Search } from '../../common/search/search'; +import { getVizContainerProps } from '../../visualizations/charts/helpers'; +import { TabContext, useFetchEvents, useFetchPatterns, useFetchVisualizations } from '../hooks'; +import { selectCountDistribution } from '../redux/slices/count_distribution_slice'; +import { selectFields, sortFields, updateFields } from '../redux/slices/field_slice'; +import { selectPatterns } from '../redux/slices/patterns_slice'; import { selectQueryResult } from '../redux/slices/query_result_slice'; -import { selectFields, updateFields, sortFields } from '../redux/slices/field_slice'; +import { changeDateRange, changeQuery, selectQueries } from '../redux/slices/query_slice'; import { updateTabName } from '../redux/slices/query_tab_slice'; -import { selectCountDistribution } from '../redux/slices/count_distribution_slice'; import { selectExplorerVisualization } from '../redux/slices/visualization_slice'; -import { change as changeVizConfig } from '../redux/slices/viualization_config_slice'; import { - selectVisualizationConfig, change as changeVisualizationConfig, + change as changeVizConfig, + change as updateVizConfig, + selectVisualizationConfig, } from '../redux/slices/viualization_config_slice'; -import { change as updateVizConfig } from '../redux/slices/viualization_config_slice'; -import { IExplorerProps, IVisualizationContainerProps } from '../../../../common/types/explorer'; -import { TabContext } from '../hooks'; -import { getVizContainerProps } from '../../visualizations/charts/helpers'; -import { parseGetSuggestions, onItemSelect } from '../../common/search/autocomplete_logic'; -import { formatError } from '../utils'; -import { sleep } from '../../common/live_tail/live_tail_button'; -import { - statsChunk, - GroupByChunk, - StatsAggregationChunk, - GroupField, -} from '../../../../common/query_manager/ast/types'; +import { formatError, getDefaultVisConfig } from '../utils'; +import { DataGrid } from './events_views/data_grid'; +import './explorer.scss'; +import { HitsCounter } from './hits_counter/hits_counter'; +import { PatternsTable } from './log_patterns/patterns_table'; +import { NoResults } from './no_results'; +import { Sidebar } from './sidebar'; +import { TimechartHeader } from './timechart_header'; +import { ExplorerVisualizations } from './visualizations'; +import { CountDistribution } from './visualizations/count_distribution'; +import { QueryManager } from '../../../../common/query_manager'; const TYPE_TAB_MAPPING = { [SAVED_QUERY]: TAB_EVENT_ID, @@ -122,7 +132,7 @@ export const Explorer = ({ setEndTime, callback, callbackInApp, - queryManager, + queryManager = new QueryManager(), }: IExplorerProps) => { const dispatch = useDispatch(); const requestParams = { tabId }; @@ -134,6 +144,14 @@ export const Explorer = ({ pplService, requestParams, }); + const { + isEventsLoading: isPatternLoading, + getPatterns, + setDefaultPatternsField, + } = useFetchPatterns({ + pplService, + requestParams, + }); const appLogEvents = tabId.startsWith('application-analytics-tab'); const query = useSelector(selectQueries)[tabId]; const explorerData = useSelector(selectQueryResult)[tabId]; @@ -141,6 +159,7 @@ export const Explorer = ({ const countDistribution = useSelector(selectCountDistribution)[tabId]; const explorerVisualizations = useSelector(selectExplorerVisualization)[tabId]; const userVizConfigs = useSelector(selectVisualizationConfig)[tabId] || {}; + const patternsData = useSelector(selectPatterns)[tabId]; const [selectedContentTabId, setSelectedContentTab] = useState(TAB_EVENT_ID); const [selectedCustomPanelOptions, setSelectedCustomPanelOptions] = useState([]); const [selectedPanelName, setSelectedPanelName] = useState(''); @@ -150,6 +169,9 @@ export const Explorer = ({ const [isSidebarClosed, setIsSidebarClosed] = useState(false); const [timeIntervalOptions, setTimeIntervalOptions] = useState(TIME_INTERVAL_OPTIONS); const [isOverridingTimestamp, setIsOverridingTimestamp] = useState(false); + const [isOverridingPattern, setIsOverridingPattern] = useState(false); + const [isPatternConfigPopoverOpen, setIsPatternConfigPopoverOpen] = useState(false); + const [patternRegexInput, setPatternRegexInput] = useState(PPL_DEFAULT_PATTERN_REGEX_FILETER); const [tempQuery, setTempQuery] = useState(query[RAW_QUERY]); const [isLiveTailPopoverOpen, setIsLiveTailPopoverOpen] = useState(false); const [isLiveTailOn, setIsLiveTailOn] = useState(false); @@ -160,6 +182,16 @@ export const Explorer = ({ const [liveTimestamp, setLiveTimestamp] = useState(DATE_PICKER_FORMAT); const [triggerAvailability, setTriggerAvailability] = useState(false); + const selectedIntervalRef = useRef<{ + text: string; + value: string; + }>(); + const [viewLogPatterns, setViewLogPatterns] = useState(false); + const [spanValue, setSpanValue] = useState(false); + const [subType, setSubType] = useState('visualization'); + const [metricMeasure, setMetricMeasure] = useState(''); + const [metricLabel, setMetricLabel] = useState([]); + const [metricChecked, setMetricChecked] = useState(false); const queryRef = useRef(); const appBasedRef = useRef(''); appBasedRef.current = appBaseQuery; @@ -175,13 +207,11 @@ export const Explorer = ({ liveTailTabIdRef.current = liveTailTabId; liveTailNameRef.current = liveTailName; - let minInterval = 'y'; const findAutoInterval = (start: string = '', end: string = '') => { - if (start?.length === 0 || end?.length === 0 || start === end) - return ['d', [...TIME_INTERVAL_OPTIONS]]; const momentStart = dateMath.parse(start)!; - const momentEnd = dateMath.parse(end)!; + const momentEnd = dateMath.parse(end, { roundUp: true })!; const diffSeconds = momentEnd.unix() - momentStart.unix(); + let minInterval = 'y'; // less than 1 second if (diffSeconds <= 1) minInterval = 'ms'; @@ -202,6 +232,7 @@ export const Explorer = ({ { text: 'Auto', value: 'auto_' + minInterval }, ...TIME_INTERVAL_OPTIONS, ]); + selectedIntervalRef.current = { text: 'Auto', value: 'auto_' + minInterval }; }; useEffect(() => { @@ -214,6 +245,15 @@ export const Explorer = ({ }); }); + const getErrorHandler = (title: string) => { + return (error: any) => { + const formattedError = formatError(error.name, error.message, error.body.message); + notifications.toasts.addError(formattedError, { + title, + }); + }; + }; + const getSavedDataById = async (objectId: string) => { // load saved query/visualization if object id exists await savedObjects @@ -225,9 +265,8 @@ export const Explorer = ({ const isSavedQuery = has(savedData, SAVED_QUERY); const savedType = isSavedQuery ? SAVED_QUERY : SAVED_VISUALIZATION; const objectData = isSavedQuery ? savedData.savedQuery : savedData.savedVisualization; - const currQuery = appLogEvents - ? objectData?.query.replace(appBaseQuery + '| ', '') - : objectData?.query || ''; + const isSavedVisualization = savedData.savedVisualization; + const currQuery = objectData?.query || ''; if (appLogEvents) { if (objectData?.selected_date_range?.start && objectData?.selected_date_range?.end) { @@ -269,11 +308,19 @@ export const Explorer = ({ ); // fill saved user configs if (objectData?.type) { + let visConfig = {}; + const customConfig = objectData.user_configs ? JSON.parse(objectData.user_configs) : {}; + if (!isEmpty(customConfig.dataConfig) && !isEmpty(customConfig.dataConfig?.series)) { + visConfig = { ...customConfig }; + } else { + const statsTokens = queryManager.queryParser().parse(objectData.query).getStats(); + visConfig = { dataConfig: { ...getDefaultVisConfig(statsTokens) } }; + } await dispatch( updateVizConfig({ tabId, vizId: objectData?.type, - data: JSON.parse(objectData.user_configs), + data: visConfig, }) ); } @@ -283,8 +330,15 @@ export const Explorer = ({ setSelectedPanelName(objectData?.name || ''); setCurVisId(objectData?.type || 'bar'); setTempQuery((staleTempQuery: string) => { - return appLogEvents ? currQuery : objectData?.query || staleTempQuery; + return objectData?.query || staleTempQuery; }); + if (isSavedVisualization?.sub_type) { + if (isSavedVisualization?.sub_type === 'metric') { + setMetricChecked(true); + setMetricMeasure(isSavedVisualization?.units_of_measure); + } + setSubType(isSavedVisualization?.sub_type); + } const tabToBeFocused = isSavedQuery ? TYPE_TAB_MAPPING[SAVED_QUERY] : TYPE_TAB_MAPPING[SAVED_VISUALIZATION]; @@ -304,7 +358,9 @@ export const Explorer = ({ const fetchData = async (startingTime?: string, endingTime?: string) => { const curQuery = queryRef.current; - const rawQueryStr = buildQuery(appBasedRef.current, curQuery![RAW_QUERY]); + const rawQueryStr = (curQuery![RAW_QUERY] as string).includes(appBaseQuery) + ? curQuery![RAW_QUERY] + : buildQuery(appBasedRef.current, curQuery![RAW_QUERY]); const curIndex = getIndexPatternFromRawQuery(rawQueryStr); if (isEmpty(rawQueryStr)) return; @@ -327,6 +383,19 @@ export const Explorer = ({ } } + let curPattern: string = curQuery![SELECTED_PATTERN_FIELD]; + + if (isEmpty(curPattern)) { + const patternErrorHandler = getErrorHandler('Error fetching default pattern field'); + await setDefaultPatternsField(curIndex, '', patternErrorHandler); + const newQuery = queryRef.current; + curPattern = newQuery![SELECTED_PATTERN_FIELD]; + if (isEmpty(curPattern)) { + setToast('Index does not contain a valid pattern field.', 'danger'); + return; + } + } + if (isEqual(typeof startingTime, 'undefined') && isEqual(typeof endingTime, 'undefined')) { startingTime = curQuery![SELECTED_DATE_RANGE][0]; endingTime = curQuery![SELECTED_DATE_RANGE][1]; @@ -339,7 +408,10 @@ export const Explorer = ({ endingTime!, curTimestamp, isLiveTailOnRef.current, - appBasedRef.current + appBasedRef.current, + curQuery![SELECTED_PATTERN_FIELD], + curQuery![PATTERN_REGEX], + curQuery![FILTERED_PATTERN] ); await dispatch( @@ -347,6 +419,7 @@ export const Explorer = ({ tabId, query: { finalQuery, + [RAW_QUERY]: rawQueryStr, [SELECTED_TIMESTAMP]: curTimestamp, }, }) @@ -367,23 +440,20 @@ export const Explorer = ({ ); } } else { - findAutoInterval(startTime, endTime); + if (!selectedIntervalRef.current || selectedIntervalRef.current.text === 'Auto') { + findAutoInterval(startingTime, endingTime); + } if (isLiveTailOnRef.current) { - getLiveTail(undefined, (error) => { - const formattedError = formatError(error.name, error.message, error.body.message); - notifications.toasts.addError(formattedError, { - title: 'Error fetching events', - }); - }); + getLiveTail(undefined, getErrorHandler('Error fetching events')); } else { - getEvents(undefined, (error) => { - const formattedError = formatError(error.name, error.message, error.body.message); - notifications.toasts.addError(formattedError, { - title: 'Error fetching events', - }); - }); + getEvents(undefined, getErrorHandler('Error fetching events')); + } + getCountVisualizations(selectedIntervalRef.current!.value.replace(/^auto_/, '')); + + // to fetch patterns data on current query + if (!finalQuery.match(PATTERNS_REGEX)) { + getPatterns(selectedIntervalRef.current!.value.replace(/^auto_/, '')); } - getCountVisualizations(minInterval); } // for comparing usage if for the same tab, user changed index from one to another @@ -412,8 +482,8 @@ export const Explorer = ({ const prepareAvailability = async () => { setSelectedContentTab(TAB_CHART_ID); setTriggerAvailability(true); - await setTempQuery(DEFAULT_AVAILABILITY_QUERY); - await updateQueryInStore(DEFAULT_AVAILABILITY_QUERY); + await setTempQuery(buildQuery(appBaseQuery, DEFAULT_AVAILABILITY_QUERY)); + await updateQueryInStore(buildQuery(appBaseQuery, DEFAULT_AVAILABILITY_QUERY)); await handleTimeRangePickerRefresh(true); }; @@ -482,8 +552,22 @@ export const Explorer = ({ ); }; - const handleTimeRangePickerRefresh = (availability?: boolean) => { + const handleTimeRangePickerRefresh = async (availability?: boolean) => { handleQuerySearch(availability); + if (availability !== true && query.rawQuery.match(PATTERNS_REGEX)) { + let currQuery = query.rawQuery; + const currPattern = currQuery.match(PATTERNS_EXTRACTOR_REGEX)!.groups!.pattern; + // Remove existing pattern selection if it exists + if (currQuery.match(PATTERNS_REGEX)) { + currQuery = currQuery.replace(PATTERNS_REGEX, ''); + } + const patternSelectQuery = `${currQuery.trim()} | patterns ${currPattern}`; + await setTempQuery(patternSelectQuery); + await updateQueryInStore(patternSelectQuery); + // Passing in empty string will remove pattern query + const patternErrorHandler = getErrorHandler('Error fetching patterns'); + getPatterns(selectedIntervalRef.current?.value.replace(/^auto_/, '') || 'y', patternErrorHandler); + } }; /** @@ -549,6 +633,17 @@ export const Explorer = ({ handleQuerySearch(); }; + const handleOverridePattern = async (pattern: IField) => { + setIsOverridingPattern(true); + await setDefaultPatternsField( + '', + pattern.name, + getErrorHandler('Error overriding default pattern') + ); + setIsOverridingPattern(false); + await getPatterns(selectedIntervalRef.current?.value.replace(/^auto_/, '') || 'y', getErrorHandler('Error fetching patterns')); + }; + const totalHits: number = useMemo(() => { if (isLiveTailOn && countDistribution?.data) { const hits = reduce( @@ -564,6 +659,23 @@ export const Explorer = ({ return 0; }, [countDistribution?.data]); + const onPatternSelection = async (pattern: string) => { + if (queryRef.current![FILTERED_PATTERN] === pattern) { + return; + } + dispatch( + changeQuery({ + tabId, + query: { + [FILTERED_PATTERN]: pattern, + }, + }) + ); + // workaround to refresh callback and trigger fetch data + await setTempQuery(queryRef.current![RAW_QUERY]); + await handleTimeRangePickerRefresh(true); + }; + const getMainContent = () => { return (
@@ -580,10 +692,13 @@ export const Explorer = ({ explorerFields={explorerFields} explorerData={explorerData} selectedTimestamp={query[SELECTED_TIMESTAMP]} + selectedPattern={query[SELECTED_PATTERN_FIELD]} handleOverrideTimestamp={handleOverrideTimestamp} + handleOverridePattern={handleOverridePattern} handleAddField={(field: IField) => handleAddField(field)} handleRemoveField={(field: IField) => handleRemoveField(field)} isOverridingTimestamp={isOverridingTimestamp} + isOverridingPattern={isOverridingPattern} isFieldToggleButtonDisabled={ isEmpty(explorerData.jsonData) || !isEmpty(queryRef.current![RAW_QUERY].match(PPL_STATS_REGEX)) @@ -631,14 +746,164 @@ export const Explorer = ({ { + onChangeInterval={(selectedIntrv) => { + const intervalOptionsIndex = timeIntervalOptions.findIndex( + (item) => item.value === selectedIntrv + ); + const intrv = selectedIntrv.replace(/^auto_/, ''); getCountVisualizations(intrv); + selectedIntervalRef.current = + timeIntervalOptions[intervalOptionsIndex]; + getPatterns(intrv, getErrorHandler('Error fetching patterns')); }} - stateInterval="auto" + stateInterval={selectedIntervalRef.current?.value} /> + + + + {viewLogPatterns && ( + + + +

+ Patterns{' '} + + ({patternsData.patternTableData?.length || 0}) + +

+
+
+ + + setIsPatternConfigPopoverOpen(!isPatternConfigPopoverOpen) + } + /> + } + isOpen={isPatternConfigPopoverOpen} + closePopover={() => setIsPatternConfigPopoverOpen(false)} + anchorPosition="upCenter" + > + +

Pattern regex

+
+ + Log patterns allow you to cluster your logs, to help + + summarize large volume of logs. + + + Pattern regex is used to reduce logs into log groups.{' '} + + help + + + } + > + setPatternRegexInput(e.target.value)} + /> + + + + + setIsPatternConfigPopoverOpen(false)} + > + Cancel + + + + { + await setIsPatternConfigPopoverOpen(false); + await dispatch( + changeQuery({ + tabId, + query: { + [PATTERN_REGEX]: patternRegexInput, + }, + }) + ); + await getPatterns( + selectedIntervalRef.current?.value.replace(/^auto_/, '') || 'y', + getErrorHandler('Error fetching patterns') + ); + }} + > + Apply + + + + +
+
+
+ )} +
+ + + + {viewLogPatterns && ( + + onPatternSelection('')}> + Clear Selection + + + )} + + + + { + // hide patterns will also clear pattern selection + if (viewLogPatterns) { + onPatternSelection(''); + } + setViewLogPatterns(!viewLogPatterns); + setIsPatternConfigPopoverOpen(false); + }} + > + {`${viewLogPatterns ? 'Hide' : 'Show'} Patterns`} + + + + + +
+ + {viewLogPatterns && ( + <> + + + + )} )} @@ -673,6 +938,26 @@ export const Explorer = ({ )} + {countDistribution?.data && ( + +

+ Events + + {' '} + ( + {reduce( + countDistribution.data['count()'], + (sum, n) => { + return sum + n; + }, + 0 + )} + ) + +

+
+ )} + ​ @@ -726,7 +1011,11 @@ export const Explorer = ({ rawVizData: explorerVisualizations, query, indexFields: explorerFields, - userConfigs: { ...userVizConfigs[curVisId] } || {}, + userConfigs: !isEmpty(userVizConfigs[curVisId]) + ? { ...userVizConfigs[curVisId] } + : { + dataConfig: getDefaultVisConfig(queryManager.queryParser().parse(tempQuery).getStats()), + }, appData: { fromApp: appLogEvents }, explorer: { explorerData, explorerFields, query, http, pplService }, }); @@ -788,9 +1077,12 @@ export const Explorer = ({ visualizations, query, isLiveTailOnRef.current, - userVizConfigs + patternsData, + viewLogPatterns, + isPatternConfigPopoverOpen, + patternRegexInput, + userVizConfigs, ]); - const handleContentTabClick = (selectedTab: IQueryTab) => setSelectedContentTab(selectedTab.id); const updateQueryInStore = async (updateQuery: string) => { @@ -815,123 +1107,6 @@ export const Explorer = ({ ); }; - const getSpanValue = (groupByToken: GroupByChunk) => { - const timeUnitValue = TIME_INTERVAL_OPTIONS.find( - (time_unit) => time_unit.value === groupByToken?.span?.span_expression.time_unit - )?.text; - return groupByToken?.span !== null - ? { - time_field: [ - { - name: groupByToken?.span.span_expression.field, - type: 'timestamp', - label: groupByToken?.span.span_expression.field, - }, - ], - unit: [ - { - text: timeUnitValue, - value: groupByToken?.span.span_expression.time_unit, - label: timeUnitValue, - }, - ], - interval: groupByToken?.span.span_expression.literal_value, - } - : undefined; - }; - - const getUpdatedDataConfig = (statsToken: statsChunk) => { - if (statsToken === null) { - return { - [GROUPBY]: [], - [AGGREGATIONS]: [], - }; - } - - const groupByToken = statsToken.groupby; - const seriesToken = statsToken.aggregations && statsToken.aggregations[0]; - const span = getSpanValue(groupByToken); - switch (curVisId) { - case VIS_CHART_TYPES.TreeMap: - return { - [GROUPBY]: [ - { - childField: { - ...(groupByToken?.group_fields - ? { - label: groupByToken?.group_fields[0].name ?? '', - name: groupByToken?.group_fields[0].name ?? '', - } - : { label: '', name: '' }), - }, - parentFields: [], - }, - ], - [AGGREGATIONS]: [ - { - valueField: { - ...(seriesToken - ? { - label: `${seriesToken.function?.name}(${seriesToken.function?.value_expression})`, - name: `${seriesToken.function?.name}(${seriesToken.function?.value_expression})`, - } - : { label: '', name: '' }), - }, - }, - ], - }; - case VIS_CHART_TYPES.Histogram: - return { - [GROUPBY]: [{ bucketSize: '', bucketOffset: '' }], - [AGGREGATIONS]: [], - }; - case VIS_CHART_TYPES.LogsView: { - const dimensions = statsToken.aggregations - .map((agg) => { - const logViewField = `${agg.function.name}(${agg.function.value_expression})` ?? ''; - return { - label: logViewField, - name: logViewField, - }; - }) - .concat( - groupByToken.group_fields?.map((agg) => ({ - label: agg.name ?? '', - name: agg.name ?? '', - })) - ); - if (span !== undefined) { - const { time_field, interval, unit } = span; - const timespanField = `span(${time_field[0].name},${interval}${unit[0].value})`; - dimensions.push({ - label: timespanField, - name: timespanField, - }); - } - return { - [AGGREGATIONS]: [], - [GROUPBY]: dimensions, - }; - } - - default: - return { - [AGGREGATIONS]: statsToken.aggregations.map((agg) => ({ - label: agg.function?.value_expression, - name: agg.function?.value_expression, - aggregation: agg.function?.name, - [CUSTOM_LABEL]: agg[CUSTOM_LABEL as keyof StatsAggregationChunk], - })), - [GROUPBY]: groupByToken?.group_fields?.map((agg) => ({ - label: agg.name ?? '', - name: agg.name ?? '', - [CUSTOM_LABEL]: agg[CUSTOM_LABEL as keyof GroupField] ?? '', - })), - span, - }; - } - }; - const handleQuerySearch = useCallback( async (availability?: boolean) => { // clear previous selected timestamp when index pattern changes @@ -941,6 +1116,7 @@ export const Explorer = ({ isIndexPatternChanged(tempQuery, query[RAW_QUERY]) ) { await updateCurrentTimeStamp(''); + await setDefaultPatternsField('', ''); } if (availability !== true) { await updateQueryInStore(tempQuery); @@ -950,7 +1126,7 @@ export const Explorer = ({ if (selectedContentTabId === TAB_CHART_ID) { // parse stats section on every search const statsTokens = queryManager.queryParser().parse(tempQuery).getStats(); - const updatedDataConfig = getUpdatedDataConfig(statsTokens); + const updatedDataConfig = getDefaultVisConfig(statsTokens); await dispatch( changeVizConfig({ tabId, @@ -960,7 +1136,7 @@ export const Explorer = ({ ); } }, - [tempQuery, query, selectedContentTabId] + [tempQuery, query, selectedContentTabId, curVisId] ); const handleQueryChange = async (newQuery: string) => setTempQuery(newQuery); @@ -1075,7 +1251,7 @@ export const Explorer = ({ if (!isEmpty(currQuery![SAVED_OBJECT_ID]) && isTabMatchingSavedType) { savingVisRes = await savedObjects .updateSavedVisualizationById({ - query: buildQuery(appBaseQuery, currQuery![RAW_QUERY]), + query: buildQuery('', currQuery![RAW_QUERY]), fields: currFields![SELECTED_FIELDS], dateRange: currQuery![SELECTED_DATE_RANGE], name: selectedPanelNameRef.current, @@ -1086,6 +1262,7 @@ export const Explorer = ({ ? JSON.stringify(userVizConfigs[curVisId]) : JSON.stringify({}), description: vizDescription, + subType: subType, }) .then((res: any) => { setToast( @@ -1109,7 +1286,7 @@ export const Explorer = ({ // create new saved visualization savingVisRes = await savedObjects .createSavedVisualization({ - query: buildQuery(appBaseQuery, currQuery![RAW_QUERY]), + query: buildQuery('', currQuery![RAW_QUERY]), fields: currFields![SELECTED_FIELDS], dateRange: currQuery![SELECTED_DATE_RANGE], type: curVisId, @@ -1120,6 +1297,7 @@ export const Explorer = ({ ? JSON.stringify(userVizConfigs[curVisId]) : JSON.stringify({}), description: vizDescription, + subType: subType, }) .then((res: any) => { batch(() => { @@ -1190,7 +1368,9 @@ export const Explorer = ({ setIsLiveTailOn(true); setToast('Live tail On', 'success'); setIsLiveTailPopoverOpen(false); - setLiveTimestamp(dateMath.parse(endingTime)?.utc().format(DATE_PICKER_FORMAT) || ''); + setLiveTimestamp( + dateMath.parse(endingTime, { roundUp: true })?.utc().format(DATE_PICKER_FORMAT) || '' + ); setLiveHits(0); await sleep(2000); const curLiveTailname = liveTailNameRef.current; @@ -1259,6 +1439,25 @@ export const Explorer = ({ [tempQuery] ); + const generateViewQuery = (query: string) => { + if (query.includes(appBaseQuery)) { + if (query.includes('|')) { + // Some scenarios have ' | ' after base query and some have '| ' + return query.replace(' | ', '| ').replace(appBaseQuery + '| ', ''); + } + return ''; + } + return query; + }; + + useEffect(() => { + if (isEqual(selectedContentTabId, TAB_CHART_ID)) { + const statsTokens = queryManager.queryParser().parse(tempQuery).getStats(); + const updatedDataConfig = getDefaultVisConfig(statsTokens); + setSpanValue(!isEqual(typeof updatedDataConfig.span, 'undefined')); + } + }, [tempQuery, selectedContentTabId, curVisId]); + return ( p + v.count, 0); + + const tableColumns = [ + { + field: 'count', + name: 'Count', + width: '6%', + sortable: true, + render: (item: string) => { + return {item}; + }, + }, + { + field: 'count', + name: 'Ratio', + width: '6%', + sortable: (row: PatternTableData) => row.count, + render: (item: number) => { + const ratio = (item / totalHits) * 100; + return {`${round(ratio, 2)}%`}; + }, + }, + { + field: 'anomalyCount', + name: 'Anomalies', + width: '6%', + sortable: (row: PatternTableData) => row.anomalyCount, + render: (item: number) => { + return {item ?? 'N/A'}; + }, + }, + { + field: 'sampleLog', + name: 'Sample Log', + width: '82%', + sortable: true, + render: (item: string) => { + return {item}; + }, + }, + ]; + + const sorting = { + sort: { + field: 'count', + direction: SortDirection.DESC, + }, + enableAllColumns: true, + }; + + const pagination = { + pageSizeOptions: [5, 10, 15, 20], + initialPageSize: 5, + }; + + const message = ( + No patterns found.} + titleSize="s" + iconType="minusInCircle" + iconColor="#DDDDDD" + body={ +

+ Try expanding your time range or modifying your query. Learn more from our{' '} + + PPL documentation + + +

+ } + /> + ); + + const getRowProps = (item: PatternTableData) => { + const { pattern } = item; + return { + 'data-test-subj': `row-${pattern}`, + className: 'customRowClass', + onClick: () => { + if (!props.isPatternLoading) { + onPatternSelection(pattern); + } + }, + isSelected: pattern === query[FILTERED_PATTERN], + }; + }; + + return ( + + ); +} diff --git a/dashboards-observability/public/components/event_analytics/explorer/save_panel/__tests__/__snapshots__/save_panel.test.tsx.snap b/dashboards-observability/public/components/event_analytics/explorer/save_panel/__tests__/__snapshots__/save_panel.test.tsx.snap index ef52659b1..b94209851 100644 --- a/dashboards-observability/public/components/event_analytics/explorer/save_panel/__tests__/__snapshots__/save_panel.test.tsx.snap +++ b/dashboards-observability/public/components/event_analytics/explorer/save_panel/__tests__/__snapshots__/save_panel.test.tsx.snap @@ -2,8 +2,11 @@ exports[`Saved query table component Renders saved query table 1`] = `
+ +
+
+ + + +
+ + + Save as Metric + +
+
+
+
+
+
+
`; diff --git a/dashboards-observability/public/components/event_analytics/explorer/save_panel/__tests__/save_panel.test.tsx b/dashboards-observability/public/components/event_analytics/explorer/save_panel/__tests__/save_panel.test.tsx index 6eec4ca91..a35b7b58a 100644 --- a/dashboards-observability/public/components/event_analytics/explorer/save_panel/__tests__/save_panel.test.tsx +++ b/dashboards-observability/public/components/event_analytics/explorer/save_panel/__tests__/save_panel.test.tsx @@ -18,6 +18,7 @@ describe('Saved query table component', () => { it('Renders saved query table', async () => { const handleNameChange = jest.fn(); const handleOptionChange = jest.fn(); + const setMetricLabel = jest.fn(); const savedObjects = new SavedObjects(httpClientMock); const wrapper = mount( @@ -28,6 +29,13 @@ describe('Saved query table component', () => { savedObjects={savedObjects} savePanelName={'Count by depature'} showOptionList={true} + curVisId={'line'} + spanValue={false} + setSubType={'metric'} + setMetricMeasure={'hours (h)'} + setMetricLabel={setMetricLabel} + metricMeasure={'hours (h)'} + metricChecked={true} /> ); diff --git a/dashboards-observability/public/components/event_analytics/explorer/save_panel/save_panel.tsx b/dashboards-observability/public/components/event_analytics/explorer/save_panel/save_panel.tsx index c0b4793b5..277d194ec 100644 --- a/dashboards-observability/public/components/event_analytics/explorer/save_panel/save_panel.tsx +++ b/dashboards-observability/public/components/event_analytics/explorer/save_panel/save_panel.tsx @@ -5,10 +5,20 @@ import React, { useState } from 'react'; import { useDispatch, useSelector } from 'react-redux'; -import { EuiTitle, EuiComboBox, EuiFormRow, EuiSpacer, EuiFieldText } from '@elastic/eui'; +import { + EuiTitle, + EuiComboBox, + EuiFormRow, + EuiSpacer, + EuiFieldText, + EuiSwitch, + EuiToolTip, + EuiSelect, +} from '@elastic/eui'; import { useEffect } from 'react'; -import { isEmpty } from 'lodash'; +import { isEmpty, isEqual } from 'lodash'; import SavedObjects from '../../../../services/saved_objects/event_analytics/saved_objects'; +import { UNITS_OF_MEASURE } from '../../../../../common/constants/explorer'; interface ISavedPanelProps { selectedOptions: any; @@ -17,6 +27,13 @@ interface ISavedPanelProps { savedObjects: SavedObjects; savePanelName: string; showOptionList: boolean; + curVisId: string; + spanValue: boolean; + setSubType: any; + metricMeasure: string; + setMetricMeasure: any; + setMetricLabel: any; + metricChecked: boolean; } interface CustomPanelOptions { @@ -33,8 +50,18 @@ export const SavePanel = ({ savedObjects, savePanelName, showOptionList, + curVisId, + spanValue, + setSubType, + metricMeasure, + setMetricMeasure, + setMetricLabel, + metricChecked, }: ISavedPanelProps) => { const [options, setOptions] = useState([]); + const [checked, setChecked] = useState(false); + const [measure, setMeasure] = useState(''); + const [label, setLabel] = useState([]); const getCustomPabnelList = async (savedObjects: SavedObjects) => { const optionRes = await savedObjects @@ -50,6 +77,32 @@ export const SavePanel = ({ getCustomPabnelList(savedObjects); }, []); + const onToggleChange = (e: { target: { checked: React.SetStateAction } }) => { + setChecked(e.target.checked); + if (e.target.checked) { + setSubType("metric") + } else { + setSubType("visualization") + } + }; + + const onMeasureChange = (selectedMeasures: string) => { + setMeasure(selectedMeasures); + setMetricMeasure(selectedMeasures); + }; + + const onLabelChange = (selectedLabels: React.SetStateAction) => { + setLabel(selectedLabels); + setMetricLabel(selectedLabels); + }; + + useEffect(() => { + if (metricChecked) { + setChecked(true); + setMeasure(metricMeasure); + } + }, []) + return ( <> {showOptionList && ( @@ -90,6 +143,23 @@ export const SavePanel = ({ data-test-subj="eventExplorer__querySaveName" /> + {showOptionList && ( + <> + + + + + + + )} ); }; diff --git a/dashboards-observability/public/components/event_analytics/explorer/sidebar/__tests__/__snapshots__/field.test.tsx.snap b/dashboards-observability/public/components/event_analytics/explorer/sidebar/__tests__/__snapshots__/field.test.tsx.snap index f2c5f5cb9..35c8c3a91 100644 --- a/dashboards-observability/public/components/event_analytics/explorer/sidebar/__tests__/__snapshots__/field.test.tsx.snap +++ b/dashboards-observability/public/components/event_analytics/explorer/sidebar/__tests__/__snapshots__/field.test.tsx.snap @@ -25,6 +25,26 @@ exports[`Field component Renders a sidebar field 1`] = ` dataTestSubj="field-agent-showDetails" fieldAction={ + + + + Override + + + + + + + Override + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Override + + + + + + + Override + + + + + + + + + + + + + + + + + + + + + + @@ -3373,6 +3690,14 @@ exports[`Siderbar component Renders sidebar component 1`] = ` dataTestSubj="field-clientip-showDetails" fieldAction={ + + + + + + + + + + + + + + + + + + + Override + + + + + + + Override + + + + + + + + + + + + + + + + + + + + + + + Override + + + + + + + Override + + + + + + + + + + - - - + Override + + + + + + + + + @@ -4813,6 +5429,26 @@ exports[`Siderbar component Renders sidebar component 1`] = ` dataTestSubj="field-index-showDetails" fieldAction={ + + + + Override + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Override + + + + + + + Override + + + + + + + + + + + + + @@ -6253,6 +7144,14 @@ exports[`Siderbar component Renders sidebar component 1`] = ` dataTestSubj="field-phpmemory-showDetails" fieldAction={ + + + + + + + + + + Override + + + + + + + Override + + + + + + + + + + + + + + Override + + + + + + + Override + + + + + + + + + + + + + + Override + + + + + + + Override + + + + + + + + + + + + + + Override + + + + + + + Override + + + + + + + + + + + + + + + + + + + + + + + Override + + + + + + + Override + + + + + + + + + + + + + + + + + + + void; selectedTimestamp: string; isOverridingTimestamp: boolean; - handleOverrideTimestamp: (timestamp: { name: string; type: string }) => void; + handleOverrideTimestamp: (timestamp: IField) => void; selected: boolean; showToggleButton: boolean; showTimestampOverrideButton: boolean; @@ -37,6 +41,9 @@ export const Field = (props: IFieldProps) => { const { query, field, + selectedPattern, + isOverridingPattern, + handleOverridePattern, selectedTimestamp, isOverridingTimestamp, handleOverrideTimestamp, @@ -68,6 +75,31 @@ export const Field = (props: IFieldProps) => { const getFieldActionDOM = () => { return ( <> + + <> + {isEqual(field.type, 'string') ? ( + isEqual(selectedPattern, field.name) ? ( + + Default Pattern + + ) : isOverridingPattern ? ( + + ) : ( + handleOverridePattern(field)} + data-test-subj="eventExplorer__overrideDefaultPattern" + > + Override + + ) + ) : null} + + <> {showTimestampOverrideButton && isEqual(field.type, 'timestamp') ? ( diff --git a/dashboards-observability/public/components/event_analytics/explorer/sidebar/sidebar.tsx b/dashboards-observability/public/components/event_analytics/explorer/sidebar/sidebar.tsx index 47037a8a1..794ce5328 100644 --- a/dashboards-observability/public/components/event_analytics/explorer/sidebar/sidebar.tsx +++ b/dashboards-observability/public/components/event_analytics/explorer/sidebar/sidebar.tsx @@ -16,10 +16,13 @@ interface ISidebarProps { query: string; explorerFields: IExplorerFields; explorerData: any; + selectedPattern: string; + isOverridingPattern: boolean; selectedTimestamp: string; isOverridingTimestamp: boolean; isFieldToggleButtonDisabled: boolean; - handleOverrideTimestamp: (timestamp: { name: string; type: string }) => void; + handleOverridePattern: (pattern: IField) => void; + handleOverrideTimestamp: (timestamp: IField) => void; handleAddField: (field: IField) => void; handleRemoveField: (field: IField) => void; } @@ -29,9 +32,12 @@ export const Sidebar = (props: ISidebarProps) => { query, explorerFields, explorerData, + selectedPattern, + isOverridingPattern, selectedTimestamp, isOverridingTimestamp, isFieldToggleButtonDisabled, + handleOverridePattern, handleOverrideTimestamp, handleAddField, handleRemoveField, @@ -87,6 +93,10 @@ export const Sidebar = (props: ISidebarProps) => { { {
{isAggregation diff --git a/dashboards-observability/public/components/event_analytics/explorer/visualizations/config_panel/config_panes/config_controls/data_configurations_panel.tsx b/dashboards-observability/public/components/event_analytics/explorer/visualizations/config_panel/config_panes/config_controls/data_configurations_panel.tsx index 09a3b59b2..1d745b856 100644 --- a/dashboards-observability/public/components/event_analytics/explorer/visualizations/config_panel/config_panes/config_controls/data_configurations_panel.tsx +++ b/dashboards-observability/public/components/event_analytics/explorer/visualizations/config_panel/config_panes/config_controls/data_configurations_panel.tsx @@ -19,7 +19,7 @@ import { EuiTitle, htmlIdGenerator, } from '@elastic/eui'; -import { filter, isEmpty } from 'lodash'; +import { filter, isEmpty, isEqual } from 'lodash'; import { AGGREGATIONS, AGGREGATION_OPTIONS, @@ -283,7 +283,6 @@ export const DataConfigPanelItem = ({ ...configList, }, }); - handleQueryChange(newQueryString); getVisualizations({ query: nextQueryState[FINAL_QUERY], @@ -306,10 +305,22 @@ export const DataConfigPanelItem = ({ fillVisDataInStore({ visData: visData, query, visConfMetadata, visMeta }); }; + const isPositionButtonVisible = (sectionName: string) => + sectionName === AGGREGATIONS && + (visualizations.vis.name === VIS_CHART_TYPES.Line || + visualizations.vis.name === VIS_CHART_TYPES.Scatter); + const getTimeStampFilteredFields = (options: IField[]) => filter(options, (i: IField) => i.type !== TIMESTAMP); const getOptionsAvailable = (sectionName: string) => { + if ( + (visualizations.vis.name === VIS_CHART_TYPES.Line || + visualizations.vis.name === VIS_CHART_TYPES.Scatter) && + isEqual(sectionName, GROUPBY) + ) + return filter(fieldOptionList, (i) => i.type === TIMESTAMP); + if ( sectionName === AGGREGATIONS || sectionName === BREAKDOWNS || @@ -317,11 +328,6 @@ export const DataConfigPanelItem = ({ isTimeStampSelected ) return fieldOptionList; - if ( - visualizations.vis.name === VIS_CHART_TYPES.Line || - visualizations.vis.name === VIS_CHART_TYPES.Scatter - ) - return filter(fieldOptionList, (i) => i.type === TIMESTAMP); return getTimeStampFilteredFields(fieldOptionList); }; @@ -376,6 +382,19 @@ export const DataConfigPanelItem = ({ )} {/* Show input fields for dimensions */} {!isAggregations && getCommonDimensionsField(selectedObj, name)} + {isPositionButtonVisible(name) && ( + + updateList(id, 'side')} + /> + + )} @@ -417,7 +436,6 @@ export const DataConfigPanelItem = ({ aria-label="input field" placeholder="Select a field" singleSelection={{ asPlainText: true }} - isClearable={false} options={getOptionsAvailable(name)} selectedOptions={ isTimeStampSelected @@ -491,8 +509,7 @@ export const DataConfigPanelItem = ({ { return { ...option, @@ -564,6 +581,7 @@ export const DataConfigPanelItem = ({ iconType="play" onClick={() => updateChart()} size="s" + isDisabled={isEmpty(configList[AGGREGATIONS])} > Update chart diff --git a/dashboards-observability/public/components/event_analytics/explorer/visualizations/config_panel/config_panes/config_controls/index.ts b/dashboards-observability/public/components/event_analytics/explorer/visualizations/config_panel/config_panes/config_controls/index.ts index c026190a6..10c56703e 100644 --- a/dashboards-observability/public/components/event_analytics/explorer/visualizations/config_panel/config_panes/config_controls/index.ts +++ b/dashboards-observability/public/components/event_analytics/explorer/visualizations/config_panel/config_panes/config_controls/index.ts @@ -26,4 +26,3 @@ export { ButtonGroupItem } from './config_button_group'; export { TextInputFieldItem } from './config_text_input'; export { ConfigBarChartStyles } from './config_bar_chart_styles'; export { ConfigAvailability } from './config_availability'; -export { ConfigYAxisSide } from './config_yaxis_side'; diff --git a/dashboards-observability/public/components/event_analytics/explorer/visualizations/index.tsx b/dashboards-observability/public/components/event_analytics/explorer/visualizations/index.tsx index ab4c40e26..98ab13799 100644 --- a/dashboards-observability/public/components/event_analytics/explorer/visualizations/index.tsx +++ b/dashboards-observability/public/components/event_analytics/explorer/visualizations/index.tsx @@ -126,7 +126,7 @@ export const ExplorerVisualizations = ({
{renderDataConfigContainer()}
- + - +

- No results found + No data found

diff --git a/dashboards-observability/public/components/event_analytics/explorer/visualizations/shared_components/empty_placeholder.tsx b/dashboards-observability/public/components/event_analytics/explorer/visualizations/shared_components/empty_placeholder.tsx index 54e9f1cb6..56b8886fe 100644 --- a/dashboards-observability/public/components/event_analytics/explorer/visualizations/shared_components/empty_placeholder.tsx +++ b/dashboards-observability/public/components/event_analytics/explorer/visualizations/shared_components/empty_placeholder.tsx @@ -20,7 +20,7 @@ export const EmptyPlaceholder = (props: { icon: string }) => (

- +

diff --git a/dashboards-observability/public/components/event_analytics/explorer/visualizations/shared_components/index.ts b/dashboards-observability/public/components/event_analytics/explorer/visualizations/shared_components/index.ts index dfbd82f35..118494bbd 100644 --- a/dashboards-observability/public/components/event_analytics/explorer/visualizations/shared_components/index.ts +++ b/dashboards-observability/public/components/event_analytics/explorer/visualizations/shared_components/index.ts @@ -4,5 +4,5 @@ */ export * from './empty_placeholder'; -export { ToolbarPopoverProps, ToolbarPopover } from './toolbar_popover'; export { ToolbarButtonProps, ToolbarButton } from './toolbar_button'; +export { VisCanvassPlaceholder } from './vis_canvass_placeholder' diff --git a/dashboards-observability/public/components/event_analytics/explorer/visualizations/shared_components/vis_canvass_placeholder.tsx b/dashboards-observability/public/components/event_analytics/explorer/visualizations/shared_components/vis_canvass_placeholder.tsx new file mode 100644 index 000000000..5ebede43e --- /dev/null +++ b/dashboards-observability/public/components/event_analytics/explorer/visualizations/shared_components/vis_canvass_placeholder.tsx @@ -0,0 +1,26 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +import React from 'react'; +import { EuiIcon, EuiText, EuiSpacer } from '@elastic/eui'; +import './empty_placeholder.scss'; + +export const VisCanvassPlaceholder = (props: { message: string; icon: string }) => ( + <> + + + +

+ { props.message } +

+
+ +); diff --git a/dashboards-observability/public/components/event_analytics/explorer/visualizations/workspace_panel/workspace_panel.scss b/dashboards-observability/public/components/event_analytics/explorer/visualizations/workspace_panel/workspace_panel.scss index cddc15f93..a7c2eb66d 100644 --- a/dashboards-observability/public/components/event_analytics/explorer/visualizations/workspace_panel/workspace_panel.scss +++ b/dashboards-observability/public/components/event_analytics/explorer/visualizations/workspace_panel/workspace_panel.scss @@ -20,6 +20,6 @@ } #vis__mainContent .ws__central--canvas { - background-color: #fff; - + background-color: #FFF; + border-right: 1px solid #D3DAE6; } diff --git a/dashboards-observability/public/components/event_analytics/home/__tests__/__snapshots__/saved_query_table.test.tsx.snap b/dashboards-observability/public/components/event_analytics/home/__tests__/__snapshots__/saved_query_table.test.tsx.snap index 8af7afe8b..fcaaa6c53 100644 --- a/dashboards-observability/public/components/event_analytics/home/__tests__/__snapshots__/saved_query_table.test.tsx.snap +++ b/dashboards-observability/public/components/event_analytics/home/__tests__/__snapshots__/saved_query_table.test.tsx.snap @@ -157,6 +157,11 @@ exports[`Saved query table component Renders saved query table 1`] = ` "value": "Query", "view": "Query", }, + Object { + "name": "Metric", + "value": "Metric", + "view": "Metric", + }, ], "type": "field_value_selection", }, @@ -194,6 +199,11 @@ exports[`Saved query table component Renders saved query table 1`] = ` "value": "Query", "view": "Query", }, + Object { + "name": "Metric", + "value": "Metric", + "view": "Metric", + }, ], "type": "field_value_selection", }, @@ -337,6 +347,11 @@ exports[`Saved query table component Renders saved query table 1`] = ` "value": "Query", "view": "Query", }, + Object { + "name": "Metric", + "value": "Metric", + "view": "Metric", + }, ], "type": "field_value_selection", }, @@ -384,6 +399,11 @@ exports[`Saved query table component Renders saved query table 1`] = ` "value": "Query", "view": "Query", }, + Object { + "name": "Metric", + "value": "Metric", + "view": "Metric", + }, ], "type": "field_value_selection", } diff --git a/dashboards-observability/public/components/event_analytics/home/home.tsx b/dashboards-observability/public/components/event_analytics/home/home.tsx index ecd6f79c3..1de183f49 100644 --- a/dashboards-observability/public/components/event_analytics/home/home.tsx +++ b/dashboards-observability/public/components/event_analytics/home/home.tsx @@ -53,6 +53,7 @@ import { addTab, selectQueryTabs } from '../redux/slices/query_tab_slice'; import { init as initFields } from '../redux/slices/field_slice'; import { init as initQuery, changeQuery } from '../redux/slices/query_slice'; import { init as initQueryResult, selectQueryResult } from '../redux/slices/query_result_slice'; +import { init as initPatterns } from '../redux/slices/patterns_slice'; import { SavedQueryTable } from './saved_objects_table'; import { selectQueries } from '../redux/slices/query_slice'; import { setSelectedQueryTab } from '../redux/slices/query_tab_slice'; @@ -152,6 +153,7 @@ export const Home = (props: IHomeProps) => { dispatch(initQueryResult({ tabId })); dispatch(initFields({ tabId })); dispatch(addTab({ tabId })); + dispatch(initPatterns({ tabId })); }); return tabId; diff --git a/dashboards-observability/public/components/event_analytics/home/saved_objects_table.tsx b/dashboards-observability/public/components/event_analytics/home/saved_objects_table.tsx index 0588232a5..afe00992f 100644 --- a/dashboards-observability/public/components/event_analytics/home/saved_objects_table.tsx +++ b/dashboards-observability/public/components/event_analytics/home/saved_objects_table.tsx @@ -6,6 +6,7 @@ import React, { useState, useRef } from 'react'; import { EuiLink, EuiInMemoryTable, EuiIcon } from '@elastic/eui'; import { FILTER_OPTIONS } from '../../../../common/constants/explorer'; +import { isEmpty } from 'lodash'; interface savedQueryTableProps { savedHistories: Array; @@ -86,6 +87,14 @@ export function SavedQueryTable({ const isSavedVisualization = h.hasOwnProperty('savedVisualization'); const savedObject = isSavedVisualization ? h.savedVisualization : h.savedQuery; const curType = isSavedVisualization ? 'savedVisualization' : 'savedQuery'; + var subType = ''; + if (isSavedVisualization) { + if (savedObject?.sub_type === 'metric') { + subType = 'Metric' + } else { + subType = savedObject?.sub_type; + } + } const record = { objectId: h.objectId, objectType: curType, @@ -100,7 +109,7 @@ export function SavedQueryTable({ id: h.objectId, data: record, name: savedObject.name, - type: isSavedVisualization ? 'Visualization' : 'Query', + type: isSavedVisualization ? (!isEmpty(subType)) ? subType: 'Visualization' : 'Query', }; }); diff --git a/dashboards-observability/public/components/event_analytics/hooks/index.ts b/dashboards-observability/public/components/event_analytics/hooks/index.ts index 0f884788c..aa6204c9e 100644 --- a/dashboards-observability/public/components/event_analytics/hooks/index.ts +++ b/dashboards-observability/public/components/event_analytics/hooks/index.ts @@ -4,6 +4,7 @@ */ export { useFetchEvents } from './use_fetch_events'; +export { useFetchPatterns } from './use_fetch_patterns'; export { useFetchVisualizations } from './use_fetch_visualizations'; -export { TabContext } from './use_tab_context'; export { useRenderVisualization } from './use_render_visualizations'; +export { TabContext } from './use_tab_context'; diff --git a/dashboards-observability/public/components/event_analytics/hooks/use_fetch_events.ts b/dashboards-observability/public/components/event_analytics/hooks/use_fetch_events.ts index c8f2fda0c..4bab88084 100644 --- a/dashboards-observability/public/components/event_analytics/hooks/use_fetch_events.ts +++ b/dashboards-observability/public/components/event_analytics/hooks/use_fetch_events.ts @@ -16,6 +16,7 @@ import { QUERIED_FIELDS, } from '../../../../common/constants/explorer'; import { fetchSuccess, reset as queryResultReset } from '../redux/slices/query_result_slice'; +import { reset as patternsReset } from '../redux/slices/patterns_slice'; import { selectQueries } from '../redux/slices/query_slice'; import { reset as visualizationReset } from '../redux/slices/visualization_slice'; import { updateFields, sortFields, selectFields } from '../redux/slices/field_slice'; @@ -39,36 +40,27 @@ export const useFetchEvents = ({ pplService, requestParams }: IFetchEventsParams fieldsRef.current = fields; responseRef.current = response; - const fetchEvents = async ( + const fetchEvents = ( { query }: { query: string }, format: string, - handler: (res: any) => void, + handler: (res: any) => unknown, errorHandler?: (error: any) => void ) => { setIsEventsLoading(true); - await pplService - .fetch( - { - query, - format, - }, - errorHandler - ) - .then((res: any) => { - handler(res); - }) + return pplService + .fetch({ query, format }, errorHandler) + .then((res: any) => handler(res)) .catch((err: any) => { console.error(err); + throw err; }) - .finally(() => { - setIsEventsLoading(false); - }); + .finally(() => setIsEventsLoading(false)); }; const dispatchOnGettingHis = (res: any) => { - const selectedFields: Array = fieldsRef.current![requestParams.tabId][ - SELECTED_FIELDS - ].map((field: IField) => field.name); + const selectedFields: string[] = fieldsRef.current![requestParams.tabId][SELECTED_FIELDS].map( + (field: IField) => field.name + ); setResponse(res); batch(() => { dispatch( @@ -90,16 +82,7 @@ export const useFetchEvents = ({ pplService, requestParams }: IFetchEventsParams data: { [UNSELECTED_FIELDS]: res?.schema ? [...res.schema] : [], [QUERIED_FIELDS]: [], - [SELECTED_FIELDS]: [], - [AVAILABLE_FIELDS]: res?.schema - ? isEmpty(selectedFields) - ? [...res.schema] - : [ - ...res?.schema.filter( - (curField: IField) => !selectedFields.includes(curField.name) - ), - ] - : [], + [AVAILABLE_FIELDS]: res?.schema || [], }, }) ); @@ -147,6 +130,11 @@ export const useFetchEvents = ({ pplService, requestParams }: IFetchEventsParams tabId: requestParams.tabId, }) ); + dispatch( + patternsReset({ + tabId: requestParams.tabId, + }) + ); }); }; diff --git a/dashboards-observability/public/components/event_analytics/hooks/use_fetch_patterns.ts b/dashboards-observability/public/components/event_analytics/hooks/use_fetch_patterns.ts new file mode 100644 index 000000000..dc26b57b3 --- /dev/null +++ b/dashboards-observability/public/components/event_analytics/hooks/use_fetch_patterns.ts @@ -0,0 +1,175 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +import { IField, PatternTableData } from 'common/types/explorer'; +import { isUndefined } from 'lodash'; +import PPLService from 'public/services/requests/ppl'; +import { useRef } from 'react'; +import { batch, useDispatch, useSelector } from 'react-redux'; +import { + FINAL_QUERY, + PATTERNS_REGEX, + PATTERN_REGEX, + SELECTED_PATTERN_FIELD, + SELECTED_TIMESTAMP, +} from '../../../../common/constants/explorer'; +import { buildPatternsQuery } from '../../../../common/utils/query_utils'; +import { IPPLEventsDataSource } from '../../../../server/common/types'; +import { reset as resetPatterns, setPatterns } from '../redux/slices/patterns_slice'; +import { changeQuery, selectQueries } from '../redux/slices/query_slice'; +import { useFetchEvents } from './use_fetch_events'; + +interface IFetchPatternsParams { + pplService: PPLService; + requestParams: { tabId: string }; +} + +export const useFetchPatterns = ({ pplService, requestParams }: IFetchPatternsParams) => { + const dispatch = useDispatch(); + const { isEventsLoading, fetchEvents } = useFetchEvents({ + pplService, + requestParams, + }); + const queries = useSelector(selectQueries); + const queriesRef = useRef(); + queriesRef.current = queries; + + const dispatchOnPatterns = (res: { patternTableData: PatternTableData[] }) => { + batch(() => { + dispatch( + resetPatterns({ + tabId: requestParams.tabId, + }) + ); + dispatch( + setPatterns({ + tabId: requestParams.tabId, + data: { + ...res, + }, + }) + ); + }); + }; + + const buildPatternDataQuery = (query: string, patternField: string, patternRegex: string) => { + let statsQuery = buildPatternsQuery(query, patternField, patternRegex); + statsQuery += ` | stats count(), take(\`${patternField}\`, 1) by patterns_field`; + return statsQuery; + }; + + const buildPatternAnomaliesQuery = ( + query: string, + patternField: string, + patternRegex: string, + timestampField: string, + interval: string + ) => { + let adQuery = buildPatternsQuery(query, patternField, patternRegex); + adQuery += + ` | stats count() by span(\`${timestampField}\`, 1${interval || 'm'}) as timestamp, ` + + `patterns_field | AD time_field='timestamp' category_field='patterns_field'`; + return adQuery; + }; + + const clearPatternCommands = (query: string) => query.replace(PATTERNS_REGEX, ''); + + const getPatterns = (interval: string, errorHandler?: (error: any) => void, query?: string) => { + const cur = queriesRef.current; + const rawQuery = cur![requestParams.tabId][FINAL_QUERY]; + const searchQuery = isUndefined(query) ? clearPatternCommands(rawQuery) : query; + const patternField = cur![requestParams.tabId][SELECTED_PATTERN_FIELD]; + const timestampField = cur![requestParams.tabId][SELECTED_TIMESTAMP]; + const patternRegex = cur![requestParams.tabId][PATTERN_REGEX]; + const statsQuery = buildPatternDataQuery(searchQuery, patternField, patternRegex); + const anomaliesQuery = buildPatternAnomaliesQuery( + searchQuery, + patternField, + patternRegex, + timestampField, + interval + ); + // Fetch patterns data for the current query results + Promise.allSettled([ + fetchEvents({ query: statsQuery }, 'jdbc', (res) => res), + fetchEvents({ query: anomaliesQuery }, 'jdbc', (res) => res), + ]) + .then((res) => { + const [statsResp, anomaliesResp] = res as PromiseSettledResult[]; + if (statsResp.status === 'rejected') { + throw statsResp.reason; + } + + let anomaliesResultsAvailable = true; + const anomaliesMap: { [x: string]: number } = {}; + if (anomaliesResp.status === 'fulfilled') { + anomaliesResp.value.datarows.forEach((row) => { + const pattern = row[2]; + const score = row[3]; + if (score > 0) { + anomaliesMap[pattern] = (anomaliesMap[pattern] || 0) + 1; + } + }); + } else { + console.error('Error fetching anomalies in patterns'); + anomaliesResultsAvailable = false; + } + + const formatToTableData: PatternTableData[] = statsResp.value.datarows.map((row) => ({ + count: row[0], + pattern: row[2], + sampleLog: row[1][0], + anomalyCount: anomaliesResultsAvailable ? anomaliesMap[row[2]] || 0 : undefined, + })); + dispatchOnPatterns({ patternTableData: formatToTableData }); + }) + .catch(errorHandler); + }; + + const setDefaultPatternsField = async ( + index: string, + patternField: string, + errorHandler?: (error: any) => void + ) => { + if (!patternField && index) { + const query = `source = ${index} | head 1`; + await fetchEvents( + { query }, + 'jdbc', + async (res: any) => { + // Create array of only string type fields + const textFields = res.schema.filter((field: IField) => field.type === 'string'); + // Loop through array and find field with longest value + let defaultPatternField = ''; + let maxLength = 0; + textFields.forEach((field: IField, i: number) => { + const curLength = res.jsonData[0][field.name].length; + if (curLength > maxLength) { + maxLength = curLength; + defaultPatternField = field.name; + } + }); + patternField = defaultPatternField; + }, + errorHandler + ); + } + // Set pattern to the pattern passed in or the default pattern field found if pattern is empty + dispatch( + changeQuery({ + tabId: requestParams.tabId, + query: { + [SELECTED_PATTERN_FIELD]: patternField, + }, + }) + ); + }; + + return { + isEventsLoading, + getPatterns, + setDefaultPatternsField, + }; +}; diff --git a/dashboards-observability/public/components/event_analytics/hooks/use_fetch_visualizations.ts b/dashboards-observability/public/components/event_analytics/hooks/use_fetch_visualizations.ts index 446bcf229..1586bb768 100644 --- a/dashboards-observability/public/components/event_analytics/hooks/use_fetch_visualizations.ts +++ b/dashboards-observability/public/components/event_analytics/hooks/use_fetch_visualizations.ts @@ -18,6 +18,7 @@ import { render as renderExplorerVis } from '../redux/slices/visualization_slice import { updateFields, sortFields } from '../redux/slices/field_slice'; import PPLService from '../../../services/requests/ppl'; import { fetchSuccess } from '../redux/slices/query_result_slice'; +import { setPatterns, reset as patternsReset } from '../redux/slices/patterns_slice'; interface IFetchVisualizationsParams { pplService: PPLService; @@ -119,6 +120,11 @@ export const useFetchVisualizations = ({ data: [QUERIED_FIELDS], }) ); + dispatch( + patternsReset({ + tabId: requestParams.tabId, + }) + ); }); }, (error: any) => { diff --git a/dashboards-observability/public/components/event_analytics/redux/slices/patterns_slice.ts b/dashboards-observability/public/components/event_analytics/redux/slices/patterns_slice.ts new file mode 100644 index 000000000..6f6ebf4bd --- /dev/null +++ b/dashboards-observability/public/components/event_analytics/redux/slices/patterns_slice.ts @@ -0,0 +1,37 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ +/* eslint-disable import/no-default-export */ + +import { createSlice } from '@reduxjs/toolkit'; +import { fetchSuccess as fetchSuccessReducer } from '../reducers'; +import { initialTabId } from '../../../../framework/redux/store/shared_state'; +import { REDUX_EXPL_SLICE_PATTERNS } from '../../../../../common/constants/explorer'; + +const initialState = { + [initialTabId]: {}, +}; + +export const patternsSlice = createSlice({ + name: REDUX_EXPL_SLICE_PATTERNS, + initialState, + reducers: { + setPatterns: fetchSuccessReducer, + reset: (state, { payload }) => { + state[payload.tabId] = {}; + }, + init: (state, { payload }) => { + state[payload.tabId] = {}; + }, + remove: (state, { payload }) => { + delete state[payload.tabId]; + }, + }, +}); + +export const { setPatterns, remove, reset, init } = patternsSlice.actions; + +export const selectPatterns = (state) => state.patterns; + +export default patternsSlice.reducer; diff --git a/dashboards-observability/public/components/event_analytics/redux/slices/query_slice.ts b/dashboards-observability/public/components/event_analytics/redux/slices/query_slice.ts index 6d82265e1..c3653debc 100644 --- a/dashboards-observability/public/components/event_analytics/redux/slices/query_slice.ts +++ b/dashboards-observability/public/components/event_analytics/redux/slices/query_slice.ts @@ -4,21 +4,28 @@ */ import { createSlice } from '@reduxjs/toolkit'; -import { initialTabId } from '../../../../framework/redux/store/shared_state'; import { - RAW_QUERY, + APP_ANALYTICS_TAB_ID_REGEX, + FILTERED_PATTERN, FINAL_QUERY, - SELECTED_DATE_RANGE, - REDUX_EXPL_SLICE_QUERIES, INDEX, + PATTERN_REGEX, + PPL_DEFAULT_PATTERN_REGEX_FILETER, + RAW_QUERY, + REDUX_EXPL_SLICE_QUERIES, + SELECTED_DATE_RANGE, + SELECTED_PATTERN_FIELD, SELECTED_TIMESTAMP, - APP_ANALYTICS_TAB_ID_REGEX, } from '../../../../../common/constants/explorer'; +import { initialTabId } from '../../../../framework/redux/store/shared_state'; const initialQueryState = { [RAW_QUERY]: '', [FINAL_QUERY]: '', [INDEX]: '', + [SELECTED_PATTERN_FIELD]: '', + [PATTERN_REGEX]: PPL_DEFAULT_PATTERN_REGEX_FILETER, + [FILTERED_PATTERN]: '', [SELECTED_TIMESTAMP]: '', [SELECTED_DATE_RANGE]: ['now-15m', 'now'], }; @@ -27,6 +34,9 @@ const appBaseQueryState = { [RAW_QUERY]: '', [FINAL_QUERY]: '', [INDEX]: '', + [SELECTED_PATTERN_FIELD]: '', + [PATTERN_REGEX]: PPL_DEFAULT_PATTERN_REGEX_FILETER, + [FILTERED_PATTERN]: '', [SELECTED_TIMESTAMP]: '', [SELECTED_DATE_RANGE]: ['now-24h', 'now'], }; diff --git a/dashboards-observability/public/components/event_analytics/utils/index.tsx b/dashboards-observability/public/components/event_analytics/utils/index.tsx index f509de965..9330a070b 100644 --- a/dashboards-observability/public/components/event_analytics/utils/index.tsx +++ b/dashboards-observability/public/components/event_analytics/utils/index.tsx @@ -11,5 +11,5 @@ export { populateDataGrid, isValidTraceId, formatError, - findAutoInterval, + getDefaultVisConfig } from './utils'; diff --git a/dashboards-observability/public/components/event_analytics/utils/utils.tsx b/dashboards-observability/public/components/event_analytics/utils/utils.tsx index 889a53b7a..494d1e06a 100644 --- a/dashboards-observability/public/components/event_analytics/utils/utils.tsx +++ b/dashboards-observability/public/components/event_analytics/utils/utils.tsx @@ -5,11 +5,17 @@ */ import dateMath from '@elastic/datemath'; -import { uniqueId } from 'lodash'; +import { uniqueId, isEmpty } from 'lodash'; import moment from 'moment'; import React from 'react'; import { HttpStart } from '../../../../../../src/core/public'; -import { CUSTOM_LABEL, TIME_INTERVAL_OPTIONS } from '../../../../common/constants/explorer'; +import { + CUSTOM_LABEL, + TIME_INTERVAL_OPTIONS, + GROUPBY, + AGGREGATIONS, + BREAKDOWNS, +} from '../../../../common/constants/explorer'; import { PPL_DATE_FORMAT, PPL_INDEX_REGEX } from '../../../../common/constants/shared'; import { ConfigListEntry, @@ -20,6 +26,12 @@ import { import PPLService from '../../../services/requests/ppl'; import { DocViewRow, IDocType } from '../explorer/events_views'; import { ConfigTooltip } from '../explorer/visualizations/config_panel/config_panes/config_controls'; +import { + GroupByChunk, + GroupField, + StatsAggregationChunk, + statsChunk, +} from '../../../../common/query_manager/ast/types'; // Create Individual table rows for events datagrid and flyouts export const getTrs = ( @@ -267,32 +279,6 @@ export const formatError = (name: string, message: string, details: string) => { }; }; -export const findAutoInterval = (start: string = '', end: string = '') => { - let minInterval = 'y'; - if (start?.length === 0 || end?.length === 0 || start === end) - return ['d', [...TIME_INTERVAL_OPTIONS]]; - const momentStart = dateMath.parse(start)!; - const momentEnd = dateMath.parse(end)!; - const diffSeconds = momentEnd.unix() - momentStart.unix(); - - // less than 1 second - if (diffSeconds <= 1) minInterval = 'ms'; - // less than 2 minutes - else if (diffSeconds <= 60 * 2) minInterval = 's'; - // less than 2 hours - else if (diffSeconds <= 3600 * 2) minInterval = 'm'; - // less than 2 days - else if (diffSeconds <= 86400 * 2) minInterval = 'h'; - // less than 1 month - else if (diffSeconds <= 86400 * 31) minInterval = 'd'; - // less than 3 months - else if (diffSeconds <= 86400 * 93) minInterval = 'w'; - // less than 1 year - else if (diffSeconds <= 86400 * 366) minInterval = 'M'; - - return [minInterval, [{ text: 'Auto', value: 'auto_' + minInterval }, ...TIME_INTERVAL_OPTIONS]]; -}; - export const hexToRgb = ( hex: string = '#3CA1C7', opacity: number = 1, @@ -390,3 +376,56 @@ export const getPropName = (queriedVizObj: { return ''; } }; + +export const getDefaultVisConfig = (statsToken: statsChunk) => { + if (statsToken === null) { + return { + [GROUPBY]: [], + [AGGREGATIONS]: [], + [BREAKDOWNS]: [], + }; + } + + const groupByToken = statsToken.groupby; + // const seriesToken = statsToken.aggregations && statsToken.aggregations[0]; + const span = getSpanValue(groupByToken); + return { + [AGGREGATIONS]: statsToken.aggregations.map((agg) => ({ + label: agg.function?.value_expression, + name: agg.function?.value_expression, + aggregation: agg.function?.name, + [CUSTOM_LABEL]: agg[CUSTOM_LABEL as keyof StatsAggregationChunk], + })), + [GROUPBY]: groupByToken?.group_fields?.map((agg) => ({ + label: agg.name ?? '', + name: agg.name ?? '', + [CUSTOM_LABEL]: agg[CUSTOM_LABEL as keyof GroupField] ?? '', + })), + span, + }; +}; + +const getSpanValue = (groupByToken: GroupByChunk) => { + const timeUnitValue = TIME_INTERVAL_OPTIONS.find( + (time_unit) => time_unit.value === groupByToken?.span?.span_expression.time_unit + )?.text; + return !isEmpty(groupByToken?.span) + ? { + time_field: [ + { + name: groupByToken?.span?.span_expression?.field, + type: 'timestamp', + label: groupByToken?.span?.span_expression?.field, + }, + ], + unit: [ + { + text: timeUnitValue, + value: groupByToken?.span?.span_expression?.time_unit, + label: timeUnitValue, + }, + ], + interval: groupByToken?.span?.span_expression?.literal_value, + } + : undefined; +}; diff --git a/dashboards-observability/public/components/metrics/helpers/__tests__/utils.test.tsx b/dashboards-observability/public/components/metrics/helpers/__tests__/utils.test.tsx new file mode 100644 index 000000000..fa599cc0a --- /dev/null +++ b/dashboards-observability/public/components/metrics/helpers/__tests__/utils.test.tsx @@ -0,0 +1,100 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +import { configure } from 'enzyme'; +import Adapter from 'enzyme-adapter-react-16'; +import { DurationRange } from '@elastic/eui/src/components/date_picker/types'; +import { + createPrometheusMetricById, + getNewVizDimensions, + mergeLayoutAndMetrics, + onTimeChange, + sortMetricLayout, + updateMetricsWithSelections, +} from '../utils'; +import { + samplePanelVisualizations1, + samplenewDimensions1, + samplenewDimensions2, + samplePanelVisualizations2, + sampleMetricsVisualizations, + samplePrometheusVisualizationComponent, + samplePrometheusVisualizationId, + sampleLayout, + sampleVisualizationsList, + sampleMergedVisualizations, + samplePrometheusSampleUpdateWithSelections, + sampleSavedMetric, + sampleSavedMetricUpdate, +} from '../../../../../test/metrics_contants'; +import _ from 'lodash'; + +describe('Utils helper functions', () => { + configure({ adapter: new Adapter() }); + + it('validates onTimeChange function', () => { + const setRecentlyUsedRanges = jest.fn((x) => x); + const setStart = jest.fn(); + const setEnd = jest.fn(); + const recentlyUsedRanges: DurationRange[] = []; + onTimeChange( + '2022-01-30T18:44:40.577Z', + '2022-02-25T19:18:33.075Z', + recentlyUsedRanges, + setRecentlyUsedRanges, + setStart, + setEnd + ); + expect(setRecentlyUsedRanges).toHaveBeenCalledWith([ + { start: '2022-01-30T18:44:40.577Z', end: '2022-02-25T19:18:33.075Z' }, + ]); + expect(setStart).toHaveBeenCalledWith('2022-01-30T18:44:40.577Z'); + expect(setEnd).toHaveBeenCalledWith('2022-02-25T19:18:33.075Z'); + }); + + it('validates getNewVizDimensions function', () => { + expect(getNewVizDimensions([])).toMatchObject({ + x: 0, + y: 0, + w: 12, + h: 2, + }); + + expect(getNewVizDimensions(samplePanelVisualizations1)).toStrictEqual(samplenewDimensions1); + expect(getNewVizDimensions(samplePanelVisualizations2)).toStrictEqual(samplenewDimensions2); + }); + + it('validates sortMetricLayout function', () => { + expect(sortMetricLayout(_.shuffle(sampleMetricsVisualizations))).toStrictEqual( + sampleMetricsVisualizations + ); + + expect(sortMetricLayout(_.shuffle(sampleMetricsVisualizations))).toStrictEqual( + sampleMetricsVisualizations + ); + }); + + it('validates mergeLayoutAndMetrics function', () => { + expect(mergeLayoutAndMetrics(sampleLayout, sampleVisualizationsList)).toStrictEqual( + sampleMergedVisualizations + ); + }); + + it('validates createPrometheusMetricById function', () => { + expect(createPrometheusMetricById(samplePrometheusVisualizationId)).toStrictEqual( + samplePrometheusVisualizationComponent + ); + }); + + it('validates updateMetricsWithSelections function', () => { + expect( + updateMetricsWithSelections(samplePrometheusVisualizationComponent, 'now-1d', 'now', '1h') + ).toStrictEqual(samplePrometheusSampleUpdateWithSelections); + + expect(updateMetricsWithSelections(sampleSavedMetric, 'now-30m', 'now', '1m')).toStrictEqual( + sampleSavedMetricUpdate + ); + }); +}); diff --git a/dashboards-observability/public/components/metrics/helpers/utils.tsx b/dashboards-observability/public/components/metrics/helpers/utils.tsx new file mode 100644 index 000000000..dd7524bd3 --- /dev/null +++ b/dashboards-observability/public/components/metrics/helpers/utils.tsx @@ -0,0 +1,212 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +import dateMath from '@elastic/datemath'; +import { ShortDate } from '@elastic/eui'; +import { DurationRange } from '@elastic/eui/src/components/date_picker/types'; +import _ from 'lodash'; +import React from 'react'; +import { Layout } from 'react-grid-layout'; +import { VISUALIZATION, SAVED_VISUALIZATION } from '../../../../common/constants/metrics'; +import { + EVENT_ANALYTICS, + OBSERVABILITY_BASE, + SAVED_OBJECTS, +} from '../../../../common/constants/shared'; +import PPLService from '../../../services/requests/ppl'; +import { CoreStart } from '../../../../../../src/core/public'; +import { MetricType } from '../../../../common/types/metrics'; +import { VisualizationType } from '../../../../common/types/custom_panels'; +import { DEFAULT_METRIC_HEIGHT, DEFAULT_METRIC_WIDTH } from '../../../../common/constants/metrics'; +import { UNITS_OF_MEASURE } from '../../../../common/constants/explorer'; +import { updateQuerySpanInterval } from '../../custom_panels/helpers/utils'; + +export const onTimeChange = ( + start: ShortDate, + end: ShortDate, + recentlyUsedRanges: DurationRange[], + setRecentlyUsedRanges: React.Dispatch>, + setStart: React.Dispatch>, + setEnd: React.Dispatch> +) => { + const recentlyUsedRange = recentlyUsedRanges.filter((recentlyUsedRange) => { + const isDuplicate = recentlyUsedRange.start === start && recentlyUsedRange.end === end; + return !isDuplicate; + }); + recentlyUsedRange.unshift({ start, end }); + setStart(start); + setEnd(end); + setRecentlyUsedRanges(recentlyUsedRange.slice(0, 9)); +}; + +// PPL Service requestor +export const pplServiceRequestor = (pplService: PPLService, finalQuery: string) => { + return pplService.fetch({ query: finalQuery, format: VISUALIZATION }).catch((error: Error) => { + console.error(error); + }); +}; + +// Observability backend to fetch visualizations/custom metrics +export const getVisualizations = (http: CoreStart['http']) => { + return http + .get(`${OBSERVABILITY_BASE}${EVENT_ANALYTICS}${SAVED_OBJECTS}`, { + query: { objectType: [SAVED_VISUALIZATION] }, + }) + .catch((err) => { + console.error('Issue in fetching all saved visualizations', err); + }); +}; + +interface boxType { + x1: number; + y1: number; + x2: number; + y2: number; +} + +const calculatOverlapArea = (bb1: boxType, bb2: boxType) => { + const x_left = Math.max(bb1.x1, bb2.x1); + const y_top = Math.max(bb1.y1, bb2.y1); + const x_right = Math.min(bb1.x2, bb2.x2); + const y_bottom = Math.min(bb1.y2, bb2.y2); + + if (x_right < x_left || y_bottom < y_top) return 0; + return (x_right - x_left) * (y_bottom - y_top); +}; + +const getTotalOverlapArea = (panelVisualizations: MetricType[]) => { + const newVizBox = { x1: 0, y1: 0, x2: DEFAULT_METRIC_WIDTH, y2: DEFAULT_METRIC_HEIGHT }; + const currentVizBoxes = panelVisualizations.map((visualization) => { + return { + x1: visualization.x, + y1: visualization.y, + x2: visualization.x + visualization.w, + y2: visualization.y + visualization.h, + }; + }); + + let isOverlapping = 0; + currentVizBoxes.map((viz) => { + isOverlapping += calculatOverlapArea(viz, newVizBox); + }); + return isOverlapping; +}; + +// We want to check if the new visualization being added, can be placed at { x: 0, y: 0, w: 6, h: 4 }; +// To check this we try to calculate overlap between all the current visualizations and new visualization +// if there is no overalap (i.e Total Overlap Area is 0), we place the new viz. in default position +// else, we add it to the bottom of the panel +export const getNewVizDimensions = (panelVisualizations: MetricType[]) => { + let maxY: number = 0; + let maxYH: number = 0; + + // check if we can place the new visualization at default location + if (getTotalOverlapArea(panelVisualizations) === 0) { + return { x: 0, y: 0, w: DEFAULT_METRIC_WIDTH, h: DEFAULT_METRIC_HEIGHT }; + } + + // else place the new visualization at the bottom of the panel + panelVisualizations.map((panelVisualization: MetricType) => { + if (panelVisualization.y >= maxY) { + maxY = panelVisualization.y; + maxYH = panelVisualization.h; + } + }); + + return { x: 0, y: maxY + maxYH, w: DEFAULT_METRIC_WIDTH, h: DEFAULT_METRIC_HEIGHT }; +}; + +export const getMinSpanInterval = (start: any, end: any) => { + const momentStart = dateMath.parse(start)!; + const momentEnd = dateMath.parse(end, { roundUp: true })!; + const diffSeconds = momentEnd.unix() - momentStart.unix(); + let minInterval; + // // less than 1 second + // if (diffSeconds <= 1) minInterval = 'ms'; + // less than 2 minutes + if (diffSeconds <= 60 * 2) minInterval = 's'; + // less than 2 hours + else if (diffSeconds <= 3600 * 2) minInterval = 'm'; + // less than 2 days + else if (diffSeconds <= 86400 * 2) minInterval = 'h'; + // less than 1 month + else if (diffSeconds <= 86400 * 31) minInterval = 'd'; + // less than 3 months + else if (diffSeconds <= 86400 * 93) minInterval = 'w'; + // less than 1 year + else if (diffSeconds <= 86400 * 366) minInterval = 'M'; + + return minInterval; +}; + +// Merges new layout into visualizations +export const mergeLayoutAndMetrics = ( + layout: Layout[], + newVisualizationList: VisualizationType[] +) => { + const newPanelVisualizations: VisualizationType[] = []; + + for (let i = 0; i < newVisualizationList.length; i++) { + for (let j = 0; j < layout.length; j++) { + if (newVisualizationList[i].id == layout[j].i) { + newPanelVisualizations.push({ + ...newVisualizationList[i], + x: layout[j].x, + y: layout[j].y, + w: layout[j].w, + h: layout[j].h, + }); + } + } + } + return newPanelVisualizations; +}; + +export const sortMetricLayout = (metricsLayout: MetricType[]) => { + return metricsLayout.sort((a: MetricType, b: MetricType) => { + if (a.y > b.y) return 1; + if (a.y < b.y) return -1; + else return 0; + }); +}; + +export const createPrometheusMetricById = (metricId: string) => { + return { + name: '[Prometheus Metric] ' + metricId, + description: '', + query: 'source = ' + metricId + ' | stats avg(@value) by span(@timestamp,1h)', + type: 'line', + timeField: '@timestamp', + selected_fields: { + text: '', + tokens: [], + }, + sub_type: 'metric', + user_configs: {}, + }; +}; + +export const updateMetricsWithSelections = ( + savedVisualization: any, + startTime: ShortDate, + endTime: ShortDate, + spanValue: string +) => { + return { + query: updateQuerySpanInterval( + savedVisualization.query, + savedVisualization.timeField, + spanValue + ), + fields: savedVisualization.selected_fields.tokens, + dateRange: [startTime, endTime], + timestamp: savedVisualization.timeField, + name: savedVisualization.name, + description: savedVisualization.description, + type: 'line', + subType: 'metric', + userConfigs: JSON.stringify(savedVisualization.user_configs), + }; +}; diff --git a/dashboards-observability/public/components/metrics/index.scss b/dashboards-observability/public/components/metrics/index.scss new file mode 100644 index 000000000..1b9696545 --- /dev/null +++ b/dashboards-observability/public/components/metrics/index.scss @@ -0,0 +1,24 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +#opensearch-dashboards-body { + overflow-y: hidden; +} + +.liveStream { + margin : 8px; + height: 40px; + align-items: center; + justify-content: center; + flex-direction: row; + display: flex; + flex-grow: 1; + vertical-align: baseline; +} + +.mainContentTabs .euiResizableContainer { + height: calc(100vh - 298px); +} + \ No newline at end of file diff --git a/dashboards-observability/public/components/metrics/index.tsx b/dashboards-observability/public/components/metrics/index.tsx new file mode 100644 index 000000000..0647cdaba --- /dev/null +++ b/dashboards-observability/public/components/metrics/index.tsx @@ -0,0 +1,225 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +import './index.scss'; +import { + EuiButtonIcon, + EuiGlobalToastList, + EuiPage, + EuiPageBody, + htmlIdGenerator, + OnTimeChangeProps, + ShortDate, +} from '@elastic/eui'; +import { DurationRange } from '@elastic/eui/src/components/date_picker/types'; +import React, { useEffect, useState } from 'react'; +import { Route, RouteComponentProps } from 'react-router-dom'; +import classNames from 'classnames'; +import { StaticContext } from 'react-router-dom'; +import { ChromeBreadcrumb, CoreStart, Toast } from '../../../../../src/core/public'; +import { onTimeChange } from './helpers/utils'; +import { Sidebar } from './sidebar/sidebar'; +import { EmptyMetricsView } from './view/empty_view'; +import PPLService from '../../services/requests/ppl'; +import { TopMenu } from './top_menu/top_menu'; +import { MetricType } from '../../../common/types/metrics'; +import { MetricsGrid } from './view/metrics_grid'; +import { useSelector } from 'react-redux'; +import { metricsLayoutSelector, selectedMetricsSelector } from './redux/slices/metrics_slice'; +import { resolutionOptions } from '../../../common/constants/metrics'; +import SavedObjects from '../../services/saved_objects/event_analytics/saved_objects'; + +interface MetricsProps { + http: CoreStart['http']; + chrome: CoreStart['chrome']; + parentBreadcrumb: ChromeBreadcrumb; + renderProps: RouteComponentProps; + pplService: PPLService; + savedObjects: SavedObjects; +} + +export const Home = ({ + http, + chrome, + parentBreadcrumb, + renderProps, + pplService, + savedObjects, +}: MetricsProps) => { + // Redux tools + const selectedMetrics = useSelector(selectedMetricsSelector); + const metricsLayout = useSelector(metricsLayoutSelector); + + // Date picker constants + const [recentlyUsedRanges, setRecentlyUsedRanges] = useState([]); + const [startTime, setStartTime] = useState('now-1d'); + const [endTime, setEndTime] = useState('now'); + + // Top panel + const [IsTopPanelDisabled, setIsTopPanelDisabled] = useState(false); + const [editMode, setEditMode] = useState(false); + const [onRefresh, setOnRefresh] = useState(false); + const [editActionType, setEditActionType] = useState(''); + const [resolutionValue, setResolutionValue] = useState(resolutionOptions[2].value); + const [spanValue, setSpanValue] = useState(1); + const resolutionSelectId = htmlIdGenerator('resolutionSelect')(); + const [toasts, setToasts] = useState([]); + const [toastRightSide, setToastRightSide] = useState(true); + const [search, setSearch] = useState(false); + + // Side bar constants + const [isSidebarClosed, setIsSidebarClosed] = useState(false); + + // Metrics constants + const [panelVisualizations, setPanelVisualizations] = useState([]); + + const setToast = (title: string, color = 'success', text?: ReactChild, side?: string) => { + if (!text) text = ''; + setToastRightSide(!side ? true : false); + setToasts([...toasts, { id: new Date().toISOString(), title, text, color } as Toast]); + }; + + const onRefreshFilters = (startTime: ShortDate, endTime: ShortDate) => { + if (spanValue < 1) { + setToast('Please add a valid span interval', 'danger'); + return; + } + setOnRefresh(!onRefresh); + }; + + const onDatePickerChange = (props: OnTimeChangeProps) => { + onTimeChange( + props.start, + props.end, + recentlyUsedRanges, + setRecentlyUsedRanges, + setStartTime, + setEndTime + ); + onRefreshFilters(props.start, props.end); + }; + + const onEditClick = (savedVisualizationId: string) => { + window.location.assign(`#/event_analytics/explorer/${savedVisualizationId}`); + }; + + const onSideBarClick = () => { + setIsSidebarClosed((staleState) => { + return !staleState; + }); + setTimeout(function () { + window.dispatchEvent(new Event('resize')); + }, 300); + }; + + useEffect(() => { + if (!editMode) { + selectedMetrics.length > 0 ? setIsTopPanelDisabled(false) : setIsTopPanelDisabled(true); + } else { + setIsTopPanelDisabled(true); + } + }, [selectedMetrics, editMode]); + + useEffect(() => { + setPanelVisualizations(metricsLayout); + }, [metricsLayout]); + + const mainSectionClassName = classNames({ + 'col-md-10': !isSidebarClosed, + 'col-md-12': isSidebarClosed, + }); + + const sidebarClassName = classNames({ + closed: isSidebarClosed, + }); + + return ( + <> + { + setToasts(toasts.filter((toast) => toast.id !== removedToast.id)); + }} + side={toastRightSide ? 'right' : 'left'} + toastLifeTimeMs={6000} + /> + ( +
+ + + +
+
+
+ {!isSidebarClosed && ( + + )} + onSideBarClick()} + data-test-subj="collapseSideBarButton" + aria-controls="discover-sidebar" + aria-expanded={isSidebarClosed ? 'false' : 'true'} + aria-label="Toggle sidebar" + className="dscCollapsibleSidebar__collapseButton" + /> +
+
+
+ {selectedMetrics.length > 0 ? ( + + ) : ( + + )} +
+
+
+
+
+ )} + /> + + ); +}; diff --git a/dashboards-observability/public/components/metrics/redux/slices/metrics_slice.ts b/dashboards-observability/public/components/metrics/redux/slices/metrics_slice.ts new file mode 100644 index 000000000..7620e6a7e --- /dev/null +++ b/dashboards-observability/public/components/metrics/redux/slices/metrics_slice.ts @@ -0,0 +1,176 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +import { createSlice, createAsyncThunk } from '@reduxjs/toolkit'; +import { + PPL_DATASOURCES_REQUEST, + REDUX_SLICE_METRICS, +} from '../../../../../common/constants/metrics'; +import { + pplServiceRequestor, + getVisualizations, + getNewVizDimensions, + sortMetricLayout, +} from '../../helpers/utils'; +import PPLService from '../../../../services/requests/ppl'; +import { MetricType } from '../../../../../common/types/metrics'; + +const initialState = { + pplService: PPLService, + metrics: [], + selected: [], + searched: [], + metricsLayout: [], +}; + +export const loadMetrics = createAsyncThunk('metrics/loadData', async (services: any) => { + const { http, pplService } = services; + const customData = await fetchCustomMetrics(http); + const remoteData = await fetchRemoteMetrics(pplService); + + return Promise.all([customData, ...remoteData]).then((datasets) => datasets.flat()); +}); + +const fetchCustomMetrics = async (http: any) => { + const dataSet = await getVisualizations(http); + const savedMetrics = dataSet.observabilityObjectList.filter( + (obj: any) => obj.savedVisualization.sub_type === 'metric' + ); + const normalizedData = savedMetrics.map((obj: any) => ({ + id: obj.objectId, + name: obj.savedVisualization.name, + catalog: 'CUSTOM_METRICS', + type: obj.savedVisualization.type, + recentlyCreated: (Date.now() - obj.createdTimeMs) / 36e5 <= 12, + })); + return normalizedData; +}; + +const fetchRemoteMetrics = async (pplService: any) => { + const dataSet = []; + const dataSources = await pplServiceRequestor(pplService, PPL_DATASOURCES_REQUEST); + for (const dataSource of dataSources.jsonData) { + const catalogData = await pplServiceRequestor( + pplService, + `source = ${dataSource.DATASOURCE_NAME}.information_schema.tables` + ); + const normalizedData = catalogData.jsonData.map((obj: any) => ({ + id: `${obj.TABLE_CATALOG}.${obj.TABLE_NAME}`, + name: `${obj.TABLE_CATALOG}.${obj.TABLE_NAME}`, + catalog: `${dataSource.DATASOURCE_NAME}`, + type: obj.TABLE_TYPE, + recentlyCreated: false, + })); + dataSet.push(normalizedData); + } + return dataSet; +}; + +const updateLayoutBySelection = (state: any, newMetric: any) => { + const newDimensions = getNewVizDimensions(state.metricsLayout); + + const metricVisualization: MetricType = { + id: newMetric.id, + savedVisualizationId: newMetric.id, + x: newDimensions.x, + y: newDimensions.y, + h: newDimensions.h, + w: newDimensions.w, + metricType: newMetric.catalog === 'CUSTOM_METRICS' ? 'savedCustomMetric' : 'prometheusMetric', + }; + state.metricsLayout = [...state.metricsLayout, metricVisualization]; +}; + +const updateLayoutByDeSelection = (state: any, newMetric: any) => { + const sortedMetricsLayout = sortMetricLayout(state.metricsLayout); + + let newMetricsLayout = [] as MetricType[]; + let heightSubtract = 0; + + sortedMetricsLayout.map((metricLayout: MetricType) => { + if (metricLayout.id !== newMetric.id) { + metricLayout.y = metricLayout.y - heightSubtract; + newMetricsLayout.push(metricLayout); + } else { + heightSubtract = metricLayout.h; + } + }); + state.metricsLayout = newMetricsLayout; +}; + +const filterDeletedLayoutIds = (state: any, payload: any) => { + let deletedMetricIds: string[] = []; + const payloadIds = payload.map((metric: any) => metric.id); + state.metricsLayout.map((metricLayout: MetricType) => { + if (!payloadIds.includes(metricLayout.id)) deletedMetricIds.push(metricLayout.id); + }); + deletedMetricIds.map((metricId: string) => updateLayoutByDeSelection(state, { id: metricId })); +}; + +export const metricSlice = createSlice({ + name: REDUX_SLICE_METRICS, + initialState, + reducers: { + selectMetric: (state, { payload }) => { + state.selected.push(payload.id); + updateLayoutBySelection(state, payload); + }, + deSelectMetric: (state, { payload }) => { + updateLayoutByDeSelection(state, payload); + state.selected = state.selected.filter((id) => id !== payload.id); + }, + searchMetric: (state, { payload }) => { + state.searched = state.metrics.filter( + (metric: any) => metric.name.includes(payload.id) && !state.selected.includes(payload.id) + ); + }, + clearSearchedMetrics: (state, { payload }) => { + state.searched = []; + }, + updateMetricsLayout: (state, { payload }) => { + state.metricsLayout = payload; + }, + }, + extraReducers: (builder) => { + builder.addCase(loadMetrics.fulfilled, (state, { payload }) => { + state.metrics = payload; + state.searched = []; + filterDeletedLayoutIds(state, payload); + }); + }, +}); + +export const { + deSelectMetric, + selectMetric, + updateMetricsLayout, + searchMetric, + clearSearchedMetrics, +} = metricSlice.actions; + +export const metricsStateSelector = (state) => state.metrics; + +export const availableMetricsSelector = (state) => + state.metrics.metrics.filter( + (metric) => !state.metrics.selected.includes(metric.id) && !metric.recentlyCreated + ); + +export const selectedMetricsSelector = (state) => + state.metrics.metrics.filter((metric) => state.metrics.selected.includes(metric.id)); + +export const recentlyCreatedMetricsSelector = (state) => + state.metrics.metrics.filter( + (metric) => !state.metrics.selected.includes(metric.id) && metric.recentlyCreated + ); + +export const searchedMetricsSelector = (state) => + state.metrics.searched.filter((metric) => !state.metrics.selected.includes(metric.id)); + +export const allAvailableMetricsSelector = (state) => + state.metrics.metrics.filter((metric) => !state.metrics.selected.includes(metric.id)); + +export const metricsLayoutSelector = (state) => state.metrics.metricsLayout; + +export default metricSlice.reducer; diff --git a/dashboards-observability/public/components/metrics/sidebar/__tests__/__snapshots__/searchbar.test.tsx.snap b/dashboards-observability/public/components/metrics/sidebar/__tests__/__snapshots__/searchbar.test.tsx.snap new file mode 100644 index 000000000..1a271b63c --- /dev/null +++ b/dashboards-observability/public/components/metrics/sidebar/__tests__/__snapshots__/searchbar.test.tsx.snap @@ -0,0 +1,295 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Search Bar Component Search Side Bar Component with available metrics 1`] = ` + + +
+ + +
+ +
+ + + +
+
+ + + + +
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+`; + +exports[`Search Bar Component Search Side Bar Component with no available metrics 1`] = ` + + +
+ + +
+ +
+ + + +
+
+ + + + +
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+`; diff --git a/dashboards-observability/public/components/metrics/sidebar/__tests__/__snapshots__/sidebar.test.tsx.snap b/dashboards-observability/public/components/metrics/sidebar/__tests__/__snapshots__/sidebar.test.tsx.snap new file mode 100644 index 000000000..b4ba2e2b7 --- /dev/null +++ b/dashboards-observability/public/components/metrics/sidebar/__tests__/__snapshots__/sidebar.test.tsx.snap @@ -0,0 +1,446 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Side Bar Component renders Side Bar Component 1`] = ` + + + + + +
+ + + + Recently Created Metrics + + + } + id="Recently Created MetricsSelector" + initialIsOpen={true} + isLoading={false} + isLoadingMessage={false} + paddingSize="none" + > +
+
+ +
+
+ +
+
+
    +
+
+
+
+
+
+
+ +
+ + + + + Selected Metrics + + + } + id="Selected MetricsSelector" + initialIsOpen={true} + isLoading={false} + isLoadingMessage={false} + paddingSize="none" + > +
+
+ +
+
+ +
+
+
    +
+
+
+
+
+
+
+ +
+ + + + + Available Metrics + + + } + id="Available MetricsSelector" + initialIsOpen={true} + isLoading={false} + isLoadingMessage={false} + paddingSize="none" + > +
+
+ +
+
+ +
+
+
    +
+
+
+
+
+
+
+
+
+
+
+
+
+`; diff --git a/dashboards-observability/public/components/metrics/sidebar/__tests__/searchbar.test.tsx b/dashboards-observability/public/components/metrics/sidebar/__tests__/searchbar.test.tsx new file mode 100644 index 000000000..cc84dc0eb --- /dev/null +++ b/dashboards-observability/public/components/metrics/sidebar/__tests__/searchbar.test.tsx @@ -0,0 +1,51 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +import { configure, mount } from 'enzyme'; +import Adapter from 'enzyme-adapter-react-16'; +import React from 'react'; +import { waitFor } from '@testing-library/react'; +import { SearchBar } from '../search_bar'; +import { Provider } from 'react-redux'; +import { applyMiddleware, createStore } from 'redux'; +import thunk from 'redux-thunk'; +import rootReducer from '../../../../framework/redux/reducers'; + +describe('Search Bar Component', () => { + configure({ adapter: new Adapter() }); + const store = createStore(rootReducer, applyMiddleware(thunk)); + + it('Search Side Bar Component with no available metrics', async () => { + const setSearch = jest.fn(); + + const wrapper = mount( + + + + ); + + wrapper.update(); + + await waitFor(() => { + expect(wrapper).toMatchSnapshot(); + }); + }); + + it('Search Side Bar Component with available metrics', async () => { + const setSearch = jest.fn(); + + const wrapper = mount( + + + + ); + + wrapper.update(); + + await waitFor(() => { + expect(wrapper).toMatchSnapshot(); + }); + }); +}); diff --git a/dashboards-observability/public/components/metrics/sidebar/__tests__/sidebar.test.tsx b/dashboards-observability/public/components/metrics/sidebar/__tests__/sidebar.test.tsx new file mode 100644 index 000000000..747201fa7 --- /dev/null +++ b/dashboards-observability/public/components/metrics/sidebar/__tests__/sidebar.test.tsx @@ -0,0 +1,41 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +import { configure, mount } from 'enzyme'; +import Adapter from 'enzyme-adapter-react-16'; +import React from 'react'; +import { waitFor } from '@testing-library/react'; +import httpClientMock from '../../../../../test/__mocks__/httpClientMock'; +import PPLService from '../../../../services/requests/ppl'; +import { applyMiddleware, createStore } from '@reduxjs/toolkit'; +import rootReducer from '../../../../framework/redux/reducers'; +import { Provider } from 'react-redux'; +import { Sidebar } from '../sidebar'; +import thunk from 'redux-thunk'; + +describe('Side Bar Component', () => { + configure({ adapter: new Adapter() }); + const store = createStore(rootReducer, applyMiddleware(thunk)); + + it('renders Side Bar Component', async () => { + httpClientMock.get = jest.fn(); + + const http = httpClientMock; + const pplService = new PPLService(httpClientMock); + const search = false; + + const wrapper = mount( + + + + ); + + wrapper.update(); + + await waitFor(() => { + expect(wrapper).toMatchSnapshot(); + }); + }); +}); diff --git a/dashboards-observability/public/components/metrics/sidebar/metric_name.tsx b/dashboards-observability/public/components/metrics/sidebar/metric_name.tsx new file mode 100644 index 000000000..0998912bf --- /dev/null +++ b/dashboards-observability/public/components/metrics/sidebar/metric_name.tsx @@ -0,0 +1,43 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +import React from 'react'; +import { EuiButtonEmpty, EuiToken } from '@elastic/eui'; + +interface IMetricNameProps { + metric: any; + handleClick: (props: any) => void; +} + +export const MetricName = (props: IMetricNameProps) => { + const { metric, handleClick } = props; + + const title = metric.catalog === 'CUSTOM_METRICS' ? 'OpenSearch' : 'Prometheus'; + const token = + metric.catalog === 'CUSTOM_METRICS' + ? '/ui/default_branding/opensearch_mark_default_mode.svg' + : 'tokenProperty'; + const name = (metricName: string) => { + return metric.catalog === 'CUSTOM_METRICS' ? metricName : metricName.split('.')[1]; + }; + + return ( + handleClick(metric)} + > + {' '} + {name(metric.name)} + + ); +}; diff --git a/dashboards-observability/public/components/metrics/sidebar/metrics_accordion.tsx b/dashboards-observability/public/components/metrics/sidebar/metrics_accordion.tsx new file mode 100644 index 000000000..71b42e674 --- /dev/null +++ b/dashboards-observability/public/components/metrics/sidebar/metrics_accordion.tsx @@ -0,0 +1,40 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +import React from 'react'; +import { EuiAccordion, EuiTitle } from '@elastic/eui'; +import { MetricName } from './metric_name'; + +interface IMetricNameProps { + metricsList: []; + headerName: string; + handleClick: (props: any) => void; +} + +export const MetricsAccordion = (props: IMetricNameProps) => { + const { metricsList, headerName, handleClick } = props; + + return ( + + {headerName} + + } + paddingSize="none" + > +
    + {metricsList.slice(0, 100).map((metric: any) => ( +
  • + +
  • + ))} +
+ {metricsList.length > 100 &&

Use search bar for searching through all metrics.

} +
+ ); +}; diff --git a/dashboards-observability/public/components/metrics/sidebar/search_bar.tsx b/dashboards-observability/public/components/metrics/sidebar/search_bar.tsx new file mode 100644 index 000000000..fc5656475 --- /dev/null +++ b/dashboards-observability/public/components/metrics/sidebar/search_bar.tsx @@ -0,0 +1,42 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +import { EuiSearchBar } from '@elastic/eui'; +import React from 'react'; +import { useDispatch } from 'react-redux'; +import { clearSearchedMetrics, searchMetric } from '../redux/slices/metrics_slice'; + +interface ISearchBarProps { + setSearch: React.Dispatch>; +} + +export const SearchBar = (props: ISearchBarProps) => { + const { setSearch } = props; + + const dispatch = useDispatch(); + + const onChange = ({ query }: { query: any }) => { + if (query.text !== '') { + setSearch(true); + dispatch(searchMetric({ id: query.text })); + } else { + setSearch(false); + dispatch(clearSearchedMetrics({})); + } + }; + + return ( +
+ +
+ ); +}; diff --git a/dashboards-observability/public/components/metrics/sidebar/sidebar.scss b/dashboards-observability/public/components/metrics/sidebar/sidebar.scss new file mode 100644 index 000000000..9cba0fc76 --- /dev/null +++ b/dashboards-observability/public/components/metrics/sidebar/sidebar.scss @@ -0,0 +1,165 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +.dscSidebar__container { + padding-left: 0 !important; + padding-right: 0 !important; + background-color: transparent; + border-right-color: transparent; + border-bottom-color: transparent; +} + +.dscIndexPattern__container { + display: flex; + align-items: center; + height: $euiSize * 3; + margin-top: -$euiSizeS; +} + +.dscIndexPattern__triggerButton { + @include euiTitle('xs'); + line-height: $euiSizeXXL; +} + +.dscFieldList { + list-style: none; + margin-bottom: 0; +} + +.dscFieldListHeader { + padding: $euiSizeS $euiSizeS 0 $euiSizeS; + background-color: lightOrDarkTheme(tint($euiColorPrimary, 90%), $euiColorLightShade); +} + +.dscFieldList--popular { + background-color: lightOrDarkTheme(tint($euiColorPrimary, 90%), $euiColorLightShade); +} + +.dscFieldChooser__toggle { + color: $euiColorMediumShade; + margin-left: $euiSizeS !important; +} + +/** + * 1. Only visually hide the action, so that it's still accessible to screen readers. + * 2. When tabbed to, this element needs to be visible for keyboard accessibility. + */ +.dscSidebarItem__action { + opacity: 0; + /* 1 */ + transition: none; + + &:focus { + opacity: 1; + /* 2 */ + } + + font-size: $euiFontSizeXS; + padding: 2px 6px !important; + height: 22px !important; + min-width: auto !important; + + .euiButton__content { + padding: 0 4px; + } +} + +.dscFieldSearch { + padding: $euiSizeS; +} + +.dscFieldSearch__toggleButton { + width: calc(100% - #{$euiSizeS}); + color: $euiColorPrimary; + padding-left: $euiSizeXS; + margin-left: $euiSizeXS; +} + +.dscFieldSearch__filterWrapper { + flex-grow: 0; +} + +.dscFieldSearch__formWrapper { + padding: $euiSizeM; +} + +.dscFieldDetails { + color: $euiTextColor; + margin-bottom: $euiSizeS; +} + +.dscSidebarItem__fieldPopoverPanel { + min-width: 300px; + max-width: 600px; + max-height: 600px; + overflow-y: scroll; +} + +.override_timestamp_loading { + vertical-align: middle; +} + +.explorerFieldSelector { + padding: $euiSizeS; +} + +#vis__mainContent { + .explorer__insights { + min-height: 0; + display: grid; + grid-template-columns: 50% 50%; + height: 100%; + + .explorerFieldSelector, + .explorer__vizDataConfig { + padding: $euiSizeS; + overflow: auto; + + &__fieldGroups { + @include euiYScrollWithShadows; + + overflow-y: auto; + margin-right: -$euiSizeS; + padding-right: $euiSizeS; + margin-top: $euiSizeS; + } + + &__fieldGroup { + margin-top: $euiSizeS; + + &:first-child { + margin-top: 0; + } + } + } + + .explorerFieldSelector { + @include euiYScrollWithShadows; + + .sidebar-list { + height: 100%; + } + } + } +} + +.sidebarHeight { + line-height: normal; + overflow: auto; + max-height: 100vh; +} + +.metricsList { + line-height: normal; +} + +.metricsListContainer { + margin-left: 15px; + margin-right: 5px; +} + +.tokenMargin { + vertical-align: middle; +} \ No newline at end of file diff --git a/dashboards-observability/public/components/metrics/sidebar/sidebar.tsx b/dashboards-observability/public/components/metrics/sidebar/sidebar.tsx new file mode 100644 index 000000000..c137dec3b --- /dev/null +++ b/dashboards-observability/public/components/metrics/sidebar/sidebar.tsx @@ -0,0 +1,77 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +import './sidebar.scss'; + +import React, { useEffect } from 'react'; +import { EuiSpacer } from '@elastic/eui'; +import { I18nProvider } from '@osd/i18n/react'; +import { batch, useDispatch, useSelector } from 'react-redux'; +import { + availableMetricsSelector, + deSelectMetric, + selectMetric, + loadMetrics, + selectedMetricsSelector, + recentlyCreatedMetricsSelector, + searchedMetricsSelector, +} from '../redux/slices/metrics_slice'; +import { CoreStart } from '../../../../../../src/core/public'; +import PPLService from '../../../services/requests/ppl'; +import { MetricsAccordion } from './metrics_accordion'; + +interface ISidebarProps { + http: CoreStart['http']; + pplService: PPLService; + search: boolean; +} + +export const Sidebar = (props: ISidebarProps) => { + const { http, pplService, search } = props; + const dispatch = useDispatch(); + + const availableMetrics = useSelector(availableMetricsSelector); + const selectedMetrics = useSelector(selectedMetricsSelector); + const recentlyCreatedMetrics = useSelector(recentlyCreatedMetricsSelector); + const searchedMetrics = useSelector(searchedMetricsSelector); + + useEffect(() => { + batch(() => { + dispatch(loadMetrics({ http, pplService })); + }); + }, []); + + const handleAddMetric = (metric: any) => dispatch(selectMetric(metric)); + + const handleRemoveMetric = (metric: any) => { + dispatch(deSelectMetric(metric)); + }; + + const availableMetricsDisplay = search ? searchedMetrics : availableMetrics; + + return ( + +
+ + + + + +
+
+ ); +}; diff --git a/dashboards-observability/public/components/metrics/top_menu/__tests__/__snapshots__/metrics_export_panel.test.tsx.snap b/dashboards-observability/public/components/metrics/top_menu/__tests__/__snapshots__/metrics_export_panel.test.tsx.snap new file mode 100644 index 000000000..f9101b0ea --- /dev/null +++ b/dashboards-observability/public/components/metrics/top_menu/__tests__/__snapshots__/metrics_export_panel.test.tsx.snap @@ -0,0 +1,315 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Export Metrics Panel Component renders Export Metrics Panel Component 1`] = ` + + +
+ +
+
+ + + +
+
+ +
+ + +
+
+
+

+ Select dashboards/applications +

+ +
+ +
+
+ +
+ +
+ + + +
+
+
+
+ + +
+ + +
+ Search existing dashboards or applications by name +
+
+
+
+ +
+ + +`; diff --git a/dashboards-observability/public/components/metrics/top_menu/__tests__/__snapshots__/top_menu.test.tsx.snap b/dashboards-observability/public/components/metrics/top_menu/__tests__/__snapshots__/top_menu.test.tsx.snap new file mode 100644 index 000000000..edf4f4490 --- /dev/null +++ b/dashboards-observability/public/components/metrics/top_menu/__tests__/__snapshots__/top_menu.test.tsx.snap @@ -0,0 +1,3799 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Metrics Top Menu Component renders Top Menu Component when disabled in edit mode 1`] = ` + + + +
+ +
+ +
+ +
+ +
+ + +
+ +
+ + + +
+
+ + + + +
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+ +
+ +
+
+ + } + aria-label="resolutionField" + className="resolutionSelectText" + disabled={true} + isInvalid={false} + onChange={[Function]} + prepend="Span Interval" + value={1} + > + + } + fullWidth={false} + prepend="Span Interval" + > +
+ + + +
+ + + + +
+ + +
+
+ + + + +
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+ +
+ + +
+ +
+ + } + > +
+ + + + + } + closePopover={[Function]} + display="inlineBlock" + hasArrow={true} + isOpen={false} + ownFocus={true} + panelPaddingSize="m" + > +
+
+ + + +
+
+
+
+
+ } + iconType={false} + isCustom={true} + startDateControl={
} + > +
+ +
+ + +
+
+ +
+ + +
+ + + } + delay="regular" + position="bottom" + > + + + + + + + + + +
+
+
+ + +
+ + +
+ + Save + + } + closePopover={[Function]} + display="inlineBlock" + hasArrow={true} + isOpen={false} + ownFocus={true} + panelPaddingSize="m" + > +
+
+ + + + + +
+
+
+
+
+
+ +
+ +
+
+ +
+ +
+ + + + + +
+
+ +
+ + + + + +
+
+
+
+
+
+`; + +exports[`Metrics Top Menu Component renders Top Menu Component when disabled with no metric visualizations 1`] = ` + + + +
+ +
+ +
+ +
+ +
+ + +
+ +
+ + + +
+
+ + + + +
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+ +
+ +
+
+ + } + aria-label="resolutionField" + className="resolutionSelectText" + disabled={true} + isInvalid={false} + onChange={[Function]} + prepend="Span Interval" + value={1} + > + + } + fullWidth={false} + prepend="Span Interval" + > +
+ + + +
+ + + + +
+ + +
+
+ + + + +
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+ +
+ + +
+ +
+ + } + > +
+ + + + + } + closePopover={[Function]} + display="inlineBlock" + hasArrow={true} + isOpen={false} + ownFocus={true} + panelPaddingSize="m" + > +
+
+ + + +
+
+
+
+
+ } + iconType={false} + isCustom={true} + startDateControl={
} + > +
+ +
+ + +
+
+ +
+ + +
+ + + } + delay="regular" + position="bottom" + > + + + + + + + + + +
+
+
+ + +
+ + +
+ + Save + + } + closePopover={[Function]} + display="inlineBlock" + hasArrow={true} + isOpen={false} + ownFocus={true} + panelPaddingSize="m" + > +
+
+ + + + + +
+
+
+
+
+
+ +
+ +
+
+ +
+ +
+ + + + + +
+
+
+
+
+
+`; + +exports[`Metrics Top Menu Component renders Top Menu Component when enabled 1`] = ` + + + +
+ +
+ +
+ +
+ +
+ + +
+ +
+ + + +
+
+ + + + +
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+ +
+ +
+
+ + } + aria-label="resolutionField" + className="resolutionSelectText" + disabled={false} + isInvalid={false} + onChange={[Function]} + prepend="Span Interval" + value={1} + > + + } + fullWidth={false} + prepend="Span Interval" + > +
+ + + +
+ + + + +
+ + +
+
+ + + + +
+ + + + + +
+
+
+
+
+
+
+
+
+
+
+
+ +
+ + +
+ +
+ + } + > +
+ + + + + } + closePopover={[Function]} + display="inlineBlock" + hasArrow={true} + isOpen={false} + ownFocus={true} + panelPaddingSize="m" + > +
+
+ + + +
+
+
+
+
+ } + iconType={false} + isCustom={true} + startDateControl={
} + > +
+ +
+ + +
+
+ +
+ + +
+ + + + + + + + + + + +
+
+
+ + +
+ + +
+ + Save + + } + closePopover={[Function]} + display="inlineBlock" + hasArrow={true} + isOpen={false} + ownFocus={true} + panelPaddingSize="m" + > +
+
+ + + + + +
+
+
+
+
+
+ +
+ +
+
+ +
+ +
+ + + + + +
+
+
+
+
+
+`; diff --git a/dashboards-observability/public/components/metrics/top_menu/__tests__/metrics_export_panel.test.tsx b/dashboards-observability/public/components/metrics/top_menu/__tests__/metrics_export_panel.test.tsx new file mode 100644 index 000000000..00496f1be --- /dev/null +++ b/dashboards-observability/public/components/metrics/top_menu/__tests__/metrics_export_panel.test.tsx @@ -0,0 +1,63 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +import { configure, mount } from 'enzyme'; +import Adapter from 'enzyme-adapter-react-16'; +import React from 'react'; +import { waitFor } from '@testing-library/react'; +import httpClientMock from '../../../../../test/__mocks__/httpClientMock'; +import { + samplePanelOptions, + sampleSortedMetricsLayout, + sampleVisualizationById, +} from '../../../../../test/metrics_contants'; +import { createStore } from '@reduxjs/toolkit'; +import rootReducer from '../../../../framework/redux/reducers'; +import { Provider } from 'react-redux'; +import { HttpResponse } from '../../../../../../../src/core/public'; +import { MetricsExportPanel } from '../metrics_export_panel'; +import { EuiComboBoxOptionOption } from '@elastic/eui'; + +describe('Export Metrics Panel Component', () => { + configure({ adapter: new Adapter() }); + const store = createStore(rootReducer); + + it('renders Export Metrics Panel Component', async () => { + let httpFlag = 1; + httpClientMock.get = jest.fn(() => { + if (httpFlag == 1) { + httpFlag += 1; + return Promise.resolve((samplePanelOptions as unknown) as HttpResponse); + } else { + return Promise.resolve((sampleVisualizationById as unknown) as HttpResponse); + } + }); + + const http = httpClientMock; + const visualizationsMetaData: any = []; + const setVisualizationsMetaData = jest.fn(); + const sortedMetricsLayout = sampleSortedMetricsLayout; + const selectedPanelOptions: EuiComboBoxOptionOption[] = []; + const setSelectedPanelOptions = jest.fn(); + + const wrapper = mount( + + + + ); + wrapper.update(); + + await waitFor(() => { + expect(wrapper).toMatchSnapshot(); + }); + }); +}); diff --git a/dashboards-observability/public/components/metrics/top_menu/__tests__/top_menu.test.tsx b/dashboards-observability/public/components/metrics/top_menu/__tests__/top_menu.test.tsx new file mode 100644 index 000000000..b34591b62 --- /dev/null +++ b/dashboards-observability/public/components/metrics/top_menu/__tests__/top_menu.test.tsx @@ -0,0 +1,183 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +import { configure, mount } from 'enzyme'; +import Adapter from 'enzyme-adapter-react-16'; +import React from 'react'; +import { waitFor } from '@testing-library/react'; +import httpClientMock from '../../../../../test/__mocks__/httpClientMock'; +import { sampleMetric, sampleMetricsVisualizations } from '../../../../../test/metrics_contants'; +import { createStore } from '@reduxjs/toolkit'; +import rootReducer from '../../../../framework/redux/reducers'; +import { Provider } from 'react-redux'; +import { HttpResponse } from '../../../../../../../src/core/public'; +import { TopMenu } from '../top_menu'; +import { DurationRange } from '@elastic/eui/src/components/date_picker/types'; +import SavedObjects from '../../../../services/saved_objects/event_analytics/saved_objects'; +import { MetricType } from '../../../../../common/types/metrics'; + +describe('Metrics Top Menu Component', () => { + configure({ adapter: new Adapter() }); + const store = createStore(rootReducer); + + it('renders Top Menu Component when enabled', async () => { + httpClientMock.get = jest.fn(() => Promise.resolve((sampleMetric as unknown) as HttpResponse)); + + const http = httpClientMock; + const IsTopPanelDisabled = false; + const startTime = 'now-1d'; + const endTime = 'now'; + const onDatePickerChange = jest.fn(); + const recentlyUsedRanges: DurationRange[] = []; + const editMode = false; + const setEditMode = jest.fn(); + const setEditActionType = jest.fn(); + const panelVisualizations = sampleMetricsVisualizations; + const setPanelVisualizations = jest.fn(); + const resolutionValue = 'h'; + const setResolutionValue = jest.fn(); + const spanValue = 1; + const setSpanValue = jest.fn(); + const resolutionSelectId = 'select_123'; + const savedObjects = new SavedObjects(httpClientMock); + const setToast = jest.fn(); + + const wrapper = mount( + + + + ); + wrapper.update(); + + await waitFor(() => { + expect(wrapper).toMatchSnapshot(); + }); + }); + + it('renders Top Menu Component when disabled with no metric visualizations', async () => { + httpClientMock.get = jest.fn(); + + const http = httpClientMock; + const IsTopPanelDisabled = true; + const startTime = 'now-1d'; + const endTime = 'now'; + const onDatePickerChange = jest.fn(); + const recentlyUsedRanges: DurationRange[] = []; + const editMode = false; + const setEditMode = jest.fn(); + const setEditActionType = jest.fn(); + const panelVisualizations: MetricType[] = []; + const setPanelVisualizations = jest.fn(); + const resolutionValue = 'h'; + const setResolutionValue = jest.fn(); + const spanValue = 1; + const setSpanValue = jest.fn(); + const resolutionSelectId = 'select_123'; + const savedObjects = new SavedObjects(httpClientMock); + const setToast = jest.fn(); + + const wrapper = mount( + + + + ); + wrapper.update(); + + await waitFor(() => { + expect(wrapper).toMatchSnapshot(); + }); + }); + + it('renders Top Menu Component when disabled in edit mode', async () => { + httpClientMock.get = jest.fn(() => Promise.resolve((sampleMetric as unknown) as HttpResponse)); + + const http = httpClientMock; + const IsTopPanelDisabled = true; + const startTime = 'now-1d'; + const endTime = 'now'; + const onDatePickerChange = jest.fn(); + const recentlyUsedRanges: DurationRange[] = []; + const editMode = true; + const setEditMode = jest.fn(); + const setEditActionType = jest.fn(); + const panelVisualizations = sampleMetricsVisualizations; + const setPanelVisualizations = jest.fn(); + const resolutionValue = 'h'; + const setResolutionValue = jest.fn(); + const spanValue = 1; + const setSpanValue = jest.fn(); + const resolutionSelectId = 'select_123'; + const savedObjects = new SavedObjects(httpClientMock); + const setToast = jest.fn(); + + const wrapper = mount( + + + + ); + wrapper.update(); + + await waitFor(() => { + expect(wrapper).toMatchSnapshot(); + }); + }); +}); diff --git a/dashboards-observability/public/components/metrics/top_menu/metrics_export_panel.tsx b/dashboards-observability/public/components/metrics/top_menu/metrics_export_panel.tsx new file mode 100644 index 000000000..9a26d4630 --- /dev/null +++ b/dashboards-observability/public/components/metrics/top_menu/metrics_export_panel.tsx @@ -0,0 +1,130 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +import { CUSTOM_PANELS_API_PREFIX } from '../../../../common/constants/custom_panels'; +import React, { useEffect, useState } from 'react'; +import { CoreStart } from '../../../../../../src/core/public'; +import { + EuiComboBox, + EuiComboBoxOptionOption, + EuiFieldText, + EuiFlexGroup, + EuiFormRow, + EuiFlexItem, + EuiForm, +} from '@elastic/eui'; +import { createPrometheusMetricById } from '../helpers/utils'; +import { MetricType } from '../../../../common/types/metrics'; +import { fetchVisualizationById } from '../../custom_panels/helpers/utils'; + +interface MetricsExportPanelProps { + http: CoreStart['http']; + visualizationsMetaData: any; + setVisualizationsMetaData: React.Dispatch; + sortedMetricsLayout: MetricType[]; + selectedPanelOptions: EuiComboBoxOptionOption[] | undefined; + setSelectedPanelOptions: React.Dispatch< + React.SetStateAction[] | undefined> + >; +} + +interface CustomPanelOptions { + id: string; + name: string; + dateCreated: string; + dateModified: string; +} + +export const MetricsExportPanel = ({ + http, + visualizationsMetaData, + setVisualizationsMetaData, + sortedMetricsLayout, + selectedPanelOptions, + setSelectedPanelOptions, +}: MetricsExportPanelProps) => { + const [options, setOptions] = useState([]); + + const [errorResponse, setErrorResponse] = useState(''); + + const getCustomPanelList = async () => { + http + .get(`${CUSTOM_PANELS_API_PREFIX}/panels`) + .then((res: any) => { + setOptions(res.panels || []); + }) + .catch((error: any) => console.error(error)); + }; + + const fetchAllvisualizationsById = async () => { + let tempVisualizationsMetaData = await Promise.all( + sortedMetricsLayout.map(async (metricLayout) => { + return metricLayout.metricType === 'savedCustomMetric' + ? await fetchVisualizationById(http, metricLayout.id, setErrorResponse) + : createPrometheusMetricById(metricLayout.id); + }) + ); + setVisualizationsMetaData(tempVisualizationsMetaData); + }; + + useEffect(() => { + getCustomPanelList(); + fetchAllvisualizationsById(); + }, []); + + const onNameChange = (index: number, name: string) => { + let tempVisualizationsMetaData = [...visualizationsMetaData]; + tempVisualizationsMetaData[index].name = name; + setVisualizationsMetaData(tempVisualizationsMetaData); + }; + + return ( +
+ + { + setSelectedPanelOptions(options); + }} + selectedOptions={selectedPanelOptions} + options={options.map((option: CustomPanelOptions) => { + return { + panel: option, + label: option.name, + }; + })} + isClearable={true} + data-test-subj="eventExplorer__querySaveComboBox" + /> + + + {visualizationsMetaData.length > 0 && ( +
+ {visualizationsMetaData.map((metaData: any, index: number) => { + return ( + + + + + onNameChange(index, e.target.value)} + data-test-subj="metrics__querySaveName" + /> + + + + + ); + })} +
+ )} +
+ ); +}; diff --git a/dashboards-observability/public/components/metrics/top_menu/top_menu.scss b/dashboards-observability/public/components/metrics/top_menu/top_menu.scss new file mode 100644 index 000000000..c69f20245 --- /dev/null +++ b/dashboards-observability/public/components/metrics/top_menu/top_menu.scss @@ -0,0 +1,20 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +.resolutionSelect { + .euiFormControlLayout { + .euiFormControlLayout { + width: 116px; + } + } +} + +.resolutionSelectText { + width: 70px; +} + +.search-bar-top-menu{ + width:25vw; +} \ No newline at end of file diff --git a/dashboards-observability/public/components/metrics/top_menu/top_menu.tsx b/dashboards-observability/public/components/metrics/top_menu/top_menu.tsx new file mode 100644 index 000000000..cd3d17e3b --- /dev/null +++ b/dashboards-observability/public/components/metrics/top_menu/top_menu.tsx @@ -0,0 +1,313 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +import { + EuiPageHeader, + EuiPageHeaderSection, + EuiFlexGroup, + EuiFlexItem, + EuiFieldText, + EuiSelect, + EuiSuperDatePicker, + ShortDate, + OnTimeChangeProps, + EuiButton, + EuiComboBoxOptionOption, + EuiButtonEmpty, + EuiPopover, + EuiPopoverFooter, +} from '@elastic/eui'; +import { DurationRange } from '@elastic/eui/src/components/date_picker/types'; +import { useDispatch, useSelector } from 'react-redux'; +import { uiSettingsService } from '../../../../common/utils'; +import React, { useEffect, useState } from 'react'; +import { MetricType } from '../../../../common/types/metrics'; +import { resolutionOptions } from '../../../../common/constants/metrics'; +import './top_menu.scss'; +import { + allAvailableMetricsSelector, + metricsLayoutSelector, + selectMetric, +} from '../redux/slices/metrics_slice'; +import { SearchBar } from '../sidebar/search_bar'; +import { CoreStart } from '../../../../../../src/core/public'; +import SavedObjects from '../../../services/saved_objects/event_analytics/saved_objects'; +import { sortMetricLayout, updateMetricsWithSelections } from '../helpers/utils'; +import { CUSTOM_PANELS_API_PREFIX } from '../../../../common/constants/custom_panels'; +import { MetricsExportPanel } from './metrics_export_panel'; + +interface TopMenuProps { + http: CoreStart['http']; + IsTopPanelDisabled: boolean; + startTime: ShortDate; + endTime: ShortDate; + onDatePickerChange: (props: OnTimeChangeProps) => void; + recentlyUsedRanges: DurationRange[]; + editMode: boolean; + setEditMode: React.Dispatch>; + setEditActionType: React.Dispatch>; + panelVisualizations: MetricType[]; + setPanelVisualizations: React.Dispatch>; + resolutionValue: string; + setResolutionValue: React.Dispatch>; + spanValue: number; + setSpanValue: React.Dispatch>; + resolutionSelectId: string; + savedObjects: SavedObjects; + setToast: (title: string, color?: string, text?: any, side?: string) => void; + setSearch: any; +} + +export const TopMenu = ({ + http, + IsTopPanelDisabled, + startTime, + endTime, + onDatePickerChange, + recentlyUsedRanges, + editMode, + setEditActionType, + setEditMode, + panelVisualizations, + setPanelVisualizations, + resolutionValue, + setResolutionValue, + spanValue, + setSpanValue, + resolutionSelectId, + savedObjects, + setToast, + setSearch, +}: TopMenuProps) => { + // Redux tools + const dispatch = useDispatch(); + const allAvailableMetrics = useSelector(allAvailableMetricsSelector); + const handleAddMetric = (metric: any) => dispatch(selectMetric(metric)); + const metricsLayout = useSelector(metricsLayoutSelector); + const sortedMetricsLayout = sortMetricLayout([...metricsLayout]); + + const [visualizationsMetaData, setVisualizationsMetaData] = useState([]); + const [originalPanelVisualizations, setOriginalPanelVisualizations] = useState([]); + const [isSavePanelOpen, setIsSavePanelOpen] = useState(false); + const [selectedPanelOptions, setSelectedPanelOptions] = useState< + EuiComboBoxOptionOption[] | undefined + >([]); + + // toggle between panel edit mode + const editPanel = (editType: string) => { + setEditMode(!editMode); + switch (editType) { + case 'edit': { + setOriginalPanelVisualizations([...panelVisualizations]); + break; + } + case 'cancel': { + setPanelVisualizations(originalPanelVisualizations); + setOriginalPanelVisualizations([]); + break; + } + default: { + break; + } + } + setEditActionType(editType); + }; + + const onResolutionChange = (e) => { + setResolutionValue(e.target.value); + }; + + const cancelButton = ( + editPanel('cancel')}> + Cancel + + ); + + const saveButton = ( + editPanel('save')}> + Save view + + ); + + const editButton = ( + editPanel('edit')} + isDisabled={IsTopPanelDisabled} + > + Edit view + + ); + + const Savebutton = ( + { + setIsSavePanelOpen((staleState) => !staleState); + }} + data-test-subj="metrics__saveManagementPopover" + iconType="arrowDown" + isDisabled={IsTopPanelDisabled} + > + Save + + ); + + const handleSavingObjects = async () => { + let savedMetricIds = []; + let savedMetricsInPanels = []; + + try { + savedMetricIds = await Promise.all( + sortedMetricsLayout.map(async (metricLayout, index) => { + const updatedMetric = updateMetricsWithSelections( + visualizationsMetaData[index], + startTime, + endTime, + spanValue + resolutionValue + ); + + if (metricLayout.metricType === 'prometheusMetric') { + return await savedObjects.createSavedVisualization(updatedMetric); + } else { + return await savedObjects.updateSavedVisualizationById({ + ...updatedMetric, + objectId: metricLayout.id, + }); + } + }) + ); + } catch (e) { + const message = 'Issue in saving metrics'; + console.error(message, e); + setToast('Issue in saving metrics', 'danger'); + } + + setToast('Saved metrics successfully!'); + + if (selectedPanelOptions.length > 0) { + try { + const allMetricIds = savedMetricIds.map((metric) => metric.objectId); + savedMetricsInPanels = await Promise.all( + selectedPanelOptions.map((panel) => { + return http.post(`${CUSTOM_PANELS_API_PREFIX}/visualizations/multiple`, { + body: JSON.stringify({ + panelId: panel.panel.id, + savedVisualizationIds: allMetricIds, + }), + }); + }) + ); + } catch (e) { + const message = 'Issue in saving metrics to panels'; + console.error(message, e); + setToast('Issue in saving metrics', 'danger'); + } + setToast('Saved metrics to panels successfully!'); + } + }; + + return ( + <> + + + + + + + + + + + +
+ setSpanValue(e.target.value)} + append={ + onResolutionChange(e)} + aria-label="resolutionSelect" + /> + } + disabled={IsTopPanelDisabled} + aria-label="resolutionField" + /> +
+
+ + + + + setIsSavePanelOpen(false)} + > + + + + + setIsSavePanelOpen(false)} + data-test-subj="metrics__SaveCancel" + > + Cancel + + + + { + handleSavingObjects().then(() => setIsSavePanelOpen(false)); + }} + data-test-subj="metrics__SaveConfirm" + > + Save + + + + + + +
+
+
+ + {editMode ? ( + <> + {cancelButton} + {saveButton} + + ) : ( + {editButton} + )} + + + ); +}; diff --git a/dashboards-observability/public/components/metrics/view/__tests__/__snapshots__/empty_view.test.tsx.snap b/dashboards-observability/public/components/metrics/view/__tests__/__snapshots__/empty_view.test.tsx.snap new file mode 100644 index 000000000..c9427636e --- /dev/null +++ b/dashboards-observability/public/components/metrics/view/__tests__/__snapshots__/empty_view.test.tsx.snap @@ -0,0 +1,86 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Empty View Component renders empty view container without metrics 1`] = ` + +
+ +
+
+ +
+ + + + + + +
+ +

+ No Metrics Selected +

+ +
+ + +
+ +
+ Select a metric from the left sidepanel to view results. +
+
+
+
+
+ +
+
+ +
+ +`; diff --git a/dashboards-observability/public/components/metrics/view/__tests__/__snapshots__/metrics_grid.test.tsx.snap b/dashboards-observability/public/components/metrics/view/__tests__/__snapshots__/metrics_grid.test.tsx.snap new file mode 100644 index 000000000..e03336e60 --- /dev/null +++ b/dashboards-observability/public/components/metrics/view/__tests__/__snapshots__/metrics_grid.test.tsx.snap @@ -0,0 +1,1198 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Metrics Grid Component renders Metrics Grid Component 1`] = ` + + + + + +
+ +
+ + +
+
+ +
+ +
+ +
+ + +
+ + +
+
+
+
+ +
+ + } + closePopover={[Function]} + display="inlineBlock" + hasArrow={true} + isOpen={false} + ownFocus={true} + panelPaddingSize="m" + > +
+
+ + + +
+
+
+
+
+
+
+
+
+ + + + + + + + +
+
+
+
+
+
+ +
+ + +
+
+ +
+ +
+ +
+ + +
+ + +
+
+
+
+ +
+ + } + closePopover={[Function]} + display="inlineBlock" + hasArrow={true} + isOpen={false} + ownFocus={true} + panelPaddingSize="m" + > +
+
+ + + +
+
+
+
+
+
+
+
+
+ + + + + + + + +
+
+
+
+
+
+ +
+ + +
+
+ +
+ +
+ +
+ + +
+ prometheus.process_resident_memory_bytes +
+
+
+
+
+
+
+ +
+ + } + closePopover={[Function]} + display="inlineBlock" + hasArrow={true} + isOpen={false} + ownFocus={true} + panelPaddingSize="m" + > +
+
+ + + +
+
+
+
+
+
+
+
+
+ + + + + + + + +
+
+
+
+
+
+
+
+
+
+
+
+`; diff --git a/dashboards-observability/public/components/metrics/view/__tests__/empty_view.test.tsx b/dashboards-observability/public/components/metrics/view/__tests__/empty_view.test.tsx new file mode 100644 index 000000000..d27a946ca --- /dev/null +++ b/dashboards-observability/public/components/metrics/view/__tests__/empty_view.test.tsx @@ -0,0 +1,23 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +import { configure, mount } from 'enzyme'; +import Adapter from 'enzyme-adapter-react-16'; +import React from 'react'; +import { EmptyMetricsView } from '../empty_view'; +import { waitFor } from '@testing-library/react'; + +describe('Empty View Component', () => { + configure({ adapter: new Adapter() }); + + it('renders empty view container without metrics', async () => { + const wrapper = mount(); + wrapper.update(); + + await waitFor(() => { + expect(wrapper).toMatchSnapshot(); + }); + }); +}); diff --git a/dashboards-observability/public/components/metrics/view/__tests__/metrics_grid.test.tsx b/dashboards-observability/public/components/metrics/view/__tests__/metrics_grid.test.tsx new file mode 100644 index 000000000..2cf11a501 --- /dev/null +++ b/dashboards-observability/public/components/metrics/view/__tests__/metrics_grid.test.tsx @@ -0,0 +1,64 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +import { configure, mount } from 'enzyme'; +import Adapter from 'enzyme-adapter-react-16'; +import React from 'react'; +import { waitFor } from '@testing-library/react'; +import { MetricsGrid } from '../metrics_grid'; +import httpClientMock from '../../../../../test/__mocks__/httpClientMock'; +import { coreStartMock } from '../../../../../test/__mocks__/coreMocks'; +import PPLService from '../../../../services/requests/ppl'; +import { sampleMetric, sampleMetricsVisualizations } from '../../../../../test/metrics_contants'; +import { createStore } from '@reduxjs/toolkit'; +import rootReducer from '../../../../framework/redux/reducers'; +import { Provider } from 'react-redux'; +import { HttpResponse } from '../../../../../../../src/core/public'; + +describe('Metrics Grid Component', () => { + configure({ adapter: new Adapter() }); + const store = createStore(rootReducer); + + it('renders Metrics Grid Component', async () => { + httpClientMock.get = jest.fn(() => Promise.resolve((sampleMetric as unknown) as HttpResponse)); + + const http = httpClientMock; + const core = coreStartMock; + const panelVisualizations = sampleMetricsVisualizations; + const setPanelVisualizations = jest.fn(); + const editMode = false; + const pplService = new PPLService(httpClientMock); + const startTime = 'now-30m'; + const endTime = 'now'; + const onEditClick = jest.fn(); + const onRefresh = true; + const editActionType = 'save'; + const spanParam = '1h'; + + const wrapper = mount( + + + + ); + wrapper.update(); + + await waitFor(() => { + expect(wrapper).toMatchSnapshot(); + }); + }); +}); diff --git a/dashboards-observability/public/components/metrics/view/empty_view.scss b/dashboards-observability/public/components/metrics/view/empty_view.scss new file mode 100644 index 000000000..d3c9a6026 --- /dev/null +++ b/dashboards-observability/public/components/metrics/view/empty_view.scss @@ -0,0 +1,15 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +.empty-view-metrics { + min-height: 70vh; + justify-content: center; + display: flex; + align-items: center; +} + +.align-center-view { + text-align: center +} \ No newline at end of file diff --git a/dashboards-observability/public/components/metrics/view/empty_view.tsx b/dashboards-observability/public/components/metrics/view/empty_view.tsx new file mode 100644 index 000000000..f67b6e1a4 --- /dev/null +++ b/dashboards-observability/public/components/metrics/view/empty_view.tsx @@ -0,0 +1,28 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +import { EuiSpacer, EuiText, EuiIcon, EuiFlexGroup, EuiFlexItem, EuiPanel } from '@elastic/eui'; +import React, { useState } from 'react'; +import './empty_view.scss'; + +export const EmptyMetricsView = () => { + return ( +
+ +
+ + + +

No Metrics Selected

+ + + Select a metric from the left sidepanel to view results. + +
+
+
+
+ ); +}; diff --git a/dashboards-observability/public/components/metrics/view/metrics_grid.scss b/dashboards-observability/public/components/metrics/view/metrics_grid.scss new file mode 100644 index 000000000..ff866b444 --- /dev/null +++ b/dashboards-observability/public/components/metrics/view/metrics_grid.scss @@ -0,0 +1,8 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + + .metrics-grid-div { + min-height: 70vh; + } \ No newline at end of file diff --git a/dashboards-observability/public/components/metrics/view/metrics_grid.tsx b/dashboards-observability/public/components/metrics/view/metrics_grid.tsx new file mode 100644 index 000000000..13f92d04f --- /dev/null +++ b/dashboards-observability/public/components/metrics/view/metrics_grid.tsx @@ -0,0 +1,175 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +import PPLService from 'public/services/requests/ppl'; +import React, { useEffect, useState } from 'react'; +import { CoreStart } from '../../../../../../src/core/public'; +import { Layout, Layouts, Responsive, WidthProvider } from 'react-grid-layout'; +import { useObservable } from 'react-use'; +import { VisualizationContainer } from '../../custom_panels/panel_modules/visualization_container'; +import { MetricType } from '../../../../common/types/metrics'; +import _ from 'lodash'; +import { mergeLayoutAndVisualizations } from '../../custom_panels/helpers/utils'; +import { useDispatch } from 'react-redux'; +import { updateMetricsLayout, deSelectMetric } from '../redux/slices/metrics_slice'; +import { mergeLayoutAndMetrics } from '../helpers/utils'; + +import './metrics_grid.scss'; + +// HOC container to provide dynamic width for Grid layout +const ResponsiveGridLayout = WidthProvider(Responsive); + +interface MetricsGridProps { + http: CoreStart['http']; + chrome: CoreStart['chrome']; + panelVisualizations: MetricType[]; + setPanelVisualizations: React.Dispatch>; + editMode: boolean; + pplService: PPLService; + startTime: string; + endTime: string; + moveToEvents: (savedVisualizationId: string) => any; + onRefresh: boolean; + editActionType: string; + spanParam: string; +} + +export const MetricsGrid = ({ + http, + chrome, + panelVisualizations, + setPanelVisualizations, + editMode, + pplService, + startTime, + endTime, + moveToEvents, + onRefresh, + editActionType, + spanParam, +}: MetricsGridProps) => { + // Redux tools + const dispatch = useDispatch(); + const updateLayout = (metric: any) => dispatch(updateMetricsLayout(metric)); + const handleRemoveMetric = (metric: any) => { + dispatch(deSelectMetric(metric)); + }; + + const [currentLayout, setCurrentLayout] = useState([]); + const [postEditLayout, setPostEditLayout] = useState([]); + const [gridData, setGridData] = useState(panelVisualizations.map(() => <>)); + const [removeMetricsList, setRemoveMetricsList] = useState<{ id: string }[]>([]); + const isLocked = useObservable(chrome.getIsNavDrawerLocked$()); + + // Reset Size of Visualizations when layout is changed + const layoutChanged = (currLayouts: Layout[], allLayouts: Layouts) => { + window.dispatchEvent(new Event('resize')); + setPostEditLayout(currLayouts); + }; + + const loadVizComponents = () => { + const gridDataComps = panelVisualizations.map((panelVisualization: MetricType, index) => ( + + )); + setGridData(gridDataComps); + }; + + // Reload the Layout + const reloadLayout = () => { + const tempLayout: Layout[] = panelVisualizations.map((panelVisualization) => { + return { + i: panelVisualization.id, + x: panelVisualization.x, + y: panelVisualization.y, + w: panelVisualization.w, + h: panelVisualization.h, + minW: 12, // restricting width of the metric visualization + maxW: 12, + static: !editMode, + } as Layout; + }); + setCurrentLayout(tempLayout); + }; + + // remove visualization from panel in edit mode + const removeVisualization = (visualizationId: string) => { + const newVisualizationList = _.reject(panelVisualizations, { + id: visualizationId, + }); + setRemoveMetricsList([...removeMetricsList, { id: visualizationId }]); + mergeLayoutAndVisualizations(postEditLayout, newVisualizationList, setPanelVisualizations); + }; + + // Update layout whenever user edit gets completed + useEffect(() => { + if (editMode) { + reloadLayout(); + loadVizComponents(); + } + }, [editMode]); + + useEffect(() => { + if (editActionType === 'cancel') { + setRemoveMetricsList([]); + } + if (editActionType === 'save') { + removeMetricsList.map((value) => handleRemoveMetric(value)); + updateLayout(mergeLayoutAndMetrics(postEditLayout, panelVisualizations)); + } + }, [editActionType]); + + // Update layout whenever visualizations are updated + useEffect(() => { + reloadLayout(); + loadVizComponents(); + }, [panelVisualizations]); + + // Reset Size of Panel Grid when Nav Dock is Locked + useEffect(() => { + setTimeout(function () { + window.dispatchEvent(new Event('resize')); + }, 300); + }, [isLocked]); + + useEffect(() => { + loadVizComponents(); + }, [onRefresh]); + + useEffect(() => { + loadVizComponents(); + }, []); + + return ( + + {panelVisualizations.map((panelVisualization: MetricType, index) => ( +
{gridData[index]}
+ ))} +
+ ); +}; diff --git a/dashboards-observability/public/components/trace_analytics/components/common/__tests__/__snapshots__/search_bar.test.tsx.snap b/dashboards-observability/public/components/trace_analytics/components/common/__tests__/__snapshots__/search_bar.test.tsx.snap index 281e70659..9c3997a72 100644 --- a/dashboards-observability/public/components/trace_analytics/components/common/__tests__/__snapshots__/search_bar.test.tsx.snap +++ b/dashboards-observability/public/components/trace_analytics/components/common/__tests__/__snapshots__/search_bar.test.tsx.snap @@ -882,12 +882,14 @@ exports[`Search bar components renders search bar 1`] = ` className="euiFlexItem euiFlexItem--flexGrowZero" >
- + `; diff --git a/dashboards-observability/public/components/visualizations/charts/__tests__/__snapshots__/horizontal_bar.test.tsx.snap b/dashboards-observability/public/components/visualizations/charts/__tests__/__snapshots__/horizontal_bar.test.tsx.snap index 23b32e4c2..c8115cee2 100644 --- a/dashboards-observability/public/components/visualizations/charts/__tests__/__snapshots__/horizontal_bar.test.tsx.snap +++ b/dashboards-observability/public/components/visualizations/charts/__tests__/__snapshots__/horizontal_bar.test.tsx.snap @@ -529,112 +529,75 @@ exports[`Horizontal bar component Renders horizontal bar component 1`] = ` } } > - -
- - + className="euiText euiText--extraSmall lnsChart__empty" + data-test-subj="vizWorkspace__noData" + > + +
+ +
+ + + + + + +
+ +

+ Missing aggregations +

+
+ +
+ +
+ + `; diff --git a/dashboards-observability/public/components/visualizations/charts/__tests__/__snapshots__/line.test.tsx.snap b/dashboards-observability/public/components/visualizations/charts/__tests__/__snapshots__/line.test.tsx.snap index c054c7fe5..9694c40d7 100644 --- a/dashboards-observability/public/components/visualizations/charts/__tests__/__snapshots__/line.test.tsx.snap +++ b/dashboards-observability/public/components/visualizations/charts/__tests__/__snapshots__/line.test.tsx.snap @@ -529,8 +529,9 @@ exports[`Line component Renders line component 1`] = ` } } > -

- - - No results found - - + Missing mandatory series

@@ -605,6 +598,6 @@ exports[`Line component Renders line component 1`] = `
- + `; diff --git a/dashboards-observability/public/components/visualizations/charts/__tests__/__snapshots__/metrics.test.tsx.snap b/dashboards-observability/public/components/visualizations/charts/__tests__/__snapshots__/metrics.test.tsx.snap index 3b51e9fab..c001a02af 100644 --- a/dashboards-observability/public/components/visualizations/charts/__tests__/__snapshots__/metrics.test.tsx.snap +++ b/dashboards-observability/public/components/visualizations/charts/__tests__/__snapshots__/metrics.test.tsx.snap @@ -444,12 +444,6 @@ exports[`Metrics component Renders Metrics component 1`] = ` "mapTo": "layoutConfig", "name": "Layout", }, - Object { - "editor": [Function], - "id": "availability-panel", - "mapTo": "availabilityConfig", - "name": "Availability", - }, ], }, "fulllabel": "Metrics", @@ -575,12 +569,12 @@ exports[`Metrics component Renders Metrics component 1`] = `

- No results found + No data found

diff --git a/dashboards-observability/public/components/visualizations/charts/__tests__/__snapshots__/pie.test.tsx.snap b/dashboards-observability/public/components/visualizations/charts/__tests__/__snapshots__/pie.test.tsx.snap index 6d12adee6..4bcc7e430 100644 --- a/dashboards-observability/public/components/visualizations/charts/__tests__/__snapshots__/pie.test.tsx.snap +++ b/dashboards-observability/public/components/visualizations/charts/__tests__/__snapshots__/pie.test.tsx.snap @@ -590,12 +590,12 @@ exports[`Pie component Renders pie component 1`] = `

- No results found + No data found

diff --git a/dashboards-observability/public/components/visualizations/charts/bar/bar.tsx b/dashboards-observability/public/components/visualizations/charts/bar/bar.tsx index fa39366c9..53c7ae5de 100644 --- a/dashboards-observability/public/components/visualizations/charts/bar/bar.tsx +++ b/dashboards-observability/public/components/visualizations/charts/bar/bar.tsx @@ -23,7 +23,7 @@ import { import { IVisualizationContainerProps } from '../../../../../common/types/explorer'; import { AvailabilityUnitType } from '../../../event_analytics/explorer/visualizations/config_panel/config_panes/config_controls/config_availability'; import { ThresholdUnitType } from '../../../event_analytics/explorer/visualizations/config_panel/config_panes/config_controls/config_thresholds'; -import { EmptyPlaceholder } from '../../../event_analytics/explorer/visualizations/shared_components/empty_placeholder'; +import { VisCanvassPlaceholder } from '../../../event_analytics/explorer/visualizations/shared_components'; import { hexToRgb } from '../../../event_analytics/utils/utils'; import { Plt } from '../../plotly/plot'; import { transformPreprocessedDataToTraces, preprocessJsonData } from '../shared/common'; @@ -44,6 +44,7 @@ export const Bar = ({ visualizations, layout, config }: any) => { legend = {}, panelOptions = {}, tooltipOptions = {}, + thresholds = [], [GROUPBY]: dimensions = [], [AGGREGATIONS]: series = [], [BREAKDOWNS]: breakdowns = [], @@ -97,13 +98,8 @@ export const Bar = ({ visualizations, layout, config }: any) => { const plotlyColorway = queriedVizData[fields[lastIndex].name].length < 16 ? PLOTLY_COLOR : [LONG_CHART_COLOR]; - if ( - isEmpty(queriedVizData) || - !Array.isArray(dimensions) || - !Array.isArray(series) || - (breakdowns && !Array.isArray(breakdowns)) - ) - return ; + if (isEmpty(series)) + return ; const addStylesToTraces = (traces, traceStyles) => { const { barOrientation, fillOpacity, tooltipMode, tooltipText, lineWidth } = traceStyles; @@ -190,7 +186,7 @@ export const Bar = ({ visualizations, layout, config }: any) => { }; }, [visualizations, layout, panelOptions, showLegend, chartStyles]); - if (availabilityConfig.level) { + if (thresholds || availabilityConfig.level) { const thresholdTraces = { x: [], y: [], @@ -200,18 +196,14 @@ export const Bar = ({ visualizations, layout, config }: any) => { const levels = availabilityConfig.level ? availabilityConfig.level : []; const mapToLine = (list: ThresholdUnitType[] | AvailabilityUnitType[], lineStyle: any) => { return list.map((thr: ThresholdUnitType) => { - thresholdTraces.x.push( - queriedVizData[ - !isEmpty(xaxis) ? xaxis[xaxis.length - 1]?.label : fields[lastIndex].name - ][0] - ); + thresholdTraces.x.push(bars[0]?.x[0] || ''); thresholdTraces.y.push(thr.value * (1 + 0.06)); thresholdTraces.text.push(thr.name); return { type: 'line', - x0: queriedVizData[!isEmpty(xaxis) ? xaxis[0]?.label : fields[lastIndex].name][0], + x0: bars[0]?.x[0] || 0, y0: thr.value, - x1: last(queriedVizData[!isEmpty(xaxis) ? xaxis[0]?.label : fields[lastIndex].name]), + x1: last(last(bars)?.x) || 1, y1: thr.value, name: thr.name || '', opacity: THRESHOLD_LINE_OPACITY, @@ -224,7 +216,7 @@ export const Bar = ({ visualizations, layout, config }: any) => { }); }; - mergedLayout.shapes = mapToLine(levels, {}); + mergedLayout.shapes = [...mapToLine(thresholds, { dash: 'dashdot' }), ...mapToLine(levels, {})]; bars = [...bars, thresholdTraces]; } diff --git a/dashboards-observability/public/components/visualizations/charts/data_table/data_table.tsx b/dashboards-observability/public/components/visualizations/charts/data_table/data_table.tsx index dfa40da13..2efa8bbaf 100644 --- a/dashboards-observability/public/components/visualizations/charts/data_table/data_table.tsx +++ b/dashboards-observability/public/components/visualizations/charts/data_table/data_table.tsx @@ -30,17 +30,12 @@ const doubleValueGetter = (params) => { export const DataTable = ({ visualizations, layout, config }: any) => { const { data: { - defaultAxes, - indexFields, - query, rawVizData: { - data: queriedVizData, - jsonData, - metadata: { fields = [] }, - }, + jsonData = [], + metadata: { fields = [] } = {}, + } = {}, userConfigs: { dataConfig: { chartStyles = {} } = {} } = {}, - } = {}, - vis: visMetaData, + } = {} }: IVisualizationContainerProps = visualizations; const enablePagination = diff --git a/dashboards-observability/public/components/visualizations/charts/data_table/data_table_type.ts b/dashboards-observability/public/components/visualizations/charts/data_table/data_table_type.ts index 2ca11ace0..7ad582ccd 100644 --- a/dashboards-observability/public/components/visualizations/charts/data_table/data_table_type.ts +++ b/dashboards-observability/public/components/visualizations/charts/data_table/data_table_type.ts @@ -97,19 +97,6 @@ export const createDatatableTypeDefinition = (params: any = {}) => ({ }, ], }, - { - id: 'style-panel', - name: 'Layout', - mapTo: 'layoutConfig', - editor: ConfigEditor, - content: [], - }, - { - id: 'availability-panel', - name: 'Availability', - mapTo: 'availabilityConfig', - editor: ConfigAvailability, - }, ], }, visconfig: { diff --git a/dashboards-observability/public/components/visualizations/charts/helpers/viz_types.ts b/dashboards-observability/public/components/visualizations/charts/helpers/viz_types.ts index bc71c36d1..8fa0142cb 100644 --- a/dashboards-observability/public/components/visualizations/charts/helpers/viz_types.ts +++ b/dashboards-observability/public/components/visualizations/charts/helpers/viz_types.ts @@ -111,7 +111,7 @@ const getSpanValue = (statsTokens: statsChunk) => { const defaultUserConfigs = (queryString, visualizationName: string) => { let tempUserConfigs = {}; const qm = new QueryManager(); - const statsTokens = qm.queryParser().parse(queryString.rawQuery).getStats(); + const statsTokens = qm.queryParser().parse(queryString.finalQuery).getStats(); if (!statsTokens) { tempUserConfigs = { [AGGREGATIONS]: [], diff --git a/dashboards-observability/public/components/visualizations/charts/lines/line.tsx b/dashboards-observability/public/components/visualizations/charts/lines/line.tsx index 88de3ae06..8f34f59d0 100644 --- a/dashboards-observability/public/components/visualizations/charts/lines/line.tsx +++ b/dashboards-observability/public/components/visualizations/charts/lines/line.tsx @@ -17,7 +17,7 @@ import { IVisualizationContainerProps } from '../../../../../common/types/explor import { hexToRgb } from '../../../../components/event_analytics/utils/utils'; import { AvailabilityUnitType } from '../../../event_analytics/explorer/visualizations/config_panel/config_panes/config_controls/config_availability'; import { ThresholdUnitType } from '../../../event_analytics/explorer/visualizations/config_panel/config_panes/config_controls/config_thresholds'; -import { EmptyPlaceholder } from '../../../event_analytics/explorer/visualizations/shared_components/empty_placeholder'; +import { VisCanvassPlaceholder } from '../../../event_analytics/explorer/visualizations/shared_components'; import { Plt } from '../../plotly/plot'; import { transformPreprocessedDataToTraces, preprocessJsonData } from '../shared/common'; @@ -44,7 +44,6 @@ export const Line = ({ visualizations, layout, config }: any) => { userConfigs: { dataConfig: { chartStyles = {}, - seriesPosition = [], legend = {}, span = {}, colorTheme = [], @@ -86,44 +85,25 @@ export const Line = ({ visualizations, layout, config }: any) => { colorTheme.find((colorSelected) => colorSelected.name.name === field)?.color) || PLOTLY_COLOR[index % PLOTLY_COLOR.length]; const timestampField = find(fields, (field) => field.type === 'timestamp'); - const xaxis = [timestampField]; - let multiYAxisLayout = {}; + let xaxis = [timestampField]; - if (!timestampField || isEmpty(series)) return ; + if (isEmpty(series)) return ; const addStylesToTraces = (traces, traceStyles) => { const { fillOpacity, tooltipMode, tooltipText, lineWidth, lineShape, markerSize } = traceStyles; return traces.map((trace, idx: number) => { const selectedColor = getSelectedColorTheme(trace.aggName, idx); const fillColor = hexToRgb(selectedColor, fillOpacity); - const side = seriesPosition.find((seriesItem) => seriesItem.label === trace.name); - const multiYaxis = { yaxis: `y${idx + 1}` }; - - multiYAxisLayout = { - ...multiYAxisLayout, - [`yaxis${idx > 0 ? idx + 1 : ''}`]: { - titlefont: { - color: selectedColor, - }, - automargin: true, - tickfont: { - color: selectedColor, - ...(labelSize && { - size: labelSize, - }), - }, - ...(idx > 0 && { overlaying: 'y' }), - side: side ? side.side : 'left', - }, - }; return { ...trace, hoverinfo: tooltipMode === 'hidden' ? 'none' : tooltipText, type: 'line', mode, - fill: 'tozeroy', - fillcolor: fillColor, + ...{ + fill: 'tozeroy', + fillcolor: fillColor, + }, line: { shape: lineShape, width: lineWidth, @@ -131,13 +111,14 @@ export const Line = ({ visualizations, layout, config }: any) => { }, marker: { size: markerSize, - color: fillColor, - line: { - color: selectedColor, - width: lineWidth, + ...{ + color: fillColor, + line: { + color: selectedColor, + width: lineWidth, + }, }, }, - ...(idx >= 1 && multiYaxis), }; }); }; @@ -162,7 +143,16 @@ export const Line = ({ visualizations, layout, config }: any) => { transformPreprocessedDataToTraces(preprocessJsonData(jsonData, visConfig), visConfig), traceStyles ); - }, [chartStyles, jsonData, dimensions, series, span, breakdowns, panelOptions, tooltipOptions]); + }, [ + chartStyles, + jsonData, + dimensions, + series, + span, + breakdowns, + panelOptions, + tooltipOptions, + ]); const mergedLayout = useMemo(() => { const axisLabelsStyle = { @@ -191,7 +181,9 @@ export const Line = ({ visualizations, layout, config }: any) => { tickangle: tickAngle, ...axisLabelsStyle, }, - ...multiYAxisLayout, + yaxis: { + ...axisLabelsStyle, + }, showlegend: showLegend, margin: PLOT_MARGIN, }; @@ -210,18 +202,14 @@ export const Line = ({ visualizations, layout, config }: any) => { const mapToLine = (list: ThresholdUnitType[] | AvailabilityUnitType[], lineStyle: any) => { return list.map((thr: ThresholdUnitType) => { - thresholdTraces.x.push( - queriedVizData[ - !isEmpty(xaxis) ? xaxis[xaxis.length - 1]?.name : fields[lastIndex].name - ][0] - ); + thresholdTraces.x.push(lines[0]?.x[0] || ''); thresholdTraces.y.push(thr.value * (1 + 0.06)); thresholdTraces.text.push(thr.name); return { type: 'line', - x0: queriedVizData[!isEmpty(xaxis) ? xaxis[0]?.name : fields[lastIndex].name][0], + x0: lines[0]?.x[0] || 0, y0: thr.value, - x1: last(queriedVizData[!isEmpty(xaxis) ? xaxis[0]?.name : fields[lastIndex].name]), + x1: last(last(lines)?.x) || 1, y1: thr.value, name: thr.name || '', opacity: 0.7, diff --git a/dashboards-observability/public/components/visualizations/charts/lines/line_type.ts b/dashboards-observability/public/components/visualizations/charts/lines/line_type.ts index ccbde39ab..b82e44eb0 100644 --- a/dashboards-observability/public/components/visualizations/charts/lines/line_type.ts +++ b/dashboards-observability/public/components/visualizations/charts/lines/line_type.ts @@ -14,7 +14,6 @@ import { ConfigLegend, InputFieldItem, ConfigColorTheme, - ConfigYAxisSide, } from '../../../event_analytics/explorer/visualizations/config_panel/config_panes/config_controls'; import { ConfigAvailability } from '../../../event_analytics/explorer/visualizations/config_panel/config_panes/config_controls/config_availability'; import { @@ -205,20 +204,6 @@ export const createLineTypeDefinition = (params: any = {}) => ({ }, ], }, - { - id: 'yaxis-side', - name: 'Series label position', - editor: ConfigYAxisSide, - mapTo: 'seriesPosition', - schemas: [], - }, - { - id: 'color-theme', - name: 'Color theme', - editor: ConfigColorTheme, - mapTo: 'colorTheme', - schemas: [], - }, { id: 'thresholds', name: 'Thresholds', diff --git a/dashboards-observability/public/components/visualizations/charts/maps/heatmap.tsx b/dashboards-observability/public/components/visualizations/charts/maps/heatmap.tsx index 7bc51e497..ad08ac26f 100644 --- a/dashboards-observability/public/components/visualizations/charts/maps/heatmap.tsx +++ b/dashboards-observability/public/components/visualizations/charts/maps/heatmap.tsx @@ -4,7 +4,7 @@ */ import React, { useMemo } from 'react'; import { colorPalette } from '@elastic/eui'; -import { has, isEmpty, uniq } from 'lodash'; +import { forEach, has, isEmpty, isEqual, uniq } from 'lodash'; import Plotly from 'plotly.js-dist'; import { HEATMAP_PALETTE_COLOR, @@ -18,17 +18,16 @@ import { getPropName, } from '../../../../components/event_analytics/utils/utils'; import { IVisualizationContainerProps } from '../../../../../common/types/explorer'; -import { EmptyPlaceholder } from '../../../event_analytics/explorer/visualizations/shared_components/empty_placeholder'; +import { VisCanvassPlaceholder } from '../../../event_analytics/explorer/visualizations/shared_components/vis_canvass_placeholder'; import { Plt } from '../../plotly/plot'; import { AGGREGATIONS, GROUPBY } from '../../../../../common/constants/explorer'; import { PLOT_MARGIN } from '../../../../../common/constants/shared'; +import { getCompleteTimespanKey } from '../../../visualizations/charts/shared/common'; +import { removeBacktick } from '../../../../../common/utils'; export const HeatMap = ({ visualizations, layout, config }: any) => { const { data: { - defaultAxes, - indexFields, - query, rawVizData: { data: queriedVizData, metadata: { fields }, @@ -36,6 +35,7 @@ export const HeatMap = ({ visualizations, layout, config }: any) => { userConfigs: { dataConfig: { chartStyles = {}, + span = {}, legend = {}, tooltipOptions = {}, panelOptions = {}, @@ -48,26 +48,31 @@ export const HeatMap = ({ visualizations, layout, config }: any) => { vis: { icontype }, }: IVisualizationContainerProps = visualizations; - if (fields.length < 3) return ; - - const xaxisField = dimensions[0]; - const yaxisField = dimensions[1]; - const zMetrics = series[0]; + const backtickRemovedVisData = {}; + forEach(queriedVizData, (value, key) => { + backtickRemovedVisData[removeBacktick(key)] = value; + }); + const combinedDemensions = [ + ...(!isEmpty(span) ? [getCompleteTimespanKey(span)] : []), + ...dimensions, + ]; + if (!isEqual(combinedDemensions.length, 2) || !isEqual(series.length, 1)) + return ; + const xaxisField = { ...combinedDemensions[0] }; + const yaxisField = { ...combinedDemensions[1] }; + const zMetrics = { ...series[0] }; if ( isEmpty(xaxisField) || isEmpty(yaxisField) || isEmpty(zMetrics) || - isEmpty(queriedVizData[xaxisField.label]) || - isEmpty(queriedVizData[yaxisField.label]) || - isEmpty(queriedVizData[getPropName(zMetrics)]) || - dimensions.length > 2 || - series.length > 1 + isEmpty(backtickRemovedVisData[removeBacktick(xaxisField.label)]) || + isEmpty(backtickRemovedVisData[removeBacktick(yaxisField.label)]) ) - return ; + return ; - const uniqueYaxis = uniq(queriedVizData[yaxisField.label]); - const uniqueXaxis = uniq(queriedVizData[xaxisField.label]); + const uniqueYaxis = uniq(backtickRemovedVisData[removeBacktick(yaxisField.label)]); + const uniqueXaxis = uniq(backtickRemovedVisData[removeBacktick(xaxisField.label)]); const uniqueYaxisLength = uniqueYaxis.length; const uniqueXaxisLength = uniqueXaxis.length; const tooltipMode = @@ -97,9 +102,9 @@ export const HeatMap = ({ visualizations, layout, config }: any) => { const buckets = {}; // maps bukcets to metrics - for (let i = 0; i < queriedVizData[xaxisField.label].length; i++) { - buckets[`${queriedVizData[xaxisField.label][i]},${queriedVizData[yaxisField.label][i]}`] = - queriedVizData[getPropName(zMetrics)][i]; + for (let i = 0; i < backtickRemovedVisData[removeBacktick(xaxisField.label)].length; i++) { + buckets[`${backtickRemovedVisData[removeBacktick(xaxisField.label)][i]},${backtickRemovedVisData[removeBacktick(yaxisField.label)][i]}`] = + backtickRemovedVisData[getPropName(zMetrics)][i]; } // initialize empty 2 dimensional array, inner loop for each xaxis field, outer loop for yaxis @@ -122,7 +127,7 @@ export const HeatMap = ({ visualizations, layout, config }: any) => { return heapMapZaxis; }, [ - queriedVizData, + backtickRemovedVisData, uniqueYaxis, uniqueXaxis, uniqueYaxisLength, diff --git a/dashboards-observability/public/components/visualizations/charts/metrics/metrics_type.ts b/dashboards-observability/public/components/visualizations/charts/metrics/metrics_type.ts index 11b835def..bc8f6b546 100644 --- a/dashboards-observability/public/components/visualizations/charts/metrics/metrics_type.ts +++ b/dashboards-observability/public/components/visualizations/charts/metrics/metrics_type.ts @@ -164,12 +164,6 @@ export const createMetricsTypeDefinition = (params: any = {}) => ({ editor: ConfigEditor, content: [], }, - { - id: 'availability-panel', - name: 'Availability', - mapTo: 'availabilityConfig', - editor: ConfigAvailability, - }, ], }, visconfig: { diff --git a/dashboards-observability/public/components/visualizations/charts/pie/pie.tsx b/dashboards-observability/public/components/visualizations/charts/pie/pie.tsx index 48cf5c366..e6443b158 100644 --- a/dashboards-observability/public/components/visualizations/charts/pie/pie.tsx +++ b/dashboards-observability/public/components/visualizations/charts/pie/pie.tsx @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { find, isEmpty } from 'lodash'; +import { find, isEmpty, forEach } from 'lodash'; import React, { useMemo } from 'react'; import { DEFAULT_PALETTE, HEX_CONTRAST_COLOR } from '../../../../../common/constants/colors'; import { @@ -21,6 +21,7 @@ import { import { EmptyPlaceholder } from '../../../event_analytics/explorer/visualizations/shared_components/empty_placeholder'; import { getPropName, getTooltipHoverInfo } from '../../../event_analytics/utils/utils'; import { Plt } from '../../plotly/plot'; +import { removeBacktick } from '../../../../../common/utils'; export const Pie = ({ visualizations, layout, config }: any) => { const { @@ -56,6 +57,11 @@ export const Pie = ({ visualizations, layout, config }: any) => { const title = panelOptions.title || layoutConfig.layout?.title || ''; const timestampField = find(fields, (field) => field.type === 'timestamp'); + const backtickRemovedVisData = {}; + forEach(queriedVizData, (value, key) => { + backtickRemovedVisData[removeBacktick(key)] = value; + }); + /** * determine x axis */ @@ -74,10 +80,10 @@ export const Pie = ({ visualizations, layout, config }: any) => { (Number(`0x1${hex}`) ^ HEX_CONTRAST_COLOR).toString(16).substr(1).toUpperCase(); const labelsOfXAxis = xaxes.reduce((prev, cur) => { - if (queriedVizData[cur.name]) { - if (prev.length === 0) return queriedVizData[cur.name].flat(); + if (backtickRemovedVisData[removeBacktick(cur.name)]) { + if (prev.length === 0) return backtickRemovedVisData[removeBacktick(cur.name)].flat(); return prev.map( - (item: string | number, index: number) => `${item}, ${queriedVizData[cur.name][index]}` + (item: string | number, index: number) => `${item}, ${backtickRemovedVisData[removeBacktick(cur.name)][index]}` ); } }, []); @@ -92,7 +98,7 @@ export const Pie = ({ visualizations, layout, config }: any) => { colorTheme.name !== DEFAULT_PALETTE ? { marker: { - colors: [...Array(queriedVizData[fieldName].length).fill(colorTheme.childColor)], + colors: [...Array(backtickRemovedVisData[removeBacktick(fieldName)].length).fill(colorTheme.childColor)], line: { color: hexColor, width: 1, @@ -102,7 +108,7 @@ export const Pie = ({ visualizations, layout, config }: any) => { : undefined; return { labels: labelsOfXAxis, - values: queriedVizData[fieldName], + values: backtickRemovedVisData[removeBacktick(fieldName)], type: 'pie', name: getPropName(field), hole: type === 'pie' ? 0 : 0.5, @@ -125,7 +131,7 @@ export const Pie = ({ visualizations, layout, config }: any) => { }, }; }), - [series, queriedVizData, chartLabelSize, labelsOfXAxis, colorTheme] + [series, backtickRemovedVisData, chartLabelSize, labelsOfXAxis, colorTheme] ); const mergedLayout = useMemo(() => { diff --git a/dashboards-observability/public/components/visualizations/charts/pie/pie_type.ts b/dashboards-observability/public/components/visualizations/charts/pie/pie_type.ts index 690754556..2ec2dc1e7 100644 --- a/dashboards-observability/public/components/visualizations/charts/pie/pie_type.ts +++ b/dashboards-observability/public/components/visualizations/charts/pie/pie_type.ts @@ -121,15 +121,6 @@ export const createPieTypeDefinition = (params: any) => ({ mapTo: 'labelSize', eleType: 'input', }, - { - name: 'Color theme', - isSingleSelection: true, - component: ColorPalettePicker, - mapTo: 'colorTheme', - eleType: 'colorpicker', - options: PIE_PALETTES, - defaultState: { name: DEFAULT_PALETTE }, - }, ], }, ], diff --git a/dashboards-observability/public/components/visualizations/charts/shared/common.ts b/dashboards-observability/public/components/visualizations/charts/shared/common.ts index e5c0b06d4..6d782b41a 100644 --- a/dashboards-observability/public/components/visualizations/charts/shared/common.ts +++ b/dashboards-observability/public/components/visualizations/charts/shared/common.ts @@ -6,10 +6,13 @@ import { isEmpty, forEach } from 'lodash'; import { CUSTOM_LABEL } from '../../../../../common/constants/explorer'; import { ConfigList, DimensionSpan } from '../../../../../common/types/explorer'; +import { removeBacktick } from '../../../../../common/utils'; export const getCompleteTimespanKey = (span: DimensionSpan) => { - if (!span || isEmpty(span.time_field) || isEmpty(span.interval) || isEmpty(span.unit)) return ''; - return { name: `span(${span.time_field[0]?.name},${span.interval}${span.unit[0]?.value})` }; + if (isEmpty(span) || isEmpty(span.time_field) || isEmpty(span.interval) || isEmpty(span.unit)) + return ''; + const spanName = `span(${span.time_field[0]?.name},${span.interval}${span.unit[0]?.value})`; + return { name: spanName, label: spanName }; }; /** @@ -58,22 +61,30 @@ export const preprocessJsonData = ( ) => { const seriesFlattenedEntries = []; forEach(visJson, (entry) => { + const backtickRemovedEntry = {}; + // remove backtick, so data in jsonData can be accessed through using field name + forEach(entry, (value, key) => { + backtickRemovedEntry[removeBacktick(key)] = value; + }); forEach(series, (sr) => { let tabularVizData = {}; const serieKey = sr[CUSTOM_LABEL] ? sr[CUSTOM_LABEL] : `${sr.aggregation}(${sr.name})`; - let timespanDimension = []; - if (span) { - timespanDimension.push(getCompleteTimespanKey(span)); - } if (!isEmpty(serieKey)) { - const concatedXaxisLabel = [...timespanDimension, ...(dimensions)] - .map((dimension) => entry[dimension.name]) + const concatedXaxisLabel = [ + ...(!isEmpty(span) ? [getCompleteTimespanKey(span)] : []), + ...dimensions, + ] + .map((dimension) => { + return backtickRemovedEntry[removeBacktick(dimension.name)] ?? ''; + }) .join(','); const concatedBreakdownLabel = breakdowns - ? breakdowns.map((breakdown) => entry[breakdown.name]).join(',') + ? breakdowns + .map((breakdown) => backtickRemovedEntry[removeBacktick(breakdown.name)]) + .join(',') : ''; tabularVizData = { - value: entry[serieKey], + value: backtickRemovedEntry[serieKey], x: concatedXaxisLabel, breakdown: concatedBreakdownLabel, aggName: serieKey, diff --git a/dashboards-observability/public/components/visualizations/visualization.tsx b/dashboards-observability/public/components/visualizations/visualization.tsx index 75ba98241..63c342244 100644 --- a/dashboards-observability/public/components/visualizations/visualization.tsx +++ b/dashboards-observability/public/components/visualizations/visualization.tsx @@ -4,30 +4,19 @@ */ import React from 'react'; -import { isArray } from 'lodash'; +import { isEmpty } from 'lodash'; import { VisualizationChart } from './visualization_chart'; -import { EmptyPlaceholder } from '../event_analytics/explorer/visualizations/shared_components/empty_placeholder'; -import { VIS_CHART_TYPES } from '../../../common/constants/shared'; +import { VisCanvassPlaceholder } from '../event_analytics/explorer/visualizations/shared_components'; interface IVisualizationProps {} export const Visualization = ({ visualizations }: IVisualizationProps) => { - const { data, vis } = visualizations; - const { metadata = {} } = visualizations?.data?.rawVizData; - const { fields = [] } = metadata; - - // check viz data - const isVizDataValid = data && vis && visualizations?.data?.rawVizData; - - // check fields - const isVizFieldValid = fields && isArray(fields) && fields.length > 0; - return ( <> - {vis?.type === VIS_CHART_TYPES.LogsView || (isVizDataValid && isVizFieldValid) ? ( + {!isEmpty(visualizations?.data?.rawVizData?.data) ? ( ) : ( - + )} ); diff --git a/dashboards-observability/public/framework/redux/reducers/index.ts b/dashboards-observability/public/framework/redux/reducers/index.ts index 1dfcf743c..47e5dd321 100644 --- a/dashboards-observability/public/framework/redux/reducers/index.ts +++ b/dashboards-observability/public/framework/redux/reducers/index.ts @@ -12,6 +12,8 @@ import FieldsReducer from '../../../components/event_analytics/redux/slices/fiel import countDistributionReducer from '../../../components/event_analytics/redux/slices/count_distribution_slice'; import explorerVisualizationReducer from '../../../components/event_analytics/redux/slices/visualization_slice'; import explorerVisualizationConfigReducer from '../../../components/event_analytics/redux/slices/viualization_config_slice'; +import patternsReducer from '../../../components/event_analytics/redux/slices/patterns_slice'; +import metricsReducers from '../../../components/metrics/redux/slices/metrics_slice'; const rootReducer = combineReducers({ // explorer reducers @@ -22,6 +24,8 @@ const rootReducer = combineReducers({ countDistribution: countDistributionReducer, explorerVisualization: explorerVisualizationReducer, explorerVisualizationConfig: explorerVisualizationConfigReducer, + patterns: patternsReducer, + metrics: metricsReducers, }); export type RootState = ReturnType; diff --git a/dashboards-observability/public/plugin.ts b/dashboards-observability/public/plugin.ts index a14131546..1e3189e57 100644 --- a/dashboards-observability/public/plugin.ts +++ b/dashboards-observability/public/plugin.ts @@ -47,7 +47,7 @@ export class ObservabilityPlugin implements Plugin { console.error('fetch error: ', error.body); if (errorHandler) errorHandler(error); + throw error; }); }; } diff --git a/dashboards-observability/public/services/saved_objects/event_analytics/saved_objects.ts b/dashboards-observability/public/services/saved_objects/event_analytics/saved_objects.ts index 880aad65c..0f207ab79 100644 --- a/dashboards-observability/public/services/saved_objects/event_analytics/saved_objects.ts +++ b/dashboards-observability/public/services/saved_objects/event_analytics/saved_objects.ts @@ -57,6 +57,9 @@ export default class SavedObjects { description = '', applicationId = '', userConfigs = '', + subType = '', + unitsOfMeasure = '', + selectedLabels, }: any) { const objRequest: any = { object: { @@ -91,6 +94,18 @@ export default class SavedObjects { objRequest.object.user_configs = userConfigs; } + if (!isEmpty(subType)) { + objRequest.object.sub_type = subType; + } + + if (!isEmpty(unitsOfMeasure)) { + objRequest.object.units_of_measure = unitsOfMeasure; + } + + if (!isEmpty(selectedLabels)) { + objRequest.object.selected_labels = selectedLabels; + } + return objRequest; } @@ -167,6 +182,9 @@ export default class SavedObjects { timestamp: params.timestamp, userConfigs: params.userConfigs, description: params.description, + subType: params.subType, + unitsOfMeasure: params.unitsOfMeasure, + selectedLabels: params.selectedLabels }); finalParams.object_id = params.objectId; @@ -227,6 +245,9 @@ export default class SavedObjects { applicationId: params.applicationId, userConfigs: params.userConfigs, description: params.description, + subType: params.subType, + unitsOfMeasure: params.unitsOfMeasure, + selectedLabels: params.selectedLabels }); return await this.http.post( diff --git a/dashboards-observability/public/services/timestamp/timestamp.ts b/dashboards-observability/public/services/timestamp/timestamp.ts index 281f528dc..93c5c0cac 100644 --- a/dashboards-observability/public/services/timestamp/timestamp.ts +++ b/dashboards-observability/public/services/timestamp/timestamp.ts @@ -6,10 +6,11 @@ import { isEmpty, isEqual, values, keys } from 'lodash'; import DSLService from '../requests/dsl'; import { IDefaultTimestampState } from '../../../common/types/explorer'; +import PPLService from '../requests/ppl'; // eslint-disable-next-line import/no-default-export export default class TimestampUtils { - constructor(private dslService: DSLService) {} + constructor(private dslService: DSLService, private pplService: PPLService) {} isTimeField(type: string) { return ['date', 'date_nanos'].some((dateTimeType) => isEqual(type, dateTimeType)); @@ -60,6 +61,55 @@ export default class TimestampUtils { } async getIndexMappings(index: string) { + const myArray = [...index.matchAll(/[^.`]+|`[^`]*`/g)]; + if (myArray.length > 1) { + const catalog: string = myArray[0][0].replace(/`/g, ''); + if (await this.isPrometheusCatalog(catalog)) { + const mappings = await this.pplService.fetch({ + query: 'describe ' + index + ' | fields COLUMN_NAME, DATA_TYPE', + format: 'jdbc', + }); + return this.convertToMappings(index, mappings); + } + } return await this.dslService.fetchFields(index); } + + async isPrometheusCatalog(catalog: string) { + const catalogs = await this.pplService.fetch({ + query: "show datasources | where CONNECTOR_TYPE='PROMETHEUS' | fields DATASOURCE_NAME", + format: 'viz', + }); + if ( + catalogs.data && + catalogs.data.DATASOURCE_NAME && + catalogs.data.DATASOURCE_NAME.includes(catalog) + ) { + return true; + } else { + return false; + } + } + + private convertToMappings(index: string, { datarows }: object) { + const result = {}; + result[index] = { + mappings: { + properties: {}, + }, + }; + if (datarows) { + for (const s of datarows) { + const key = s[0]; + let datatype = s[1]; + if (datatype === 'timestamp') { + datatype = 'date'; + } + result[index].mappings.properties[key] = { + type: datatype, + }; + } + } + return result; + } } diff --git a/dashboards-observability/server/adaptors/custom_panels/custom_panel_adaptor.ts b/dashboards-observability/server/adaptors/custom_panels/custom_panel_adaptor.ts index a11bff645..2b2ba55dd 100644 --- a/dashboards-observability/server/adaptors/custom_panels/custom_panel_adaptor.ts +++ b/dashboards-observability/server/adaptors/custom_panels/custom_panel_adaptor.ts @@ -220,6 +220,12 @@ export class CustomPanelsAdaptor { user_configs: visualization.savedVisualization.hasOwnProperty('user_configs') ? JSON.parse(visualization.savedVisualization.user_configs) : {}, + sub_type: visualization.savedVisualization.hasOwnProperty('sub_type') + ? visualization.savedVisualization.sub_type + : '', + units_of_measure: visualization.savedVisualization.hasOwnProperty('units_of_measure') + ? visualization.savedVisualization.units_of_measure + : '', ...(visualization.savedVisualization.application_id ? { application_id: visualization.savedVisualization.application_id } : {}), @@ -366,6 +372,39 @@ export class CustomPanelsAdaptor { } }; + // Add Multiple visualizations in a Panel + addMultipleVisualizations = async ( + client: ILegacyScopedClusterClient, + panelId: string, + savedVisualizationIds: string[] + ) => { + try { + let allPanelVisualizations = await this.getVisualizations(client, panelId); + + let newDimensions; + let visualizationsList = [...allPanelVisualizations]; + + savedVisualizationIds.map((savedVisualizationId) => { + newDimensions = this.getNewVizDimensions(visualizationsList); + visualizationsList = [ + ...visualizationsList, + { + id: 'panel_viz_' + uuidv4(), + savedVisualizationId, + ...newDimensions, + }, + ]; + }); + + const updatePanelResponse = await this.updatePanel(client, panelId, { + visualizations: visualizationsList, + }); + return visualizationsList; + } catch (error) { + throw new Error('Add/Replace Visualization Error:' + error); + } + }; + // Edits all Visualizations in the Panel editVisualization = async ( client: ILegacyScopedClusterClient, diff --git a/dashboards-observability/server/common/metrics/constants.ts b/dashboards-observability/server/common/metrics/constants.ts new file mode 100644 index 000000000..d67a38570 --- /dev/null +++ b/dashboards-observability/server/common/metrics/constants.ts @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +import { ComponentType, CounterType } from './types'; + +export const WINDOW = 3600; +export const INTERVAL = 60; +export const CAPACITY = (WINDOW / INTERVAL) * 2; +export const MILLIS_MULTIPLIER = 1000; + +export const COMPONENTS = [ + 'application_analytics', + 'operational_panels', + 'event_analytics', + 'notebooks', + 'trace_analytics', + 'metrics_analytics', +] as const; +export const REQUESTS = ['create', 'get', 'update', 'delete'] as const; + +export const GLOBAL_BASIC_COUNTER: CounterType = (() => { + const counter = {} as CounterType; + COMPONENTS.forEach((component) => { + counter[component] = {} as CounterType[ComponentType]; + REQUESTS.forEach((request) => { + counter[component][request] = { + total: 0, + }; + }); + }); + return counter; +})(); + +export const DEFAULT_ROLLING_COUNTER: CounterType = (() => { + const counter = {} as CounterType; + COMPONENTS.forEach((component) => { + counter[component] = {} as CounterType[ComponentType]; + REQUESTS.forEach((request) => { + counter[component][request] = { + count: 0, + system_error: 0, + user_error: 0, + }; + }); + }); + return counter; +})(); diff --git a/dashboards-observability/server/common/metrics/metrics_helper.ts b/dashboards-observability/server/common/metrics/metrics_helper.ts new file mode 100644 index 000000000..659f8c383 --- /dev/null +++ b/dashboards-observability/server/common/metrics/metrics_helper.ts @@ -0,0 +1,140 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +import _ from 'lodash'; +import { + CAPACITY, + COMPONENTS, + DEFAULT_ROLLING_COUNTER, + GLOBAL_BASIC_COUNTER, + INTERVAL, + MILLIS_MULTIPLIER, + WINDOW, +} from './constants'; +import { ComponentType, CounterNameType, CounterType, RequestType } from './types'; + +const time2CountWin: Map = new Map(); + +export function addClickToMetric(element: string, counter: CounterNameType = 'count') { + // remove outdated key-value pairs + trim(); + + const timeKey = getKey(Date.now()); + const rollingCounter = time2CountWin.get(timeKey) || _.cloneDeep(DEFAULT_ROLLING_COUNTER); + const key = `click.${element}.${counter}`; + + _.set(rollingCounter, key, (_.get(rollingCounter, key, 0) as number) + 1); + if (counter === 'count') { + const basicCounterKey = `click.${element}.total`; + _.set( + GLOBAL_BASIC_COUNTER, + basicCounterKey, + (_.get(GLOBAL_BASIC_COUNTER, basicCounterKey, 0) as number) + 1 + ); + } + + time2CountWin.set(timeKey, rollingCounter); +} + +export function addRequestToMetric( + component: ComponentType, + request: RequestType, + error: { statusCode: number } +): void; +export function addRequestToMetric( + component: ComponentType, + request: RequestType, + counter: CounterNameType +): void; +export function addRequestToMetric( + component: ComponentType, + request: RequestType, + counterNameOrError: CounterNameType | { statusCode: number } +) { + const counter = + typeof counterNameOrError === 'object' + ? checkErrorType(counterNameOrError) + : counterNameOrError; + + // remove outdated key-value pairs + trim(); + + const timeKey = getKey(Date.now()); + const rollingCounter = time2CountWin.get(timeKey) || _.cloneDeep(DEFAULT_ROLLING_COUNTER); + + rollingCounter[component][request][counter]!++; + if (counter === 'count') { + GLOBAL_BASIC_COUNTER[component][request]['total']!++; + } + + time2CountWin.set(timeKey, rollingCounter); +} + +export const getMetrics = () => { + const preTimeKey = getPreKey(Date.now()); + const rollingCounters = time2CountWin.get(preTimeKey); + return buildMetrics(rollingCounters); +}; + +const checkErrorType = (error: { statusCode: number }) => { + if (error.statusCode && Math.floor(error.statusCode / 100) === 4) { + return 'user_error'; + } else { + return 'system_error'; + } +}; + +const trim = () => { + if (time2CountWin.size > CAPACITY) { + const currentKey = getKey(Date.now() - WINDOW * MILLIS_MULTIPLIER); + time2CountWin.forEach((_value, key, map) => { + if (key < currentKey) { + map.delete(key); + } + }); + } +}; + +const getKey = (milliseconds: number) => { + return Math.floor(milliseconds / MILLIS_MULTIPLIER / INTERVAL); +}; + +const getPreKey = (milliseconds: number) => { + return getKey(milliseconds) - 1; +}; + +const isComponent = (arg: string): arg is ComponentType => { + return COMPONENTS.includes(arg as ComponentType); +}; + +const buildMetrics = (rollingCounters?: CounterType) => { + if (!rollingCounters) { + rollingCounters = DEFAULT_ROLLING_COUNTER; + } + const basicMetrics = _.merge(rollingCounters, GLOBAL_BASIC_COUNTER); + const overallActionMetrics = { + request_total: 0, + request_count: 0, + success_count: 0, + failed_request_count_system_error: 0, + failed_request_count_user_error: 0, + }; + Object.keys(basicMetrics).forEach((key) => { + if (isComponent(key)) { + for (const counter of Object.values(basicMetrics[key])) { + overallActionMetrics.request_count += counter?.count || 0; + overallActionMetrics.request_total += counter?.total || 0; + overallActionMetrics.failed_request_count_system_error += counter?.system_error || 0; + overallActionMetrics.failed_request_count_user_error += counter?.user_error || 0; + } + } + }); + overallActionMetrics.success_count = + overallActionMetrics.request_count - + (overallActionMetrics.failed_request_count_system_error + + overallActionMetrics.failed_request_count_user_error); + + return { ...basicMetrics, ...overallActionMetrics }; +}; diff --git a/dashboards-observability/server/common/metrics/types.ts b/dashboards-observability/server/common/metrics/types.ts new file mode 100644 index 000000000..e0bd1c7cb --- /dev/null +++ b/dashboards-observability/server/common/metrics/types.ts @@ -0,0 +1,28 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +import { COMPONENTS, REQUESTS } from './constants'; + +export type ComponentType = typeof COMPONENTS[number]; +export type RequestType = typeof REQUESTS[number]; +export type CounterNameType = 'count' | 'system_error' | 'user_error' | 'total'; + +// counter to track user click actions +type ClickCounterType = { + [element: string]: { + [counter in CounterNameType]?: number; + }; +}; + +// counter to track requests to OpenSearch +type RequestCounterType = { + [component in ComponentType]: { + [request in RequestType]: { + [counter in CounterNameType]?: number; + }; + }; +}; + +export type CounterType = ClickCounterType & RequestCounterType; diff --git a/dashboards-observability/server/routes/custom_panels/visualizations_router.ts b/dashboards-observability/server/routes/custom_panels/visualizations_router.ts index 3848b55c3..c92aec633 100644 --- a/dashboards-observability/server/routes/custom_panels/visualizations_router.ts +++ b/dashboards-observability/server/routes/custom_panels/visualizations_router.ts @@ -128,6 +128,48 @@ export function VisualizationsRouter(router: IRouter) { } ); + // Add multiple visualizations to the panel + router.post( + { + path: `${API_PREFIX}/visualizations/multiple`, + validate: { + body: schema.object({ + panelId: schema.string(), + savedVisualizationIds: schema.arrayOf(schema.string()), + }), + }, + }, + async ( + context, + request, + response + ): Promise> => { + const opensearchNotebooksClient: ILegacyScopedClusterClient = context.observability_plugin.observabilityClient.asScoped( + request + ); + + try { + const allVisualizations = await customPanelBackend.addMultipleVisualizations( + opensearchNotebooksClient, + request.body.panelId, + request.body.savedVisualizationIds + ); + return response.ok({ + body: { + message: 'Visualizations Added', + visualizations: allVisualizations, + }, + }); + } catch (error) { + console.error('Issue in adding visualization:', error); + return response.custom({ + statusCode: error.statusCode || 500, + body: error.message, + }); + } + } + ); + // Replace an existing visualization router.post( { diff --git a/dashboards-observability/server/routes/event_analytics/event_analytics_router.ts b/dashboards-observability/server/routes/event_analytics/event_analytics_router.ts index 4040e7e66..c2fd7c2d2 100644 --- a/dashboards-observability/server/routes/event_analytics/event_analytics_router.ts +++ b/dashboards-observability/server/routes/event_analytics/event_analytics_router.ts @@ -139,6 +139,11 @@ export const registerEventAnalyticsRouter = ({ description: schema.string(), application_id: schema.maybe(schema.string()), user_configs: schema.string(), + sub_type: schema.string(), + units_of_measure: schema.maybe(schema.string()), + selected_labels: schema.maybe(schema.object({ + label: schema.arrayOf(schema.object({}, { unknowns: 'allow' })), + })), }), }), }, @@ -226,6 +231,11 @@ export const registerEventAnalyticsRouter = ({ description: schema.string(), application_id: schema.maybe(schema.string()), user_configs: schema.string(), + sub_type: schema.string(), + units_of_measure: schema.maybe(schema.string()), + selected_labels: schema.maybe(schema.object({ + labels: schema.arrayOf(schema.object({}, { unknowns: 'allow' })), + })), }), }), }, diff --git a/dashboards-observability/server/routes/index.ts b/dashboards-observability/server/routes/index.ts index 80c07692b..31e5c0456 100644 --- a/dashboards-observability/server/routes/index.ts +++ b/dashboards-observability/server/routes/index.ts @@ -19,6 +19,7 @@ import QueryService from '../services/queryService'; import { registerSqlRoute } from './notebooks/sqlRouter'; import { registerEventAnalyticsRouter } from './event_analytics/event_analytics_router'; import { registerAppAnalyticsRouter } from './application_analytics/app_analytics_router'; +import { registerMetricsRoute } from './metrics/metrics_rounter'; export function setupRoutes({ router, client }: { router: IRouter; client: ILegacyClusterClient }) { @@ -38,4 +39,6 @@ export function setupRoutes({ router, client }: { router: IRouter; client: ILega registerVizRoute(router); const queryService = new QueryService(client); registerSqlRoute(router, queryService); + + registerMetricsRoute(router); }; diff --git a/dashboards-observability/server/routes/metrics/metrics_rounter.ts b/dashboards-observability/server/routes/metrics/metrics_rounter.ts new file mode 100644 index 000000000..26547aca7 --- /dev/null +++ b/dashboards-observability/server/routes/metrics/metrics_rounter.ts @@ -0,0 +1,65 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +import { ResponseError } from '@opensearch-project/opensearch/lib/errors'; +import { schema } from '@osd/config-schema'; +import { IOpenSearchDashboardsResponse, IRouter } from '../../../../../src/core/server'; +import { OBSERVABILITY_BASE } from '../../../common/constants/shared'; +import { addClickToMetric, getMetrics } from '../../common/metrics/metrics_helper'; + +export function registerMetricsRoute(router: IRouter) { + router.get( + { + path: `${OBSERVABILITY_BASE}/stats`, + validate: false, + }, + async ( + context, + request, + response + ): Promise> => { + try { + const metrics = getMetrics(); + return response.ok({ + body: metrics, + }); + } catch (error) { + console.error(error); + return response.custom({ + statusCode: error.statusCode || 500, + body: error.message, + }); + } + } + ); + + router.post( + { + path: `${OBSERVABILITY_BASE}/stats`, + validate: { + body: schema.object({ + element: schema.string() + }), + }, + }, + async ( + context, + request, + response + ): Promise> => { + try { + const { element } = request.body; + addClickToMetric(element); + return response.ok(); + } catch (error) { + console.error(error); + return response.custom({ + statusCode: error.statusCode || 500, + body: error.message, + }); + } + } + ); +} diff --git a/dashboards-observability/server/routes/trace_analytics_dsl_router.ts b/dashboards-observability/server/routes/trace_analytics_dsl_router.ts index aa7b26920..b64843622 100644 --- a/dashboards-observability/server/routes/trace_analytics_dsl_router.ts +++ b/dashboards-observability/server/routes/trace_analytics_dsl_router.ts @@ -3,10 +3,16 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { RequestParams } from '@elastic/elasticsearch'; +import { RequestParams } from '@opensearch-project/opensearch'; import { schema } from '@osd/config-schema'; import { IRouter } from '../../../../src/core/server'; -import { TRACE_ANALYTICS_DSL_ROUTE, TRACE_ANALYTICS_INDICES_ROUTE, DATA_PREPPER_INDEX_NAME, DATA_PREPPER_SERVICE_INDEX_NAME } from '../../common/constants/trace_analytics'; +import { + DATA_PREPPER_INDEX_NAME, + DATA_PREPPER_SERVICE_INDEX_NAME, + TRACE_ANALYTICS_DSL_ROUTE, + TRACE_ANALYTICS_INDICES_ROUTE, +} from '../../common/constants/trace_analytics'; +import { addRequestToMetric } from '../common/metrics/metrics_helper'; export function registerTraceAnalyticsDslRouter(router: IRouter) { router.post( @@ -70,6 +76,7 @@ export function registerTraceAnalyticsDslRouter(router: IRouter) { }, }, async (context, request, response) => { + addRequestToMetric('trace_analytics', 'get', 'count'); const { index, size, ...rest } = request.body; const params: RequestParams.Search = { index: index || DATA_PREPPER_INDEX_NAME, @@ -85,6 +92,7 @@ export function registerTraceAnalyticsDslRouter(router: IRouter) { body: resp, }); } catch (error) { + addRequestToMetric('trace_analytics', 'get', error); if (error.statusCode !== 404) console.error(error); return response.custom({ statusCode: error.statusCode || 500, diff --git a/dashboards-observability/test/metrics_contants.ts b/dashboards-observability/test/metrics_contants.ts new file mode 100644 index 000000000..7fd210468 --- /dev/null +++ b/dashboards-observability/test/metrics_contants.ts @@ -0,0 +1,325 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +export const sampleMetricsVisualizations = [ + { + h: 2, + id: 'Y4muP4QBiaYaSxpXk7r8', + metricType: 'savedCustomMetric', + savedVisualizationId: 'Y4muP4QBiaYaSxpXk7r8', + w: 12, + x: 0, + y: 0, + }, + { + h: 2, + id: 'tomAP4QBiaYaSxpXALls', + metricType: 'savedCustomMetric', + savedVisualizationId: 'tomAP4QBiaYaSxpXALls', + w: 12, + x: 0, + y: 2, + }, + { + h: 2, + id: 'prometheus.process_resident_memory_bytes', + metricType: 'prometheusMetric', + savedVisualizationId: 'prometheus.process_resident_memory_bytes', + w: 12, + x: 0, + y: 4, + }, +]; + +export const sampleMetric = { + name: 'new metric', + description: '', + query: 'source = opensearch_dashboards_sample_data_logs | stats count() by span(timestamp,1h)', + type: 'line', + selected_date_range: { + start: 'now-1d', + end: 'now', + text: '', + }, + selected_timestamp: { + name: 'timestamp', + type: 'timestamp', + }, + selected_fields: { + text: '', + tokens: [], + }, + user_configs: '{}', + sub_type: 'metric', +}; + +export const sampleSortedMetricsLayout = [ + { + h: 2, + id: 'Y4muP4QBiaYaSxpXk7r8', + metricType: 'savedCustomMetric', + savedVisualizationId: 'Y4muP4QBiaYaSxpXk7r8', + w: 12, + x: 0, + y: 0, + }, + { + h: 2, + id: 'prometheus.process_resident_memory_bytes', + metricType: 'prometheusMetric', + savedVisualizationId: 'prometheus.process_resident_memory_bytes', + w: 12, + x: 0, + y: 2, + }, +]; + +export const samplePanelOptions = [ + { + dateCreated: 1667512665139, + dateModified: 1667513726084, + id: 'xImAP4QBiaYaSxpXBLkz', + name: '[Logs] Web traffic Panel', + }, + { + dateCreated: 1667512677437, + dateModified: 1667525552909, + id: 'zYmAP4QBiaYaSxpXNLk9', + name: 'panel1', + }, +]; + +export const sampleVisualizationById = { + id: 'Y4muP4QBiaYaSxpXk7r8', + name: 'new metric', + query: 'source = opensearch_dashboards_sample_data_logs | stats count() by span(timestamp,1h)', + type: 'line', + timeField: 'timestamp', + selected_date_range: {}, + selected_fields: {}, + user_configs: {}, + sub_type: 'metric', +}; + +export const sampleAllAvailableMetrics = [ + { + id: 'HIlAQYQBiaYaSxpXJ73K', + name: '[Prometheus Metric] prometheus.process_resident_memory_bytes', + catalog: 'CUSTOM_METRICS', + type: 'line', + recentlyCreated: true, + }, + { + id: 'Y4muP4QBiaYaSxpXk7r8', + name: 'new metric', + catalog: 'CUSTOM_METRICS', + type: 'line', + recentlyCreated: false, + }, + { + id: 'HolAQYQBiaYaSxpXKL0T', + name: '[Prometheus Metric] prometheus.go_memstats_heap_sys_bytes', + catalog: 'CUSTOM_METRICS', + type: 'line', + recentlyCreated: true, + }, + { + id: 'tomAP4QBiaYaSxpXALls', + name: '[Logs] Average ram usage per day by windows os ', + catalog: 'CUSTOM_METRICS', + type: 'line', + recentlyCreated: false, + }, + { + id: 'prometheus.process_resident_memory_bytes', + name: 'prometheus.process_resident_memory_bytes', + catalog: 'prometheus', + type: 'gauge', + recentlyCreated: false, + }, +]; + +export const samplePanelVisualizations1 = [ + { + id: 'Y4muP4QBiaYaSxpXk7r8', + savedVisualizationId: 'Y4muP4QBiaYaSxpXk7r8', + x: 0, + y: 0, + h: 2, + w: 12, + metricType: 'savedCustomMetric', + }, +]; + +export const samplenewDimensions1 = { + x: 0, + y: 2, + w: 12, + h: 2, +}; + +export const samplePanelVisualizations2 = [ + { + id: 'Y4muP4QBiaYaSxpXk7r8', + savedVisualizationId: 'Y4muP4QBiaYaSxpXk7r8', + x: 0, + y: 0, + h: 2, + w: 12, + metricType: 'savedCustomMetric', + }, + { + id: 'tomAP4QBiaYaSxpXALls', + savedVisualizationId: 'tomAP4QBiaYaSxpXALls', + x: 0, + y: 2, + h: 2, + w: 12, + metricType: 'savedCustomMetric', + }, +]; + +export const samplenewDimensions2 = { + x: 0, + y: 4, + w: 12, + h: 2, +}; + +export const samplePrometheusVisualizationId = 'prometheus.process_resident_memory_bytes'; + +export const samplePrometheusVisualizationComponent = { + name: '[Prometheus Metric] prometheus.process_resident_memory_bytes', + description: '', + query: + 'source = prometheus.process_resident_memory_bytes | stats avg(@value) by span(@timestamp,1h)', + type: 'line', + timeField: '@timestamp', + selected_fields: { + text: '', + tokens: [], + }, + sub_type: 'metric', + user_configs: {}, +}; + +export const sampleVisualizationsList = [ + { + id: 'panel_viz_ed409e13-4759-4e0f-9bc1-6ae32999318e', + savedVisualizationId: 'savedCustomMetric', + x: 0, + y: 0, + w: 6, + h: 4, + }, + { + id: 'panel_viz_f59ad102-943e-48d9-9c0a-3df7055070a3', + savedVisualizationId: 'prometheusMetric', + x: 0, + y: 4, + w: 6, + h: 4, + }, +]; + +export const sampleLayout = [ + { i: 'panel_viz_ed409e13-4759-4e0f-9bc1-6ae32999318e', x: 0, y: 0, w: 3, h: 2 }, + { i: 'panel_viz_f59ad102-943e-48d9-9c0a-3df7055070a3', x: 3, y: 0, w: 6, h: 4 }, +]; + +export const sampleMergedVisualizations = [ + { + id: 'panel_viz_ed409e13-4759-4e0f-9bc1-6ae32999318e', + savedVisualizationId: 'savedCustomMetric', + x: 0, + y: 0, + w: 3, + h: 2, + }, + { + id: 'panel_viz_f59ad102-943e-48d9-9c0a-3df7055070a3', + savedVisualizationId: 'prometheusMetric', + x: 3, + y: 0, + w: 6, + h: 4, + }, +]; + +export const samplePrometheusSampleUpdateWithSelections = { + dateRange: ['now-1d', 'now'], + description: '', + fields: [], + name: '[Prometheus Metric] prometheus.process_resident_memory_bytes', + query: + 'source = prometheus.process_resident_memory_bytes | stats avg(@value) by span(@timestamp,1h)', + subType: 'metric', + timestamp: '@timestamp', + type: 'line', + userConfigs: '{}', +}; + +export const sampleSavedMetric = { + id: 'tomAP4QBiaYaSxpXALls', + name: '[Logs] Average ram usage per day by windows os ', + query: + "source = opensearch_dashboards_sample_data_logs | where match(machine.os,'win') | stats avg(machine.ram) by span(timestamp,1h)", + type: 'line', + timeField: 'timestamp', + selected_date_range: { + start: 'now-1d', + end: 'now', + text: '', + }, + selected_fields: { + text: '', + tokens: [], + }, + user_configs: { + dataConfig: { + series: [ + { + label: 'machine.ram', + name: 'machine.ram', + aggregation: 'avg', + customLabel: '', + }, + ], + dimensions: [], + span: { + time_field: [ + { + name: 'timestamp', + type: 'timestamp', + label: 'timestamp', + }, + ], + unit: [ + { + text: 'Day', + value: 'd', + label: 'Day', + }, + ], + interval: '1', + }, + }, + }, + sub_type: 'metric', +}; + +export const sampleSavedMetricUpdate = { + dateRange: ['now-30m', 'now'], + description: undefined, + fields: [], + name: '[Logs] Average ram usage per day by windows os ', + query: + "source = opensearch_dashboards_sample_data_logs | where match(machine.os,'win') | stats avg(machine.ram) by span(timestamp,1m)", + subType: 'metric', + timestamp: 'timestamp', + type: 'line', + userConfigs: + '{"dataConfig":{"series":[{"label":"machine.ram","name":"machine.ram","aggregation":"avg","customLabel":""}],"dimensions":[],"span":{"time_field":[{"name":"timestamp","type":"timestamp","label":"timestamp"}],"unit":[{"text":"Day","value":"d","label":"Day"}],"interval":"1"}}}', +}; diff --git a/dashboards-observability/yarn.lock b/dashboards-observability/yarn.lock index c4f5768fa..ca8c27b93 100644 --- a/dashboards-observability/yarn.lock +++ b/dashboards-observability/yarn.lock @@ -1918,10 +1918,10 @@ mimic-fn@^2.1.0: resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== -minimatch@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" - integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== +minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1: + version "3.1.2" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" + integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== dependencies: brace-expansion "^1.1.7" @@ -2239,10 +2239,10 @@ pure-color@^1.3.0: resolved "https://registry.yarnpkg.com/pure-color/-/pure-color-1.3.0.tgz#1fe064fb0ac851f0de61320a8bf796836422f33e" integrity sha1-H+Bk+wrIUfDeYTIKi/eWg2Qi8z4= -qs@~6.5.2: - version "6.5.2" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" - integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== +qs@~6.5.2, qs@~6.5.3: + version "6.5.3" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.3.tgz#3aeeffc91967ef6e35c0e488ef46fb296ab76aad" + integrity sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA== querystring@0.2.0: version "0.2.0" diff --git a/opensearch-observability/build.gradle b/opensearch-observability/build.gradle index 86ce781cf..346f8eaef 100644 --- a/opensearch-observability/build.gradle +++ b/opensearch-observability/build.gradle @@ -23,6 +23,7 @@ buildscript { common_utils_version = System.getProperty("common_utils.version", opensearch_build) kotlin_version = System.getProperty("kotlin.version", "1.6.0") job_scheduler_version = System.getProperty("job_scheduler.version", opensearch_build) + jackson_version = "2.14.1" } repositories { @@ -36,7 +37,7 @@ buildscript { classpath "org.opensearch.gradle:build-tools:${opensearch_version}" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlin_version}" classpath "org.jetbrains.kotlin:kotlin-allopen:${kotlin_version}" - classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.12.0" + classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.21.0" classpath "org.jacoco:org.jacoco.agent:0.8.5" } } @@ -115,7 +116,7 @@ configurations.all { resolutionStrategy { force "org.jetbrains.kotlin:kotlin-stdlib:${kotlin_version}" force "org.jetbrains.kotlin:kotlin-stdlib-common:${kotlin_version}" - force "com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:2.13.4" + force "com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:${jackson_version}" force "org.mockito:mockito-core:4.6.1" } } @@ -157,6 +158,13 @@ dependencies { implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9" implementation "${group}:common-utils:${common_utils_version}" implementation group: 'com.google.guava', name: 'guava', version: '31.0.1-jre' + implementation 'org.json:json:20220924' + implementation group: 'com.github.wnameless.json', name: 'json-flattener', version: '0.15.1' + // json-base, jackson-databind, jackson-annotations are only used by json-flattener. + // see https://github.com/opensearch-project/OpenSearch/issues/5395. + implementation group: 'com.github.wnameless.json', name: 'json-base', version: '2.2.1' + implementation "com.fasterxml.jackson.core:jackson-databind:${jackson_version}" + implementation "com.fasterxml.jackson.core:jackson-annotations:${jackson_version}" compileOnly "${group}:opensearch-job-scheduler-spi:${job_scheduler_version}" testImplementation( 'org.assertj:assertj-core:3.16.1', @@ -167,6 +175,7 @@ dependencies { testImplementation "org.jetbrains.kotlin:kotlin-test:${kotlin_version}" testImplementation "com.nhaarman.mockitokotlin2:mockito-kotlin:2.2.0" testImplementation "org.mockito:mockito-core:4.3.1" + testImplementation "org.mockito:mockito-junit-jupiter:4.3.1" testImplementation "com.google.code.gson:gson:2.8.9" ktlint "com.pinterest:ktlint:0.45.0" diff --git a/opensearch-observability/detekt.yml b/opensearch-observability/detekt.yml index b758f5d1f..2a22a8314 100644 --- a/opensearch-observability/detekt.yml +++ b/opensearch-observability/detekt.yml @@ -15,3 +15,8 @@ style: ReturnCount: active: true max: 10 +complexity: + LongMethod: + threshold: 120 + NestedBlockDepth: + threshold: 5 diff --git a/opensearch-observability/src/main/kotlin/org/opensearch/observability/ObservabilityPlugin.kt b/opensearch-observability/src/main/kotlin/org/opensearch/observability/ObservabilityPlugin.kt index cc46da157..1fcae8a03 100644 --- a/opensearch-observability/src/main/kotlin/org/opensearch/observability/ObservabilityPlugin.kt +++ b/opensearch-observability/src/main/kotlin/org/opensearch/observability/ObservabilityPlugin.kt @@ -28,6 +28,7 @@ import org.opensearch.observability.action.GetObservabilityObjectAction import org.opensearch.observability.action.UpdateObservabilityObjectAction import org.opensearch.observability.index.ObservabilityIndex import org.opensearch.observability.resthandler.ObservabilityRestHandler +import org.opensearch.observability.resthandler.ObservabilityStatsRestHandler import org.opensearch.observability.resthandler.SchedulerRestHandler import org.opensearch.observability.scheduler.ObservabilityJobParser import org.opensearch.observability.scheduler.ObservabilityJobRunner @@ -97,6 +98,7 @@ class ObservabilityPlugin : Plugin(), ActionPlugin, JobSchedulerExtension { ): List { return listOf( ObservabilityRestHandler(), + ObservabilityStatsRestHandler(), SchedulerRestHandler() // TODO: tmp rest handler only for POC purpose ) } diff --git a/opensearch-observability/src/main/kotlin/org/opensearch/observability/action/ObservabilityActions.kt b/opensearch-observability/src/main/kotlin/org/opensearch/observability/action/ObservabilityActions.kt index e669c1eef..12a0a81c2 100644 --- a/opensearch-observability/src/main/kotlin/org/opensearch/observability/action/ObservabilityActions.kt +++ b/opensearch-observability/src/main/kotlin/org/opensearch/observability/action/ObservabilityActions.kt @@ -9,6 +9,7 @@ import org.opensearch.OpenSearchStatusException import org.opensearch.commons.authuser.User import org.opensearch.observability.ObservabilityPlugin.Companion.LOG_PREFIX import org.opensearch.observability.index.ObservabilityIndex +import org.opensearch.observability.metrics.Metrics import org.opensearch.observability.model.ObservabilityObjectDoc import org.opensearch.observability.model.ObservabilityObjectSearchResult import org.opensearch.observability.security.UserAccessManager @@ -64,6 +65,7 @@ internal object ObservabilityActions { ) val currentDoc = observabilityObject.observabilityObjectDoc if (!UserAccessManager.doesUserHasAccess(user, currentDoc.tenant, currentDoc.access)) { + Metrics.OBSERVABILITY_PERMISSION_USER_ERROR.counter.increment() throw OpenSearchStatusException( "Permission denied for ObservabilityObject ${request.objectId}", RestStatus.FORBIDDEN @@ -118,6 +120,7 @@ internal object ObservabilityActions { } val currentDoc = observabilityObjectDocInfo.observabilityObjectDoc if (!UserAccessManager.doesUserHasAccess(user, currentDoc.tenant, currentDoc.access)) { + Metrics.OBSERVABILITY_PERMISSION_USER_ERROR.counter.increment() throw OpenSearchStatusException("Permission denied for ObservabilityObject $objectId", RestStatus.FORBIDDEN) } val docInfo = ObservabilityObjectDoc( @@ -155,6 +158,7 @@ internal object ObservabilityActions { objectDocs.forEach { val currentDoc = it.observabilityObjectDoc if (!UserAccessManager.doesUserHasAccess(user, currentDoc.tenant, currentDoc.access)) { + Metrics.OBSERVABILITY_PERMISSION_USER_ERROR.counter.increment() throw OpenSearchStatusException( "Permission denied for ObservabilityObject ${it.id}", RestStatus.FORBIDDEN @@ -230,6 +234,7 @@ internal object ObservabilityActions { val currentDoc = observabilityObjectDocInfo.observabilityObjectDoc if (!UserAccessManager.doesUserHasAccess(user, currentDoc.tenant, currentDoc.access)) { + Metrics.OBSERVABILITY_PERMISSION_USER_ERROR.counter.increment() throw OpenSearchStatusException( "Permission denied for ObservabilityObject $objectId", RestStatus.FORBIDDEN @@ -265,6 +270,7 @@ internal object ObservabilityActions { configDocs.forEach { val currentDoc = it.observabilityObjectDoc if (!UserAccessManager.doesUserHasAccess(user, currentDoc.tenant, currentDoc.access)) { + Metrics.OBSERVABILITY_PERMISSION_USER_ERROR.counter.increment() throw OpenSearchStatusException( "Permission denied for ObservabilityObject ${it.id}", RestStatus.FORBIDDEN diff --git a/opensearch-observability/src/main/kotlin/org/opensearch/observability/action/PluginBaseAction.kt b/opensearch-observability/src/main/kotlin/org/opensearch/observability/action/PluginBaseAction.kt index 84c444047..52ce8f16e 100644 --- a/opensearch-observability/src/main/kotlin/org/opensearch/observability/action/PluginBaseAction.kt +++ b/opensearch-observability/src/main/kotlin/org/opensearch/observability/action/PluginBaseAction.kt @@ -23,6 +23,7 @@ import org.opensearch.index.IndexNotFoundException import org.opensearch.index.engine.VersionConflictEngineException import org.opensearch.indices.InvalidIndexNameException import org.opensearch.observability.ObservabilityPlugin.Companion.LOG_PREFIX +import org.opensearch.observability.metrics.Metrics import org.opensearch.observability.util.logger import org.opensearch.rest.RestStatus import org.opensearch.tasks.Task @@ -56,9 +57,11 @@ abstract class PluginBaseAction { + private val count = LongAdder() + + /** + * {@inheritDoc} + */ + override fun increment() { + count.increment() + } + + /** + * {@inheritDoc} + */ + override fun add(n: Long) { + count.add(n) + } + + /** + * {@inheritDoc} + */ + override val value: Long + get() = count.toLong() + + /** Reset the count value to zero */ + override fun reset() { + count.reset() + } +} diff --git a/opensearch-observability/src/main/kotlin/org/opensearch/observability/metrics/Counter.kt b/opensearch-observability/src/main/kotlin/org/opensearch/observability/metrics/Counter.kt new file mode 100644 index 000000000..17ec0690b --- /dev/null +++ b/opensearch-observability/src/main/kotlin/org/opensearch/observability/metrics/Counter.kt @@ -0,0 +1,23 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +package org.opensearch.observability.metrics + +/** + * Defines a generic counter. + */ +interface Counter { + /** Increments the count value by 1 unit */ + fun increment() + + /** Increments the count value by n unit */ + fun add(n: Long) + + /** Retrieves the count value accumulated upto this call */ + val value: T + + /** Resets the count value to initial value when Counter is created */ + fun reset() +} diff --git a/opensearch-observability/src/main/kotlin/org/opensearch/observability/metrics/Metrics.kt b/opensearch-observability/src/main/kotlin/org/opensearch/observability/metrics/Metrics.kt new file mode 100644 index 000000000..07b310e2e --- /dev/null +++ b/opensearch-observability/src/main/kotlin/org/opensearch/observability/metrics/Metrics.kt @@ -0,0 +1,79 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +package org.opensearch.observability.metrics + +import com.github.wnameless.json.unflattener.JsonUnflattener +import org.json.JSONObject + +/** + * Enum to hold all the metrics that need to be logged into _plugins/_observability/_local/stats API + */ +enum class Metrics(val metricName: String, val counter: Counter<*>) { + REQUEST_TOTAL("request_total", BasicCounter()), + REQUEST_INTERVAL_COUNT("request_count", RollingCounter()), + REQUEST_SUCCESS("success_count", RollingCounter()), + REQUEST_USER_ERROR("failed_request_count_user_error", RollingCounter()), + REQUEST_SYSTEM_ERROR("failed_request_count_system_error", RollingCounter()), + + /** + * Exceptions from: + * @see org.opensearch.observability.action.PluginBaseAction + */ + OBSERVABILITY_EXCEPTIONS_OPENSEARCH_STATUS_EXCEPTION("exception.opensearch_status", RollingCounter()), + OBSERVABILITY_EXCEPTIONS_OPENSEARCH_SECURITY_EXCEPTION("exception.opensearch_security", RollingCounter()), + OBSERVABILITY_EXCEPTIONS_VERSION_CONFLICT_ENGINE_EXCEPTION("exception.version_conflict_engine", RollingCounter()), + OBSERVABILITY_EXCEPTIONS_INDEX_NOT_FOUND_EXCEPTION("exception.index_not_found", RollingCounter()), + OBSERVABILITY_EXCEPTIONS_INVALID_INDEX_NAME_EXCEPTION( + "exception.invalid_index_name", RollingCounter() + ), + OBSERVABILITY_EXCEPTIONS_ILLEGAL_ARGUMENT_EXCEPTION( + "exception.illegal_argument", RollingCounter() + ), + OBSERVABILITY_EXCEPTIONS_ILLEGAL_STATE_EXCEPTION( + "exception.illegal_state", RollingCounter() + ), + OBSERVABILITY_EXCEPTIONS_IO_EXCEPTION( + "exception.io", RollingCounter() + ), + OBSERVABILITY_EXCEPTIONS_INTERNAL_SERVER_ERROR( + "exception.internal_server_error", RollingCounter() + ), + + OBSERVABILITY_SECURITY_PERMISSION_ERROR("security_permission_error", RollingCounter()), + OBSERVABILITY_PERMISSION_USER_ERROR("permission_user_error", RollingCounter()); + + companion object { + private val values: Array = Metrics.values() + + /** + * Converts the enum metric values to JSON string + */ + private fun collectToJSON(): String { + val metricsJSONObject = JSONObject() + for (metric in values) { + metricsJSONObject.put(metric.metricName, metric.counter.value) + } + return metricsJSONObject.toString() + } + + /** + * Unflattens the JSON to nested JSON for easy readability and parsing + * The metric name is unflattened in the output JSON on the period '.' delimiter + * + * For ex: { "a.b.c_d" : 2 } becomes + * { + * "a" : { + * "b" : { + * "c_d" : 2 + * } + * } + * } + */ + fun collectToFlattenedJSON(): String { + return JsonUnflattener.unflatten(collectToJSON()) + } + } +} diff --git a/opensearch-observability/src/main/kotlin/org/opensearch/observability/metrics/RollingCounter.kt b/opensearch-observability/src/main/kotlin/org/opensearch/observability/metrics/RollingCounter.kt new file mode 100644 index 000000000..5132dff71 --- /dev/null +++ b/opensearch-observability/src/main/kotlin/org/opensearch/observability/metrics/RollingCounter.kt @@ -0,0 +1,84 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +package org.opensearch.observability.metrics + +import java.time.Clock +import java.util.concurrent.ConcurrentSkipListMap + +/** + * Rolling counter. The count is refreshed every interval. In every interval the count is cumulative. + */ +internal class RollingCounter( + private val window: Long = METRICS_ROLLING_WINDOW_VALUE, + private val interval: Long = METRICS_ROLLING_INTERVAL_VALUE, + private val clock: Clock = Clock.systemDefaultZone() +) : Counter { + private val capacity: Long = window / interval * 2 + private val timeToCountMap = ConcurrentSkipListMap() + + /** + * {@inheritDoc} + */ + override fun increment() { + add(1L) + } + + /** + * {@inheritDoc} + */ + override fun add(n: Long) { + trim() + timeToCountMap.compute( + getKey(clock.millis()) + ) { k: Long?, v: Long? -> if (v == null) n else v + n } + } + + /** + * {@inheritDoc} + */ + override val value get() = getValue(getPreKey(clock.millis())) + + /** + * {@inheritDoc} + */ + fun getValue(key: Long): Long { + return timeToCountMap[key] ?: return 0 + } + + private fun trim() { + if (timeToCountMap.size > capacity) { + timeToCountMap.headMap(getKey(clock.millis() - window * MILLIS_MULTIPLIER)).clear() + } + } + + private fun getKey(millis: Long): Long { + return millis / MILLIS_MULTIPLIER / interval + } + + private fun getPreKey(millis: Long): Long { + return getKey(millis) - 1 + } + + /** + * Number of existing intervals + */ + fun size(): Int { + return timeToCountMap.size + } + + /** + * Remove all the items from counter + */ + override fun reset() { + timeToCountMap.clear() + } + + companion object { + private const val METRICS_ROLLING_WINDOW_VALUE = 3600L + private const val METRICS_ROLLING_INTERVAL_VALUE = 60L + private const val MILLIS_MULTIPLIER = 1000 + } +} diff --git a/opensearch-observability/src/main/kotlin/org/opensearch/observability/model/SavedVisualization.kt b/opensearch-observability/src/main/kotlin/org/opensearch/observability/model/SavedVisualization.kt index 2c65d0471..608546c5c 100644 --- a/opensearch-observability/src/main/kotlin/org/opensearch/observability/model/SavedVisualization.kt +++ b/opensearch-observability/src/main/kotlin/org/opensearch/observability/model/SavedVisualization.kt @@ -43,7 +43,13 @@ import org.opensearch.observability.util.logger * "name": "Logs between dates", * "description": "some descriptions related to this query", * "application_id": "KE1Ie34BbsTr-CsB4G6Y", - * "user_configs": "{\"dataConfig\":\"{}\",\"layoutConfig\": \"{}\"}" + * "user_configs": "{\"dataConfig\":\"{}\",\"layoutConfig\": \"{}\"}", + * "sub_type": "metric", + * "units_of_measure: "hours (h)", + * "labels": [ + * {"label":"avg"}, + * {"label":"count"}, + * ] * } * } */ @@ -58,6 +64,9 @@ internal data class SavedVisualization( val selectedFields: SavedQuery.SelectedFields?, val applicationId: String? = null, val userConfigs: String? = null, + val subType: String?, + val unitsOfMeasure: String? = null, + val selectedLabels: SelectedLabels? = null, ) : BaseObjectData { internal companion object { @@ -71,6 +80,9 @@ internal data class SavedVisualization( private const val SELECTED_FIELDS_TAG = "selected_fields" private const val APPLICATION_ID_TAG = "application_id" private const val USER_CONFIGS_TAG = "user_configs" + private const val SUB_TYPE_TAG = "sub_type" + private const val UNITS_OF_MEASURE_TAG = "units_of_measure" + private const val SELECTED_LABELS_TAG = "selected_labels" /** * reader to create instance of class from writable. @@ -87,6 +99,7 @@ internal data class SavedVisualization( * @param parser data referenced at parser * @return created SavedVisualization object */ + @Suppress("ComplexMethod") fun parse(parser: XContentParser): SavedVisualization { var name: String? = null var description: String? = null @@ -97,6 +110,9 @@ internal data class SavedVisualization( var selectedFields: SavedQuery.SelectedFields? = null var applicationId: String? = null var userConfigs: String? = null + var subType: String? = null + var unitsOfMeasure: String? = null + var selectedLabels: SelectedLabels? = null XContentParserUtils.ensureExpectedToken(XContentParser.Token.START_OBJECT, parser.currentToken(), parser) while (XContentParser.Token.END_OBJECT != parser.nextToken()) { val fieldName = parser.currentName() @@ -111,6 +127,9 @@ internal data class SavedVisualization( SELECTED_FIELDS_TAG -> selectedFields = SavedQuery.SelectedFields.parse(parser) APPLICATION_ID_TAG -> applicationId = parser.text() USER_CONFIGS_TAG -> userConfigs = parser.text() + SUB_TYPE_TAG -> subType = parser.text() + UNITS_OF_MEASURE_TAG -> unitsOfMeasure = parser.text() + SELECTED_LABELS_TAG -> selectedLabels = SelectedLabels.parse(parser) else -> { parser.skipChildren() log.info("$LOG_PREFIX:SavedVisualization Skipping Unknown field $fieldName") @@ -126,7 +145,10 @@ internal data class SavedVisualization( selectedTimestamp, selectedFields, applicationId, - userConfigs + userConfigs, + subType, + unitsOfMeasure, + selectedLabels ) } } @@ -153,7 +175,10 @@ internal data class SavedVisualization( selectedTimestamp = input.readOptionalWriteable(SavedQuery.Token.reader), selectedFields = input.readOptionalWriteable(SavedQuery.SelectedFields.reader), applicationId = input.readOptionalString(), - userConfigs = input.readOptionalString() + userConfigs = input.readOptionalString(), + subType = input.readString(), + unitsOfMeasure = input.readOptionalString(), + selectedLabels = input.readOptionalWriteable(SelectedLabels.reader), ) /** @@ -169,6 +194,9 @@ internal data class SavedVisualization( output.writeOptionalWriteable(selectedFields) output.writeOptionalString(applicationId) output.writeOptionalString(userConfigs) + output.writeString(subType) + output.writeOptionalString(unitsOfMeasure) + output.writeOptionalWriteable(selectedLabels) } /** @@ -186,6 +214,163 @@ internal data class SavedVisualization( .fieldIfNotNull(SELECTED_FIELDS_TAG, selectedFields) .fieldIfNotNull(APPLICATION_ID_TAG, applicationId) .fieldIfNotNull(USER_CONFIGS_TAG, userConfigs) + .fieldIfNotNull(SUB_TYPE_TAG, subType) + .fieldIfNotNull(UNITS_OF_MEASURE_TAG, unitsOfMeasure) + .fieldIfNotNull(SELECTED_LABELS_TAG, selectedLabels) return builder.endObject() } + + internal data class Token( + val label: String, + ) : BaseModel { + internal companion object { + private const val LABEL_TAG = "label" + + /** + * reader to create instance of class from writable. + */ + val reader = Writeable.Reader { Token(it) } + + /** + * Parser to parse xContent + */ + val xParser = XParser { parse(it) } + + /** + * Parse the data from parser and create Trigger object + * @param parser data referenced at parser + * @return created Trigger object + */ + fun parse(parser: XContentParser): Token { + var label: String? = null + XContentParserUtils.ensureExpectedToken( + XContentParser.Token.START_OBJECT, + parser.currentToken(), + parser + ) + while (XContentParser.Token.END_OBJECT != parser.nextToken()) { + val fieldName = parser.currentName() + parser.nextToken() + when (fieldName) { + LABEL_TAG -> label = parser.text() + else -> log.info("$LOG_PREFIX: Trigger Skipping Unknown field $fieldName") + } + } + label ?: throw IllegalArgumentException("$LABEL_TAG field absent") + return Token(label) + } + } + + /** + * Constructor used in transport action communication. + * @param input StreamInput stream to deserialize data from. + */ + constructor(input: StreamInput) : this( + label = input.readString(), + ) + + /** + * {@inheritDoc} + */ + override fun writeTo(output: StreamOutput) { + output.writeString(label) + } + + /** + * {@inheritDoc} + */ + override fun toXContent(builder: XContentBuilder?, params: ToXContent.Params?): XContentBuilder { + builder!! + builder.startObject() + .field(LABEL_TAG, label) + builder.endObject() + return builder + } + } + + internal data class SelectedLabels( + val labels: List?, + ) : BaseModel { + internal companion object { + private const val LABELS_TAG = "labels" + + /** + * reader to create instance of class from writable. + */ + val reader = Writeable.Reader { SelectedLabels(it) } + + /** + * Parser to parse xContent + */ + val xParser = XParser { parse(it) } + + /** + * Parse the item list from parser + * @param parser data referenced at parser + * @return created list of items + */ + private fun parseItemList(parser: XContentParser): List { + val retList: MutableList = mutableListOf() + XContentParserUtils.ensureExpectedToken(XContentParser.Token.START_ARRAY, parser.currentToken(), parser) + while (parser.nextToken() != XContentParser.Token.END_ARRAY) { + retList.add(Token.parse(parser)) + } + return retList + } + + /** + * Parse the data from parser and create Trigger object + * @param parser data referenced at parser + * @return created Trigger object + */ + fun parse(parser: XContentParser): SelectedLabels { + var labels: List? = null + XContentParserUtils.ensureExpectedToken( + XContentParser.Token.START_ARRAY, + parser.currentToken(), + parser + ) + while (XContentParser.Token.END_ARRAY != parser.nextToken()) { + val fieldName = parser.currentName() + parser.nextToken() + when (fieldName) { + LABELS_TAG -> labels = parseItemList(parser) + else -> log.info("$LOG_PREFIX: Trigger Skipping Unknown field $fieldName") + } + } + labels ?: throw IllegalArgumentException("$LABELS_TAG field absent") + return SelectedLabels(labels) + } + } + + /** + * Constructor used in transport action communication. + * @param input StreamInput stream to deserialize data from. + */ + constructor(input: StreamInput) : this( + labels = input.readList(Token.reader) + ) + + /** + * {@inheritDoc} + */ + override fun writeTo(output: StreamOutput) { + output.writeCollection(labels) + } + + /** + * {@inheritDoc} + */ + override fun toXContent(builder: XContentBuilder?, params: ToXContent.Params?): XContentBuilder { + builder!! + builder.startObject() + if (labels != null) { + builder.startArray(LABELS_TAG) + labels.forEach { it.toXContent(builder, params) } + builder.endArray() + } + builder.endObject() + return builder + } + } } diff --git a/opensearch-observability/src/main/kotlin/org/opensearch/observability/resthandler/ObservabilityRestHandler.kt b/opensearch-observability/src/main/kotlin/org/opensearch/observability/resthandler/ObservabilityRestHandler.kt index fb25aba1a..c38a4b074 100644 --- a/opensearch-observability/src/main/kotlin/org/opensearch/observability/resthandler/ObservabilityRestHandler.kt +++ b/opensearch-observability/src/main/kotlin/org/opensearch/observability/resthandler/ObservabilityRestHandler.kt @@ -93,7 +93,7 @@ internal class ObservabilityRestHandler : BaseRestHandler() { * Response body: Ref [org.opensearch.observability.model.DeleteObservabilityObjectResponse] */ Route(DELETE, "$OBSERVABILITY_URL/{$OBJECT_ID_FIELD}"), - Route(DELETE, "$OBSERVABILITY_URL") + Route(DELETE, OBSERVABILITY_URL) ) } diff --git a/opensearch-observability/src/main/kotlin/org/opensearch/observability/resthandler/ObservabilityStatsRestHandler.kt b/opensearch-observability/src/main/kotlin/org/opensearch/observability/resthandler/ObservabilityStatsRestHandler.kt new file mode 100644 index 000000000..2895afb81 --- /dev/null +++ b/opensearch-observability/src/main/kotlin/org/opensearch/observability/resthandler/ObservabilityStatsRestHandler.kt @@ -0,0 +1,59 @@ +package org.opensearch.observability.resthandler + +import org.opensearch.client.node.NodeClient +import org.opensearch.observability.ObservabilityPlugin.Companion.BASE_OBSERVABILITY_URI +import org.opensearch.observability.metrics.Metrics +import org.opensearch.rest.BaseRestHandler +import org.opensearch.rest.BaseRestHandler.RestChannelConsumer +import org.opensearch.rest.BytesRestResponse +import org.opensearch.rest.RestHandler.Route +import org.opensearch.rest.RestRequest +import org.opensearch.rest.RestRequest.Method.GET +import org.opensearch.rest.RestStatus + +/** + * Rest handler for getting observability backend stats + */ +internal class ObservabilityStatsRestHandler : BaseRestHandler() { + companion object { + private const val OBSERVABILITY_STATS_ACTION = "observability_stats" + private const val OBSERVABILITY_STATS_URL = "$BASE_OBSERVABILITY_URI/_local/stats" + } + + /** + * {@inheritDoc} + */ + override fun getName(): String { + return OBSERVABILITY_STATS_ACTION + } + + /** + * {@inheritDoc} + */ + override fun routes(): List { + return listOf( + Route(GET, OBSERVABILITY_STATS_URL) + ) + } + + /** + * {@inheritDoc} + */ + override fun responseParams(): Set { + return setOf() + } + + /** + * {@inheritDoc} + */ + override fun prepareRequest(request: RestRequest, client: NodeClient): RestChannelConsumer { + return when (request.method()) { + GET -> RestChannelConsumer { + it.sendResponse(BytesRestResponse(RestStatus.OK, Metrics.collectToFlattenedJSON())) + } + else -> RestChannelConsumer { + it.sendResponse(BytesRestResponse(RestStatus.METHOD_NOT_ALLOWED, "${request.method()} is not allowed")) + } + } + } +} diff --git a/opensearch-observability/src/main/kotlin/org/opensearch/observability/resthandler/RestResponseToXContentListener.kt b/opensearch-observability/src/main/kotlin/org/opensearch/observability/resthandler/RestResponseToXContentListener.kt index e2a9004c4..989416e8a 100644 --- a/opensearch-observability/src/main/kotlin/org/opensearch/observability/resthandler/RestResponseToXContentListener.kt +++ b/opensearch-observability/src/main/kotlin/org/opensearch/observability/resthandler/RestResponseToXContentListener.kt @@ -5,8 +5,12 @@ package org.opensearch.observability.resthandler +import org.opensearch.common.xcontent.XContentBuilder +import org.opensearch.observability.metrics.Metrics import org.opensearch.observability.model.BaseResponse +import org.opensearch.rest.BytesRestResponse import org.opensearch.rest.RestChannel +import org.opensearch.rest.RestResponse import org.opensearch.rest.RestStatus import org.opensearch.rest.action.RestToXContentListener @@ -16,6 +20,24 @@ import org.opensearch.rest.action.RestToXContentListener * (wrapping the toXContent in startObject/endObject). */ internal class RestResponseToXContentListener(channel: RestChannel) : RestToXContentListener(channel) { + /** + * {@inheritDoc} + */ + override fun buildResponse(response: Response, builder: XContentBuilder?): RestResponse { + super.buildResponse(response, builder) + + Metrics.REQUEST_TOTAL.counter.increment() + Metrics.REQUEST_INTERVAL_COUNT.counter.increment() + + when (response.getStatus()) { + in RestStatus.OK..RestStatus.MULTI_STATUS -> Metrics.REQUEST_SUCCESS.counter.increment() + RestStatus.FORBIDDEN -> Metrics.OBSERVABILITY_SECURITY_PERMISSION_ERROR.counter.increment() + in RestStatus.UNAUTHORIZED..RestStatus.TOO_MANY_REQUESTS -> Metrics.REQUEST_USER_ERROR.counter.increment() + else -> Metrics.REQUEST_SYSTEM_ERROR.counter.increment() + } + return BytesRestResponse(getStatus(response), builder) + } + /** * {@inheritDoc} */ diff --git a/opensearch-observability/src/main/kotlin/org/opensearch/observability/security/SecurityAccess.kt b/opensearch-observability/src/main/kotlin/org/opensearch/observability/security/SecurityAccess.kt index c211195cd..0faaf063f 100644 --- a/opensearch-observability/src/main/kotlin/org/opensearch/observability/security/SecurityAccess.kt +++ b/opensearch-observability/src/main/kotlin/org/opensearch/observability/security/SecurityAccess.kt @@ -24,7 +24,7 @@ internal object SecurityAccess { SpecialPermission.check() return try { AccessController.doPrivileged(operation) - } catch (e: PrivilegedActionException) { + } catch (@Suppress("SwallowedException") e: PrivilegedActionException) { throw (e.cause as Exception?)!! } } diff --git a/opensearch-observability/src/main/kotlin/org/opensearch/observability/settings/PluginSettings.kt b/opensearch-observability/src/main/kotlin/org/opensearch/observability/settings/PluginSettings.kt index 7782425ca..6f99371ef 100644 --- a/opensearch-observability/src/main/kotlin/org/opensearch/observability/settings/PluginSettings.kt +++ b/opensearch-observability/src/main/kotlin/org/opensearch/observability/settings/PluginSettings.kt @@ -250,7 +250,7 @@ internal object PluginSettings { try { settings = Settings.builder().loadFromPath(defaultSettingYmlFile).build() } catch (exception: IOException) { - log.warn("$LOG_PREFIX:Failed to load ${defaultSettingYmlFile.toAbsolutePath()}") + log.warn("$LOG_PREFIX:Failed to load ${defaultSettingYmlFile.toAbsolutePath()} message:${exception.message}") } } // Initialize the settings values to default values diff --git a/opensearch-observability/src/test/kotlin/org/opensearch/observability/ObservabilityPluginTests.kt b/opensearch-observability/src/test/kotlin/org/opensearch/observability/ObservabilityPluginTests.kt deleted file mode 100644 index be7af5a17..000000000 --- a/opensearch-observability/src/test/kotlin/org/opensearch/observability/ObservabilityPluginTests.kt +++ /dev/null @@ -1,12 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - */ -package org.opensearch.observability - -import org.opensearch.test.OpenSearchTestCase - -class ObservabilityPluginTests : OpenSearchTestCase() { - fun testSample() { - } -} diff --git a/opensearch-observability/src/test/kotlin/org/opensearch/observability/TestHelpers.kt b/opensearch-observability/src/test/kotlin/org/opensearch/observability/TestHelpers.kt index bfebe5c0f..5c65483d0 100644 --- a/opensearch-observability/src/test/kotlin/org/opensearch/observability/TestHelpers.kt +++ b/opensearch-observability/src/test/kotlin/org/opensearch/observability/TestHelpers.kt @@ -73,7 +73,7 @@ fun constructNotebookRequest(name: String = "test notebook"): String { } """.trimIndent() } - +@Suppress("MaxLineLength") fun constructSavedQueryRequest(name: String = "test saved query"): String { return """ { @@ -101,7 +101,7 @@ fun constructSavedQueryRequest(name: String = "test saved query"): String { } """.trimIndent() } - +@Suppress("MaxLineLength") fun constructSavedVisualizationRequest(name: String = "test saved visualization"): String { return """ { diff --git a/opensearch-observability/src/test/kotlin/org/opensearch/observability/action/CreateObservabilityObjectRequestTests.kt b/opensearch-observability/src/test/kotlin/org/opensearch/observability/action/CreateObservabilityObjectRequestTests.kt index 2a7edb23b..a3f84d0e3 100644 --- a/opensearch-observability/src/test/kotlin/org/opensearch/observability/action/CreateObservabilityObjectRequestTests.kt +++ b/opensearch-observability/src/test/kotlin/org/opensearch/observability/action/CreateObservabilityObjectRequestTests.kt @@ -43,7 +43,8 @@ internal class CreateObservabilityObjectRequestTests { @Test fun `Create object should deserialize json object using parser`() { val jsonString = - "{\"timestamp\":{\"name\":\"test-timestamp\",\"index\":\"opensearch_dashboards_sample_data_logs\",\"type\":\"timestamp\",\"dsl_type\":\"date\"}}" + "{\"timestamp\":{\"name\":\"test-timestamp\",\"index\":\"opensearch_dashboards_sample_data_logs\"," + + "\"type\":\"timestamp\",\"dsl_type\":\"date\"}}" val recreatedObject = createObjectFromJsonString(jsonString) { CreateObservabilityObjectRequest.parse(it) } assertEquals(sampleTimestamp, recreatedObject.objectData) } @@ -59,7 +60,8 @@ internal class CreateObservabilityObjectRequestTests { @Test fun `Create object should safely ignore extra field in json object`() { val jsonString = - "{\"timestamp\":{\"name\":\"test-timestamp\",\"index\":\"opensearch_dashboards_sample_data_logs\",\"type\":\"timestamp\",\"dsl_type\":\"date\",\"another\":\"field\"}}" + "{\"timestamp\":{\"name\":\"test-timestamp\",\"index\":\"opensearch_dashboards_sample_data_logs\"," + + "\"type\":\"timestamp\",\"dsl_type\":\"date\",\"another\":\"field\"}}" val recreatedObject = createObjectFromJsonString(jsonString) { CreateObservabilityObjectRequest.parse(it) } assertEquals(sampleTimestamp, recreatedObject.objectData) } diff --git a/opensearch-observability/src/test/kotlin/org/opensearch/observability/metrics/BasicCounterTests.kt b/opensearch-observability/src/test/kotlin/org/opensearch/observability/metrics/BasicCounterTests.kt new file mode 100644 index 000000000..6427ed152 --- /dev/null +++ b/opensearch-observability/src/test/kotlin/org/opensearch/observability/metrics/BasicCounterTests.kt @@ -0,0 +1,28 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +package org.opensearch.observability.metrics + +import org.hamcrest.MatcherAssert.assertThat +import org.hamcrest.Matchers +import org.junit.jupiter.api.Test + +internal class BasicCounterTests { + @Test + fun increment() { + val counter = BasicCounter() + for (@Suppress("unused") i in 0..4) { + counter.increment() + } + assertThat(counter.value, Matchers.equalTo(5L)) + } + + @Test + fun incrementN() { + val counter = BasicCounter() + counter.add(5) + assertThat(counter.value, Matchers.equalTo(5L)) + } +} diff --git a/opensearch-observability/src/test/kotlin/org/opensearch/observability/metrics/RollingCounterTests.kt b/opensearch-observability/src/test/kotlin/org/opensearch/observability/metrics/RollingCounterTests.kt new file mode 100644 index 000000000..9a92806e7 --- /dev/null +++ b/opensearch-observability/src/test/kotlin/org/opensearch/observability/metrics/RollingCounterTests.kt @@ -0,0 +1,64 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +package org.opensearch.observability.metrics + +import org.hamcrest.MatcherAssert.assertThat +import org.hamcrest.Matchers +import org.junit.jupiter.api.Test +import org.junit.jupiter.api.extension.ExtendWith +import org.mockito.Mock +import org.mockito.Mockito +import org.mockito.junit.jupiter.MockitoExtension +import java.time.Clock + +@ExtendWith(MockitoExtension::class) +internal class RollingCounterTests { + @Mock + var clock: Clock? = null + + @Test + fun increment() { + val counter = RollingCounter(3, 1, clock!!) + for (i in 0..4) { + counter.increment() + } + assertThat(counter.value, Matchers.equalTo(0L)) + Mockito.`when`(clock!!.millis()).thenReturn(1000L) // 1 second passed + assertThat(counter.value, Matchers.equalTo(5L)) + counter.increment() + counter.increment() + Mockito.`when`(clock!!.millis()).thenReturn(2000L) // 1 second passed + assertThat(counter.value, Matchers.lessThanOrEqualTo(3L)) + Mockito.`when`(clock!!.millis()).thenReturn(3000L) // 1 second passed + assertThat(counter.value, Matchers.equalTo(0L)) + } + + @Test + fun add() { + val counter = RollingCounter(3, 1, clock!!) + counter.add(6) + assertThat(counter.value, Matchers.equalTo(0L)) + Mockito.`when`(clock!!.millis()).thenReturn(1000L) // 1 second passed + assertThat(counter.value, Matchers.equalTo(6L)) + counter.add(4) + Mockito.`when`(clock!!.millis()).thenReturn(2000L) // 1 second passed + assertThat(counter.value, Matchers.equalTo(4L)) + Mockito.`when`(clock!!.millis()).thenReturn(3000L) // 1 second passed + assertThat(counter.value, Matchers.equalTo(0L)) + } + + @Test + fun trim() { + val counter = RollingCounter(2, 1, clock!!) + for (i in 1..5) { + counter.increment() + assertThat(counter.size(), Matchers.equalTo(i)) + Mockito.`when`(clock!!.millis()).thenReturn(i * 1000L) // i seconds passed + } + counter.increment() + assertThat(counter.size(), Matchers.lessThanOrEqualTo(3)) + } +} diff --git a/opensearch-observability/src/test/kotlin/org/opensearch/observability/model/NotebookTests.kt b/opensearch-observability/src/test/kotlin/org/opensearch/observability/model/NotebookTests.kt index 13a41d71d..f077ce211 100644 --- a/opensearch-observability/src/test/kotlin/org/opensearch/observability/model/NotebookTests.kt +++ b/opensearch-observability/src/test/kotlin/org/opensearch/observability/model/NotebookTests.kt @@ -46,7 +46,11 @@ internal class NotebookTests { @Test fun `Notebook should deserialize json object using parser`() { val jsonString = - "{\"name\":\"test-notebook\",\"dateCreated\":\"2021-12-01T18:33:40.017Z\",\"dateModified\":\"2021-12-01T18:33:40.017Z\",\"backend\":\"Default\",\"paragraphs\":[{\"output\":[{\"result\":\"sample paragraph\",\"outputType\":\"MARKDOWN\",\"execution_time\":\"0 ms\"}],\"input\":{\"inputText\":\"%md sample paragraph\",\"inputType\":\"MARKDOWN\"},\"dateCreated\":\"2021-12-01T18:33:40.017Z\",\"dateModified\":\"2021-12-01T18:33:40.017Z\",\"id\":\"paragraph_bcd3c65c-91db-489d-b667-496fd378714e\"}]}" + "{\"name\":\"test-notebook\",\"dateCreated\":\"2021-12-01T18:33:40.017Z\",\"dateModified\":\"2021-12-01T18:33:40.017Z\"," + + "\"backend\":\"Default\",\"paragraphs\":[{\"output\":[{\"result\":\"sample paragraph\",\"outputType\":\"MARKDOWN\"," + + "\"execution_time\":\"0 ms\"}],\"input\":{\"inputText\":\"%md sample paragraph\",\"inputType\":\"MARKDOWN\"}," + + "\"dateCreated\":\"2021-12-01T18:33:40.017Z\",\"dateModified\":\"2021-12-01T18:33:40.017Z\"," + + "\"id\":\"paragraph_bcd3c65c-91db-489d-b667-496fd378714e\"}]}" val recreatedObject = createObjectFromJsonString(jsonString) { Notebook.parse(it) } assertEquals(sampleNotebook, recreatedObject) } @@ -62,7 +66,11 @@ internal class NotebookTests { @Test fun `Notebook should safely ignore extra field in json object`() { val jsonString = - "{\"name\":\"test-notebook\",\"dateCreated\":\"2021-12-01T18:33:40.017Z\",\"dateModified\":\"2021-12-01T18:33:40.017Z\",\"backend\":\"Default\",\"paragraphs\":[{\"output\":[{\"result\":\"sample paragraph\",\"outputType\":\"MARKDOWN\",\"execution_time\":\"0 ms\"}],\"input\":{\"inputText\":\"%md sample paragraph\",\"inputType\":\"MARKDOWN\"},\"dateCreated\":\"2021-12-01T18:33:40.017Z\",\"dateModified\":\"2021-12-01T18:33:40.017Z\",\"id\":\"paragraph_bcd3c65c-91db-489d-b667-496fd378714e\"}],\"another\":\"field\"}" + "{\"name\":\"test-notebook\",\"dateCreated\":\"2021-12-01T18:33:40.017Z\",\"dateModified\":\"2021-12-01T18:33:40.017Z\"," + + "\"backend\":\"Default\",\"paragraphs\":[{\"output\":[{\"result\":\"sample paragraph\",\"outputType\":\"MARKDOWN\"," + + "\"execution_time\":\"0 ms\"}],\"input\":{\"inputText\":\"%md sample paragraph\",\"inputType\":\"MARKDOWN\"}," + + "\"dateCreated\":\"2021-12-01T18:33:40.017Z\",\"dateModified\":\"2021-12-01T18:33:40.017Z\"," + + "\"id\":\"paragraph_bcd3c65c-91db-489d-b667-496fd378714e\"}],\"another\":\"field\"}" val recreatedObject = createObjectFromJsonString(jsonString) { Notebook.parse(it) } assertEquals(sampleNotebook, recreatedObject) } diff --git a/opensearch-observability/src/test/kotlin/org/opensearch/observability/model/ObservabilityObjectDocTests.kt b/opensearch-observability/src/test/kotlin/org/opensearch/observability/model/ObservabilityObjectDocTests.kt index 390c5a223..3812737c2 100644 --- a/opensearch-observability/src/test/kotlin/org/opensearch/observability/model/ObservabilityObjectDocTests.kt +++ b/opensearch-observability/src/test/kotlin/org/opensearch/observability/model/ObservabilityObjectDocTests.kt @@ -33,7 +33,9 @@ internal class ObservabilityObjectDocTests { @Test fun `ObservabilityObjectDoc should deserialize json object using parser`() { val jsonString = - "{\"objectId\":\"test-id\",\"lastUpdatedTimeMs\":1638482208790,\"createdTimeMs\":1638482208790,\"tenant\":\"test-tenant\",\"access\":[\"test-access\"],\"timestamp\":{\"name\":\"test object\",\"index\":\"opensearch_dashboards_sample_data_logs\",\"type\":\"timestamp\",\"dsl_type\":\"date\"}}" + "{\"objectId\":\"test-id\",\"lastUpdatedTimeMs\":1638482208790,\"createdTimeMs\":1638482208790,\"tenant\":" + + "\"test-tenant\",\"access\":[\"test-access\"],\"timestamp\":{\"name\":\"test object\"," + + "\"index\":\"opensearch_dashboards_sample_data_logs\",\"type\":\"timestamp\",\"dsl_type\":\"date\"}}" val recreatedObject = createObjectFromJsonString(jsonString) { ObservabilityObjectDoc.parse(it) } assertEquals(sampleObservabilityObjectDoc, recreatedObject) } @@ -49,7 +51,9 @@ internal class ObservabilityObjectDocTests { @Test fun `ObservabilityObjectDoc should safely ignore extra field in json object`() { val jsonString = - "{\"objectId\":\"test-id\",\"lastUpdatedTimeMs\":1638482208790,\"createdTimeMs\":1638482208790,\"tenant\":\"test-tenant\",\"access\":[\"test-access\"],\"timestamp\":{\"name\":\"test object\",\"index\":\"opensearch_dashboards_sample_data_logs\",\"type\":\"timestamp\",\"dsl_type\":\"date\"},\"another\":\"field\"}" + "{\"objectId\":\"test-id\",\"lastUpdatedTimeMs\":1638482208790,\"createdTimeMs\":1638482208790,\"tenant\":" + + "\"test-tenant\",\"access\":[\"test-access\"],\"timestamp\":{\"name\":\"test object\",\"index\":" + + "\"opensearch_dashboards_sample_data_logs\",\"type\":\"timestamp\",\"dsl_type\":\"date\"},\"another\":\"field\"}" val recreatedObject = createObjectFromJsonString(jsonString) { ObservabilityObjectDoc.parse(it) } assertEquals(sampleObservabilityObjectDoc, recreatedObject) } diff --git a/opensearch-observability/src/test/kotlin/org/opensearch/observability/model/OperationalPanelTests.kt b/opensearch-observability/src/test/kotlin/org/opensearch/observability/model/OperationalPanelTests.kt index 6d615af17..227d2c415 100644 --- a/opensearch-observability/src/test/kotlin/org/opensearch/observability/model/OperationalPanelTests.kt +++ b/opensearch-observability/src/test/kotlin/org/opensearch/observability/model/OperationalPanelTests.kt @@ -46,7 +46,9 @@ internal class OperationalPanelTests { @Test fun `OperationalPanel should deserialize json object using parser`() { val jsonString = - "{\"name\":\"test-operational-panel\",\"visualizations\":[{\"id\":\"panelViz_7ba28e34-6fd8-489d-9b9f-1f83e006fb17\",\"savedVisualizationId\":\"oyuecXwBYVazWqOOde0o\",\"x\":0,\"y\":0,\"w\":10,\"h\":10}],\"timeRange\":{\"to\":\"now\",\"from\":\"now-1d\"},\"queryFilter\":{\"query\":\"| where Carrier='OpenSearch-Air'\",\"language\":\"ppl\"}}" + "{\"name\":\"test-operational-panel\",\"visualizations\":[{\"id\":\"panelViz_7ba28e34-6fd8-489d-9b9f-1f83e006fb17\"," + + "\"savedVisualizationId\":\"oyuecXwBYVazWqOOde0o\",\"x\":0,\"y\":0,\"w\":10,\"h\":10}],\"timeRange\":{\"to\":" + + "\"now\",\"from\":\"now-1d\"},\"queryFilter\":{\"query\":\"| where Carrier='OpenSearch-Air'\",\"language\":\"ppl\"}}" val recreatedObject = createObjectFromJsonString(jsonString) { OperationalPanel.parse(it) } assertEquals(sampleOperationalPanel, recreatedObject) } @@ -62,7 +64,9 @@ internal class OperationalPanelTests { @Test fun `OperationalPanel should safely ignore extra field in json object`() { val jsonString = - "{\"name\":\"test-operational-panel\",\"visualizations\":[{\"id\":\"panelViz_7ba28e34-6fd8-489d-9b9f-1f83e006fb17\",\"savedVisualizationId\":\"oyuecXwBYVazWqOOde0o\",\"x\":0,\"y\":0,\"w\":10,\"h\":10}],\"timeRange\":{\"to\":\"now\",\"from\":\"now-1d\"},\"queryFilter\":{\"query\":\"| where Carrier='OpenSearch-Air'\",\"language\":\"ppl\"},\"another\":\"field\"}" + "{\"name\":\"test-operational-panel\",\"visualizations\":[{\"id\":\"panelViz_7ba28e34-6fd8-489d-9b9f-1f83e006fb17\",\"" + + "savedVisualizationId\":\"oyuecXwBYVazWqOOde0o\",\"x\":0,\"y\":0,\"w\":10,\"h\":10}],\"timeRange\":{\"to\":\"now\"," + + "\"from\":\"now-1d\"},\"queryFilter\":{\"query\":\"| where Carrier='OpenSearch-Air'\",\"language\":\"ppl\"},\"another\":\"field\"}" val recreatedObject = createObjectFromJsonString(jsonString) { OperationalPanel.parse(it) } assertEquals(sampleOperationalPanel, recreatedObject) } diff --git a/opensearch-observability/src/test/kotlin/org/opensearch/observability/model/SavedQueryTests.kt b/opensearch-observability/src/test/kotlin/org/opensearch/observability/model/SavedQueryTests.kt index a5999abbf..509d7927e 100644 --- a/opensearch-observability/src/test/kotlin/org/opensearch/observability/model/SavedQueryTests.kt +++ b/opensearch-observability/src/test/kotlin/org/opensearch/observability/model/SavedQueryTests.kt @@ -46,7 +46,12 @@ internal class SavedQueryTests { @Test fun `SavedQuery should deserialize json object using parser`() { val jsonString = - "{\"name\":\"test-saved-query\",\"description\":\"test description\",\"query\":\"source=index | where utc_time > timestamp('2021-07-01 00:00:00') and utc_time < timestamp('2021-07-02 00:00:00')\",\"selected_date_range\":{\"start\":\"now/15m\",\"end\":\"now\",\"text\":\"utc_time > timestamp('2021-07-01 00:00:00') and utc_time < timestamp('2021-07-02 00:00:00')\"},\"selected_timestamp\":{\"name\":\"utc_time\",\"type\":\"timestamp\"},\"selected_fields\":{\"text\":\"| fields clientip, bytes, memory, host\",\"tokens\":[{\"name\":\"utc_time\",\"type\":\"timestamp\"}]}}" + "{\"name\":\"test-saved-query\",\"description\":\"test description\",\"query\":\"source=index | " + + "where utc_time > timestamp('2021-07-01 00:00:00') and utc_time < timestamp('2021-07-02 00:00:00')\"," + + "\"selected_date_range\":{\"start\":\"now/15m\",\"end\":\"now\",\"text\":\"utc_time > " + + "timestamp('2021-07-01 00:00:00') and utc_time < timestamp('2021-07-02 00:00:00')\"}," + + "\"selected_timestamp\":{\"name\":\"utc_time\",\"type\":\"timestamp\"},\"selected_fields\":{\"text\":" + + "\"| fields clientip, bytes, memory, host\",\"tokens\":[{\"name\":\"utc_time\",\"type\":\"timestamp\"}]}}" val recreatedObject = createObjectFromJsonString(jsonString) { SavedQuery.parse(it) } assertEquals(sampleSavedQuery, recreatedObject) } @@ -62,7 +67,12 @@ internal class SavedQueryTests { @Test fun `SavedQuery should safely ignore extra field in json object`() { val jsonString = - "{\"name\":\"test-saved-query\",\"description\":\"test description\",\"query\":\"source=index | where utc_time > timestamp('2021-07-01 00:00:00') and utc_time < timestamp('2021-07-02 00:00:00')\",\"selected_date_range\":{\"start\":\"now/15m\",\"end\":\"now\",\"text\":\"utc_time > timestamp('2021-07-01 00:00:00') and utc_time < timestamp('2021-07-02 00:00:00')\"},\"selected_timestamp\":{\"name\":\"utc_time\",\"type\":\"timestamp\"},\"selected_fields\":{\"text\":\"| fields clientip, bytes, memory, host\",\"tokens\":[{\"name\":\"utc_time\",\"type\":\"timestamp\"}]},\"another\":\"field\"}" + "{\"name\":\"test-saved-query\",\"description\":\"test description\",\"query\":\"source=index | where" + + " utc_time > timestamp('2021-07-01 00:00:00') and utc_time < timestamp('2021-07-02 00:00:00')\"," + + "\"selected_date_range\":{\"start\":\"now/15m\",\"end\":\"now\",\"text\":\"utc_time > timestamp" + + "('2021-07-01 00:00:00') and utc_time < timestamp('2021-07-02 00:00:00')\"},\"selected_timestamp\"" + + ":{\"name\":\"utc_time\",\"type\":\"timestamp\"},\"selected_fields\":{\"text\":\"| fields clientip, " + + "bytes, memory, host\",\"tokens\":[{\"name\":\"utc_time\",\"type\":\"timestamp\"}]},\"another\":\"field\"}" val recreatedObject = createObjectFromJsonString(jsonString) { SavedQuery.parse(it) } assertEquals(sampleSavedQuery, recreatedObject) } diff --git a/opensearch-observability/src/test/kotlin/org/opensearch/observability/model/SavedVisualizationTests.kt b/opensearch-observability/src/test/kotlin/org/opensearch/observability/model/SavedVisualizationTests.kt index 8129aad70..76ff58319 100644 --- a/opensearch-observability/src/test/kotlin/org/opensearch/observability/model/SavedVisualizationTests.kt +++ b/opensearch-observability/src/test/kotlin/org/opensearch/observability/model/SavedVisualizationTests.kt @@ -30,7 +30,9 @@ internal class SavedVisualizationTests { listOf(SavedQuery.Token("utc_time", "timestamp")) ), "KE1Ie34BbsTr-CsB4G6Y", - "{\"dataConfig\":\"{}\",\"layoutConfig\":\"{}\"}" + "{\"dataConfig\":\"{}\",\"layoutConfig\":\"{}\"}", + "metric", + "hours (h)" ) @Test @@ -49,7 +51,15 @@ internal class SavedVisualizationTests { @Test fun `SavedVisualization should deserialize json object using parser`() { val jsonString = - "{\"name\":\"test-saved-visualization\",\"description\":\"test description\",\"query\":\"source=index | where utc_time > timestamp('2021-07-01 00:00:00') and utc_time < timestamp('2021-07-02 00:00:00')\",\"type\":\"bar\",\"selected_date_range\":{\"start\":\"now/15m\",\"end\":\"now\",\"text\":\"utc_time > timestamp('2021-07-01 00:00:00') and utc_time < timestamp('2021-07-02 00:00:00')\"},\"selected_timestamp\":{\"name\":\"utc_time\",\"type\":\"timestamp\"},\"selected_fields\":{\"text\":\"| fields clientip, bytes, memory, host\",\"tokens\":[{\"name\":\"utc_time\",\"type\":\"timestamp\"}]},\"application_id\":\"KE1Ie34BbsTr-CsB4G6Y\",\"user_configs\":\"{\\\"dataConfig\\\":\\\"{}\\\",\\\"layoutConfig\\\":\\\"{}\\\"}\"}" + "{\"name\":\"test-saved-visualization\",\"description\":\"test description\",\"query\":\"source=index | " + + "where utc_time > timestamp('2021-07-01 00:00:00') and utc_time < timestamp('2021-07-02 00:00:00')\"," + + "\"type\":\"bar\",\"selected_date_range\":{\"start\":\"now/15m\",\"end\":\"now\",\"text\":\"utc_time >" + + " timestamp('2021-07-01 00:00:00') and utc_time < timestamp('2021-07-02 00:00:00')\"}," + + "\"selected_timestamp\":{\"name\":\"utc_time\",\"type\":\"timestamp\"},\"selected_fields\":{\"text\":\"" + + "| fields clientip, bytes, memory, host\",\"tokens\":[{\"name\":\"utc_time\",\"type\":\"timestamp\"}]}," + + "\"application_id\":\"KE1Ie34BbsTr-CsB4G6Y\",\"user_configs\":\"{\\\"dataConfig\\\":\\\"{}\\\"," + + "\\\"layoutConfig\\\":\\\"{}\\\"}\",\"sub_type\":\"metric\",\"units_of_measure\":\"hours (h)\"}" + val recreatedObject = createObjectFromJsonString(jsonString) { SavedVisualization.parse(it) } assertEquals(sampleSavedVisualization, recreatedObject) } @@ -65,7 +75,15 @@ internal class SavedVisualizationTests { @Test fun `SavedVisualization should safely ignore extra field in json object`() { val jsonString = - "{\"name\":\"test-saved-visualization\",\"description\":\"test description\",\"query\":\"source=index | where utc_time > timestamp('2021-07-01 00:00:00') and utc_time < timestamp('2021-07-02 00:00:00')\",\"type\":\"bar\",\"selected_date_range\":{\"start\":\"now/15m\",\"end\":\"now\",\"text\":\"utc_time > timestamp('2021-07-01 00:00:00') and utc_time < timestamp('2021-07-02 00:00:00')\"},\"selected_timestamp\":{\"name\":\"utc_time\",\"type\":\"timestamp\"},\"selected_fields\":{\"text\":\"| fields clientip, bytes, memory, host\",\"tokens\":[{\"name\":\"utc_time\",\"type\":\"timestamp\"}]},\"application_id\":\"KE1Ie34BbsTr-CsB4G6Y\",\"user_configs\":\"{\\\"dataConfig\\\":\\\"{}\\\",\\\"layoutConfig\\\":\\\"{}\\\"}\"}" + "{\"name\":\"test-saved-visualization\",\"description\":\"test description\",\"query\":\"source=index | " + + "where utc_time > timestamp('2021-07-01 00:00:00') and utc_time < timestamp('2021-07-02 00:00:00')\"," + + "\"type\":\"bar\",\"selected_date_range\":{\"start\":\"now/15m\",\"end\":\"now\",\"text\":\"utc_time > " + + "timestamp('2021-07-01 00:00:00') and utc_time < timestamp('2021-07-02 00:00:00')\"}," + + "\"selected_timestamp\":{\"name\":\"utc_time\",\"type\":\"timestamp\"},\"selected_fields\":{\"text\":\"|" + + " fields clientip, bytes, memory, host\",\"tokens\":[{\"name\":\"utc_time\",\"type\":\"timestamp\"}]}," + + "\"application_id\":\"KE1Ie34BbsTr-CsB4G6Y\",\"user_configs\":\"{\\\"dataConfig\\\":\\\"{}\\\"," + + "\\\"layoutConfig\\\":\\\"{}\\\"}\",\"sub_type\":\"metric\",\"units_of_measure\":\"hours (h)\"}" + val recreatedObject = createObjectFromJsonString(jsonString) { SavedVisualization.parse(it) } assertEquals(sampleSavedVisualization, recreatedObject) } diff --git a/opensearch-observability/src/test/kotlin/org/opensearch/observability/model/TimestampTests.kt b/opensearch-observability/src/test/kotlin/org/opensearch/observability/model/TimestampTests.kt index adef69b1c..1d303921d 100644 --- a/opensearch-observability/src/test/kotlin/org/opensearch/observability/model/TimestampTests.kt +++ b/opensearch-observability/src/test/kotlin/org/opensearch/observability/model/TimestampTests.kt @@ -53,7 +53,8 @@ internal class TimestampTests { @Test fun `Timestamp should safely ignore extra field in json object`() { val jsonString = - "{\"name\":\"test-timestamp\",\"index\":\"opensearch_dashboards_sample_data_logs\",\"type\":\"timestamp\",\"dsl_type\":\"date\",\"another\":\"field\"}" + "{\"name\":\"test-timestamp\",\"index\":\"opensearch_dashboards_sample_data_logs\"," + + "\"type\":\"timestamp\",\"dsl_type\":\"date\",\"another\":\"field\"}" val recreatedObject = createObjectFromJsonString(jsonString) { Timestamp.parse(it) } assertEquals(sampleTimestamp, recreatedObject) }