diff --git a/.github/workflows/ci-plugin-server.yml b/.github/workflows/ci-plugin-server.yml
index b4d6cb0a17f36..a62bd4a66851a 100644
--- a/.github/workflows/ci-plugin-server.yml
+++ b/.github/workflows/ci-plugin-server.yml
@@ -151,9 +151,11 @@ jobs:
if: needs.changes.outputs.plugin-server == 'true'
run: cd plugin-server && pnpm i
- - name: Wait for Clickhouse & Kafka
+ - name: Wait for Clickhouse, Redis & Kafka
if: needs.changes.outputs.plugin-server == 'true'
- run: bin/check_kafka_clickhouse_up
+ run: |
+ docker compose -f docker-compose.dev.yml up kafka redis clickhouse -d --wait
+ bin/check_kafka_clickhouse_up
- name: Set up databases
if: needs.changes.outputs.plugin-server == 'true'
@@ -173,16 +175,11 @@ jobs:
run: cd plugin-server && pnpm test -- --runInBand --forceExit tests/ --shard=${{matrix.shard}}
functional-tests:
- name: Functional tests (POE=${{matrix.POE_EMBRACE_JOIN_FOR_TEAMS}},RDK=${{matrix.KAFKA_CONSUMPTION_USE_RDKAFKA}})
+ name: Functional tests
needs: changes
if: needs.changes.outputs.plugin-server == 'true'
runs-on: ubuntu-latest
- strategy:
- fail-fast: false
- matrix:
- POE_EMBRACE_JOIN_FOR_TEAMS: ['', '*']
-
env:
REDIS_URL: 'redis://localhost'
CLICKHOUSE_HOST: 'localhost'
@@ -190,7 +187,6 @@ jobs:
KAFKA_HOSTS: 'kafka:9092'
DATABASE_URL: 'postgres://posthog:posthog@localhost:5432/posthog'
RELOAD_PLUGIN_JITTER_MAX_MS: 0
- POE_EMBRACE_JOIN_FOR_TEAMS: ${{matrix.POE_EMBRACE_JOIN_FOR_TEAMS}}
steps:
- name: Code check out
@@ -241,8 +237,10 @@ jobs:
pnpm install --frozen-lockfile
pnpm build
- - name: Wait for Clickhouse & Kafka
- run: bin/check_kafka_clickhouse_up
+ - name: Wait for Clickhouse, Redis & Kafka
+ run: |
+ docker compose -f docker-compose.dev.yml up kafka redis clickhouse -d --wait
+ bin/check_kafka_clickhouse_up
- name: Set up databases
env:
diff --git a/cypress/e2e/surveys.cy.ts b/cypress/e2e/surveys.cy.ts
index 3df925f425a4d..42c2fc6bc11cb 100644
--- a/cypress/e2e/surveys.cy.ts
+++ b/cypress/e2e/surveys.cy.ts
@@ -165,7 +165,7 @@ describe('Surveys', () => {
cy.get('tbody').should('not.exist')
})
- it('Delete survey', () => {
+ it('deletes a survey', () => {
cy.get('h1').should('contain', 'Surveys')
cy.get('[data-attr=new-survey]').click()
cy.get('[data-attr=new-blank-survey]').click()
@@ -278,4 +278,154 @@ describe('Surveys', () => {
cy.reload()
cy.contains('The survey will be stopped once 228 responses are received.').should('be.visible')
})
+
+ it('creates a new survey with branching logic', () => {
+ cy.window().then((win) => {
+ win.POSTHOG_APP_CONTEXT.current_user.organization.available_product_features = [
+ {
+ key: 'surveys_multiple_questions',
+ name: 'Multiple questions',
+ description: 'Ask up to 10 questions in a single survey.',
+ unit: null,
+ limit: null,
+ note: null,
+ },
+ ]
+
+ cy.get('h1').should('contain', 'Surveys')
+ cy.title().should('equal', 'Surveys • PostHog')
+
+ cy.get('[data-attr="new-survey"]').click()
+ cy.get('[data-attr="new-blank-survey"]').click()
+ cy.get('[data-attr="survey-name"]').type(name)
+
+ // Prepare questions
+ cy.get('[data-attr=survey-question-label-0]')
+ .focus()
+ .clear()
+ .type('How happy are you?', { delay: 0 })
+ .should('have.value', 'How happy are you?')
+ cy.get('[data-attr=survey-question-type-0]').click()
+ cy.get('[data-attr=survey-question-type-0-rating]').click()
+ cy.get('[data-attr="add-question"]').click()
+
+ cy.get('[data-attr=survey-question-label-1]')
+ .focus()
+ .clear()
+ .type('Sorry to hear that. Please tell us more!', { delay: 0 })
+ .should('have.value', 'Sorry to hear that. Please tell us more!')
+ cy.get('[data-attr="add-question"]').click()
+
+ cy.get('[data-attr=survey-question-label-2]')
+ .focus()
+ .clear()
+ .type('Seems you are not completely happy. Please tell us more!', { delay: 0 })
+ .should('have.value', 'Seems you are not completely happy. Please tell us more!')
+ cy.get('[data-attr="add-question"]').click()
+
+ cy.get('[data-attr=survey-question-label-3]')
+ .focus()
+ .clear()
+ .type('Glad to hear that! Please tell us more', { delay: 0 })
+ .should('have.value', 'Glad to hear that! Please tell us more')
+ cy.get('[data-attr="add-question"]').click()
+
+ cy.get('[data-attr=survey-question-label-4]')
+ .focus()
+ .clear()
+ .type('Would you like to leave us a review?', { delay: 0 })
+ .should('have.value', 'Would you like to leave us a review?')
+ cy.get('[data-attr=survey-question-type-4]').click()
+ cy.get('[data-attr=survey-question-type-4-single_choice]').click()
+ cy.get('[data-attr="add-question"]').click()
+
+ cy.get('[data-attr=survey-question-label-5]')
+ .focus()
+ .clear()
+ .type('Please write your review here', { delay: 0 })
+ .should('have.value', 'Please write your review here')
+
+ // Set branching
+ // Question 1 - How happy are you?
+ cy.get('[data-attr=survey-question-panel-0]').click()
+ // Default branching is always "Next question"
+ cy.get('button[data-attr="survey-question-0-branching-select"]').find('span').contains('Next question')
+ cy.get('[data-attr=survey-question-0-branching-select]').click()
+ cy.get('.Popover__box button').contains('span', 'Specific question based on answer').click()
+ cy.get('button[data-attr="survey-question-0-branching-select"]')
+ .find('span')
+ .contains('Specific question based on answer')
+
+ cy.get('[data-attr=survey-question-0-branching-response_based-select-0]').click()
+ cy.get('.Popover__box button').contains('span', '2.').click()
+ cy.get('button[data-attr="survey-question-0-branching-response_based-select-0"]')
+ .find('span')
+ .contains('2.')
+
+ cy.get('[data-attr=survey-question-0-branching-response_based-select-1]').click()
+ cy.get('.Popover__box button').contains('span', '3.').click()
+ cy.get('button[data-attr="survey-question-0-branching-response_based-select-1"]')
+ .find('span')
+ .contains('3.')
+
+ cy.get('[data-attr=survey-question-0-branching-response_based-select-2]').click()
+ cy.get('.Popover__box button').contains('span', '4.').click()
+ cy.get('button[data-attr="survey-question-0-branching-response_based-select-2"]')
+ .find('span')
+ .contains('4.')
+
+ // Question 2 - Sorry to hear that...
+ cy.get('[data-attr=survey-question-panel-1]').click()
+ cy.get('[data-attr=survey-question-1-branching-select]').click()
+ cy.get('.Popover__box button').contains('span', 'Confirmation message').click()
+ cy.get('button[data-attr="survey-question-1-branching-select"]')
+ .find('span')
+ .contains('Confirmation message')
+
+ // Question 3 - Seems you are not completely happy...
+ cy.get('[data-attr=survey-question-panel-2]').click()
+ cy.get('[data-attr=survey-question-2-branching-select]').click()
+ cy.get('.Popover__box button').contains('span', 'Confirmation message').click()
+ cy.get('button[data-attr="survey-question-2-branching-select"]')
+ .find('span')
+ .contains('Confirmation message')
+
+ // Question 4 - Glad to hear that...
+ cy.get('[data-attr=survey-question-panel-3]').click()
+ cy.get('[data-attr=survey-question-3-branching-select]').click()
+ // "Would you like to leave us a review?"
+ cy.get('.Popover__box button').contains('span', '5.').click()
+ cy.get('button[data-attr="survey-question-3-branching-select"]').find('span').contains('5.')
+
+ // Question 5 - Would you like to leave us a review?
+ cy.get('[data-attr=survey-question-panel-4]').click()
+ cy.get('[data-attr=survey-question-4-branching-select]').click()
+ cy.get('.Popover__box button').contains('span', 'Specific question based on answer').click()
+ cy.get('button[data-attr="survey-question-4-branching-select"]')
+ .find('span')
+ .contains('Specific question based on answer')
+
+ cy.get('[data-attr=survey-question-4-branching-response_based-select-0]').click()
+ cy.get('.Popover__box button').contains('span', 'Next question').click()
+ cy.get('button[data-attr="survey-question-4-branching-response_based-select-0"]')
+ .find('span')
+ .contains('Next question')
+
+ cy.get('[data-attr=survey-question-4-branching-response_based-select-1]').click()
+ cy.get('.Popover__box button').contains('span', 'Confirmation message').click()
+ cy.get('button[data-attr="survey-question-4-branching-response_based-select-1"]')
+ .find('span')
+ .contains('Confirmation message')
+
+ // Question 6 - Please write your review here
+ cy.get('[data-attr=survey-question-panel-5]').click()
+ cy.get('button[data-attr="survey-question-5-branching-select"]')
+ .find('span')
+ .contains('Confirmation message')
+
+ // Save
+ cy.get('[data-attr="save-survey"]').eq(0).click()
+ cy.get('[data-attr=success-toast]').contains('created').should('exist')
+ })
+ })
})
diff --git a/docker-compose.base.yml b/docker-compose.base.yml
index 15adbe9d5febe..4303d86a91350 100644
--- a/docker-compose.base.yml
+++ b/docker-compose.base.yml
@@ -19,6 +19,11 @@ services:
image: redis:6.2.7-alpine
restart: on-failure
command: redis-server --maxmemory-policy allkeys-lru --maxmemory 200mb
+ healthcheck:
+ test: ['CMD', 'redis-cli', 'ping']
+ interval: 3s
+ timeout: 10s
+ retries: 10
clickhouse:
#
@@ -42,6 +47,11 @@ services:
KAFKA_CFG_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092
KAFKA_CFG_ZOOKEEPER_CONNECT: zookeeper:2181
ALLOW_PLAINTEXT_LISTENER: 'true'
+ healthcheck:
+ test: kafka-cluster.sh cluster-id --bootstrap-server localhost:9092 || exit 1
+ interval: 3s
+ timeout: 10s
+ retries: 10
kafka_ui:
image: provectuslabs/kafka-ui:latest
diff --git a/ee/clickhouse/materialized_columns/analyze.py b/ee/clickhouse/materialized_columns/analyze.py
index aaacab23e702a..d19a282117e79 100644
--- a/ee/clickhouse/materialized_columns/analyze.py
+++ b/ee/clickhouse/materialized_columns/analyze.py
@@ -50,13 +50,6 @@ def event_properties(self, team_id: str) -> set[str]:
def person_on_events_properties(self, team_id: str) -> set[str]:
return self._get_properties(GET_EVENT_PROPERTIES_COUNT.format(column_name="person_properties"), team_id)
- @instance_memoize
- def group_on_events_properties(self, group_type_index: int, team_id: str) -> set[str]:
- return self._get_properties(
- GET_EVENT_PROPERTIES_COUNT.format(column_name=f"group{group_type_index}_properties"),
- team_id,
- )
-
def _get_properties(self, query, team_id) -> set[str]:
rows = sync_execute(query, {"team_id": team_id})
return {name for name, _ in rows}
@@ -99,11 +92,6 @@ def properties(
person_props = team_manager.person_properties(self.team_id)
event_props = team_manager.event_properties(self.team_id)
person_on_events_props = team_manager.person_on_events_properties(self.team_id)
- group0_props = team_manager.group_on_events_properties(0, self.team_id)
- group1_props = team_manager.group_on_events_properties(1, self.team_id)
- group2_props = team_manager.group_on_events_properties(2, self.team_id)
- group3_props = team_manager.group_on_events_properties(3, self.team_id)
- group4_props = team_manager.group_on_events_properties(4, self.team_id)
for table_column, property in self._all_properties:
if property in event_props:
@@ -113,16 +101,6 @@ def properties(
if property in person_on_events_props and "person_properties" in table_column:
yield "events", "person_properties", property
- if property in group0_props and "group0_properties" in table_column:
- yield "events", "group0_properties", property
- if property in group1_props and "group1_properties" in table_column:
- yield "events", "group1_properties", property
- if property in group2_props and "group2_properties" in table_column:
- yield "events", "group2_properties", property
- if property in group3_props and "group3_properties" in table_column:
- yield "events", "group3_properties", property
- if property in group4_props and "group4_properties" in table_column:
- yield "events", "group4_properties", property
def _analyze(since_hours_ago: int, min_query_time: int, team_id: Optional[int] = None) -> list[Suggestion]:
diff --git a/ee/clickhouse/materialized_columns/columns.py b/ee/clickhouse/materialized_columns/columns.py
index 00da36d698d4d..3dc21ccde59f6 100644
--- a/ee/clickhouse/materialized_columns/columns.py
+++ b/ee/clickhouse/materialized_columns/columns.py
@@ -200,7 +200,7 @@ def _materialized_column_name(
) -> str:
"Returns a sanitized and unique column name to use for materialized column"
- prefix = "mat_" if table == "events" or table == "groups" else "pmat_"
+ prefix = "pmat_" if table == "person" else "mat_"
if table_column != DEFAULT_TABLE_COLUMN:
prefix += f"{SHORT_TABLE_COLUMN_NAME[table_column]}_"
diff --git a/ee/clickhouse/queries/column_optimizer.py b/ee/clickhouse/queries/column_optimizer.py
index b1bf142aa3d1e..df7873a7ce131 100644
--- a/ee/clickhouse/queries/column_optimizer.py
+++ b/ee/clickhouse/queries/column_optimizer.py
@@ -1,7 +1,6 @@
from collections import Counter as TCounter
from typing import cast
-from posthog.clickhouse.materialized_columns.column import ColumnName
from posthog.constants import TREND_FILTER_TYPE_ACTIONS, FunnelCorrelationType
from posthog.models.action.util import get_action_tables_and_properties
from posthog.models.filters.mixins.utils import cached_property
@@ -24,24 +23,6 @@ def group_types_to_query(self) -> set[GroupTypeIndex]:
used_properties = self.used_properties_with_type("group")
return {cast(GroupTypeIndex, group_type_index) for _, _, group_type_index in used_properties}
- @cached_property
- def group_on_event_columns_to_query(self) -> set[ColumnName]:
- "Returns a list of event table group columns containing materialized properties that this query needs"
- used_properties = self.used_properties_with_type("group")
-
- columns_to_query: set[ColumnName] = set()
-
- for group_type_index in range(5):
- columns_to_query = columns_to_query.union(
- self.columns_to_query(
- "events",
- {property for property in used_properties if property[2] == group_type_index},
- f"group{group_type_index}_properties",
- )
- )
-
- return columns_to_query
-
@cached_property
def properties_used_in_filter(self) -> TCounter[PropertyIdentifier]:
"Returns collection of properties + types that this query would use"
diff --git a/ee/clickhouse/queries/funnels/test/breakdown_cases.py b/ee/clickhouse/queries/funnels/test/breakdown_cases.py
index 7a1b2076776d0..f5f68078620cd 100644
--- a/ee/clickhouse/queries/funnels/test/breakdown_cases.py
+++ b/ee/clickhouse/queries/funnels/test/breakdown_cases.py
@@ -13,7 +13,6 @@
)
from posthog.test.base import (
APIBaseTest,
- also_test_with_materialized_columns,
snapshot_clickhouse_queries,
also_test_with_person_on_events_v2,
)
@@ -307,10 +306,6 @@ def test_funnel_aggregate_by_groups_breakdown_group(self):
],
)
- @also_test_with_materialized_columns(
- group_properties=[(0, "industry")],
- materialize_only_with_person_on_events=True,
- )
@also_test_with_person_on_events_v2
@snapshot_clickhouse_queries
def test_funnel_aggregate_by_groups_breakdown_group_person_on_events(self):
diff --git a/ee/clickhouse/queries/funnels/test/test_funnel_correlation.py b/ee/clickhouse/queries/funnels/test/test_funnel_correlation.py
index 2aa9aafa9a324..979c84d85478f 100644
--- a/ee/clickhouse/queries/funnels/test/test_funnel_correlation.py
+++ b/ee/clickhouse/queries/funnels/test/test_funnel_correlation.py
@@ -819,7 +819,6 @@ def test_funnel_correlation_with_properties_and_groups(self):
@also_test_with_materialized_columns(
event_properties=[],
person_properties=["$browser"],
- group_properties=[(0, "industry")],
verify_no_jsonextract=False,
)
@also_test_with_person_on_events_v2
diff --git a/ee/clickhouse/queries/test/test_column_optimizer.py b/ee/clickhouse/queries/test/test_column_optimizer.py
index 2d2651b6980de..296f3d18b355b 100644
--- a/ee/clickhouse/queries/test/test_column_optimizer.py
+++ b/ee/clickhouse/queries/test/test_column_optimizer.py
@@ -229,20 +229,6 @@ def test_materialized_columns_checks_person_on_events(self):
BASE_FILTER.shallow_clone(
{
"properties": [
- {
- "key": "group_prop",
- "value": ["value"],
- "operator": "exact",
- "type": "group",
- "group_type_index": 2,
- },
- {
- "key": "group_prop",
- "value": ["value"],
- "operator": "exact",
- "type": "group",
- "group_type_index": 0,
- },
{
"key": "person_prop",
"value": ["value"],
@@ -256,97 +242,15 @@ def test_materialized_columns_checks_person_on_events(self):
)
self.assertEqual(optimizer().person_on_event_columns_to_query, {"person_properties"})
- self.assertEqual(
- optimizer().group_on_event_columns_to_query,
- {"group0_properties", "group2_properties"},
- )
- # materialising the props on `person` or `group` table should make no difference
+ # materialising the props on `person` table should make no difference
materialize("person", "person_prop")
- materialize("groups", "group_prop", table_column="group_properties")
self.assertEqual(optimizer().person_on_event_columns_to_query, {"person_properties"})
- self.assertEqual(
- optimizer().group_on_event_columns_to_query,
- {"group0_properties", "group2_properties"},
- )
materialize("events", "person_prop", table_column="person_properties")
- materialize("events", "group_prop", table_column="group0_properties")
self.assertEqual(optimizer().person_on_event_columns_to_query, {"mat_pp_person_prop"})
- self.assertEqual(
- optimizer().group_on_event_columns_to_query,
- {"mat_gp0_group_prop", "group2_properties"},
- )
-
- materialize("events", "group_prop", table_column="group2_properties")
- self.assertEqual(
- optimizer().group_on_event_columns_to_query,
- {"mat_gp0_group_prop", "mat_gp2_group_prop"},
- )
-
- def test_should_query_element_chain_column(self):
- should_query_elements_chain_column = lambda filter: EnterpriseColumnOptimizer(
- filter, self.team.id
- ).should_query_elements_chain_column
-
- self.assertEqual(should_query_elements_chain_column(BASE_FILTER), False)
- self.assertEqual(should_query_elements_chain_column(FILTER_WITH_PROPERTIES), True)
- self.assertEqual(should_query_elements_chain_column(FILTER_WITH_GROUPS), True)
-
- filter = Filter(
- data={
- "events": [
- {
- "id": "$pageview",
- "type": "events",
- "order": 0,
- "properties": PROPERTIES_OF_ALL_TYPES,
- }
- ]
- }
- )
- self.assertEqual(should_query_elements_chain_column(filter), True)
-
- def test_should_query_element_chain_column_with_actions(self):
- action = Action.objects.create(
- team=self.team,
- steps_json=[
- {
- "event": "$autocapture",
- "url": "https://example.com/donate",
- "url_matching": "exact",
- }
- ],
- )
-
- filter = Filter(data={"actions": [{"id": action.id, "math": "dau"}]})
- self.assertEqual(
- EnterpriseColumnOptimizer(filter, self.team.id).should_query_elements_chain_column,
- False,
- )
-
- action.steps = [
- {
- "event": "$autocapture",
- "url": "https://example.com/donate",
- "url_matching": "exact",
- },
- {"event": "$autocapture", "tag_name": "button", "text": "Pay $10"},
- ]
- action.save()
-
- self.assertEqual(
- EnterpriseColumnOptimizer(filter, self.team.id).should_query_elements_chain_column,
- True,
- )
-
- filter = BASE_FILTER.shallow_clone({"exclusions": [{"id": action.id, "type": "actions"}]})
- self.assertEqual(
- EnterpriseColumnOptimizer(filter, self.team.id).should_query_elements_chain_column,
- True,
- )
def test_group_types_to_query(self):
group_types_to_query = lambda filter: EnterpriseColumnOptimizer(filter, self.team.id).group_types_to_query
diff --git a/ee/clickhouse/queries/test/test_paths.py b/ee/clickhouse/queries/test/test_paths.py
index 69f673e4489ca..1a17f578b7eae 100644
--- a/ee/clickhouse/queries/test/test_paths.py
+++ b/ee/clickhouse/queries/test/test_paths.py
@@ -3740,11 +3740,6 @@ def test_groups_filtering(self):
],
)
- @also_test_with_materialized_columns(
- ["$current_url", "$screen_name"],
- group_properties=[(0, "industry"), (1, "industry")],
- materialize_only_with_person_on_events=True,
- )
@snapshot_clickhouse_queries
def test_groups_filtering_person_on_events(self):
self._create_groups()
diff --git a/ee/clickhouse/queries/test/test_retention.py b/ee/clickhouse/queries/test/test_retention.py
index 91354c4e8caf6..45e6503fc2853 100644
--- a/ee/clickhouse/queries/test/test_retention.py
+++ b/ee/clickhouse/queries/test/test_retention.py
@@ -17,7 +17,6 @@
from posthog.test.base import (
APIBaseTest,
ClickhouseTestMixin,
- also_test_with_materialized_columns,
create_person_id_override_by_distinct_id,
snapshot_clickhouse_queries,
)
@@ -233,9 +232,6 @@ def test_groups_in_period(self):
self.assertEqual(actor_result[1]["person"]["id"], "org:6")
self.assertEqual(actor_result[1]["appearances"], [1, 1, 0, 1, 1, 0, 1])
- @also_test_with_materialized_columns(
- group_properties=[(0, "industry")], materialize_only_with_person_on_events=True
- )
@snapshot_clickhouse_queries
def test_groups_filtering_person_on_events(self):
self._create_groups_and_events()
@@ -450,7 +446,6 @@ def test_groups_filtering_person_on_events_v2(self):
],
)
- @also_test_with_materialized_columns(group_properties=[(0, "industry")])
@snapshot_clickhouse_queries
def test_groups_aggregating_person_on_events(self):
self._create_groups_and_events()
@@ -508,7 +503,6 @@ def test_groups_aggregating_person_on_events(self):
],
)
- @also_test_with_materialized_columns(group_properties=[(0, "industry")])
@snapshot_clickhouse_queries
def test_groups_in_period_person_on_events(self):
from posthog.models.team import util
diff --git a/ee/clickhouse/views/test/__snapshots__/test_clickhouse_retention.ambr b/ee/clickhouse/views/test/__snapshots__/test_clickhouse_retention.ambr
index 4a0e871b022e5..174634e37403c 100644
--- a/ee/clickhouse/views/test/__snapshots__/test_clickhouse_retention.ambr
+++ b/ee/clickhouse/views/test/__snapshots__/test_clickhouse_retention.ambr
@@ -227,10 +227,10 @@
(SELECT id
FROM person
WHERE team_id = 2
- AND (NOT (replaceRegexpAll(JSONExtractRaw(properties, 'email'), '^"|"$', '') ILIKE '%posthog.com%')) )
+ AND (NOT ("pmat_email" ILIKE '%posthog.com%')) )
GROUP BY id
HAVING max(is_deleted) = 0
- AND (NOT (replaceRegexpAll(JSONExtractRaw(argMax(person.properties, version), 'email'), '^"|"$', '') ILIKE '%posthog.com%')) SETTINGS optimize_aggregation_in_order = 1) person ON person.id = pdi.person_id
+ AND (NOT (argMax(person."pmat_email", version) ILIKE '%posthog.com%')) SETTINGS optimize_aggregation_in_order = 1) person ON person.id = pdi.person_id
WHERE team_id = 2
AND e.event = 'target event'
AND toDateTime(e.timestamp) >= toDateTime('2020-01-01 00:00:00', 'UTC')
@@ -263,10 +263,10 @@
(SELECT id
FROM person
WHERE team_id = 2
- AND (NOT (replaceRegexpAll(JSONExtractRaw(properties, 'email'), '^"|"$', '') ILIKE '%posthog.com%')) )
+ AND (NOT ("pmat_email" ILIKE '%posthog.com%')) )
GROUP BY id
HAVING max(is_deleted) = 0
- AND (NOT (replaceRegexpAll(JSONExtractRaw(argMax(person.properties, version), 'email'), '^"|"$', '') ILIKE '%posthog.com%')) SETTINGS optimize_aggregation_in_order = 1) person ON person.id = pdi.person_id
+ AND (NOT (argMax(person."pmat_email", version) ILIKE '%posthog.com%')) SETTINGS optimize_aggregation_in_order = 1) person ON person.id = pdi.person_id
WHERE team_id = 2
AND e.event = 'target event'
GROUP BY target
@@ -327,10 +327,10 @@
(SELECT id
FROM person
WHERE team_id = 2
- AND (NOT (replaceRegexpAll(JSONExtractRaw(properties, 'email'), '^"|"$', '') ILIKE '%posthog.com%')) )
+ AND (NOT ("pmat_email" ILIKE '%posthog.com%')) )
GROUP BY id
HAVING max(is_deleted) = 0
- AND (NOT (replaceRegexpAll(JSONExtractRaw(argMax(person.properties, version), 'email'), '^"|"$', '') ILIKE '%posthog.com%')) SETTINGS optimize_aggregation_in_order = 1) person ON person.id = pdi.person_id
+ AND (NOT (argMax(person."pmat_email", version) ILIKE '%posthog.com%')) SETTINGS optimize_aggregation_in_order = 1) person ON person.id = pdi.person_id
WHERE team_id = 2
AND e.event = 'target event'
AND toDateTime(e.timestamp) >= toDateTime('2020-01-01 00:00:00', 'UTC')
@@ -363,10 +363,10 @@
(SELECT id
FROM person
WHERE team_id = 2
- AND (NOT (replaceRegexpAll(JSONExtractRaw(properties, 'email'), '^"|"$', '') ILIKE '%posthog.com%')) )
+ AND (NOT ("pmat_email" ILIKE '%posthog.com%')) )
GROUP BY id
HAVING max(is_deleted) = 0
- AND (NOT (replaceRegexpAll(JSONExtractRaw(argMax(person.properties, version), 'email'), '^"|"$', '') ILIKE '%posthog.com%')) SETTINGS optimize_aggregation_in_order = 1) person ON person.id = pdi.person_id
+ AND (NOT (argMax(person."pmat_email", version) ILIKE '%posthog.com%')) SETTINGS optimize_aggregation_in_order = 1) person ON person.id = pdi.person_id
WHERE team_id = 2
AND e.event = 'target event'
GROUP BY target
@@ -423,10 +423,10 @@
(SELECT id
FROM person
WHERE team_id = 2
- AND (NOT (replaceRegexpAll(JSONExtractRaw(properties, 'email'), '^"|"$', '') ILIKE '%posthog.com%')) )
+ AND (NOT ("pmat_email" ILIKE '%posthog.com%')) )
GROUP BY id
HAVING max(is_deleted) = 0
- AND (NOT (replaceRegexpAll(JSONExtractRaw(argMax(person.properties, version), 'email'), '^"|"$', '') ILIKE '%posthog.com%')) SETTINGS optimize_aggregation_in_order = 1) person ON person.id = pdi.person_id
+ AND (NOT (argMax(person."pmat_email", version) ILIKE '%posthog.com%')) SETTINGS optimize_aggregation_in_order = 1) person ON person.id = pdi.person_id
WHERE team_id = 2
AND e.event = 'target event'
AND toDateTime(e.timestamp) >= toDateTime('2020-01-01 00:00:00', 'UTC')
@@ -459,10 +459,10 @@
(SELECT id
FROM person
WHERE team_id = 2
- AND (NOT (replaceRegexpAll(JSONExtractRaw(properties, 'email'), '^"|"$', '') ILIKE '%posthog.com%')) )
+ AND (NOT ("pmat_email" ILIKE '%posthog.com%')) )
GROUP BY id
HAVING max(is_deleted) = 0
- AND (NOT (replaceRegexpAll(JSONExtractRaw(argMax(person.properties, version), 'email'), '^"|"$', '') ILIKE '%posthog.com%')) SETTINGS optimize_aggregation_in_order = 1) person ON person.id = pdi.person_id
+ AND (NOT (argMax(person."pmat_email", version) ILIKE '%posthog.com%')) SETTINGS optimize_aggregation_in_order = 1) person ON person.id = pdi.person_id
WHERE team_id = 2
AND e.event = 'target event'
GROUP BY target
diff --git a/ee/clickhouse/views/test/funnel/test_clickhouse_funnel_person.py b/ee/clickhouse/views/test/funnel/test_clickhouse_funnel_person.py
index 260c1ef6e1767..a230df5918950 100644
--- a/ee/clickhouse/views/test/funnel/test_clickhouse_funnel_person.py
+++ b/ee/clickhouse/views/test/funnel/test_clickhouse_funnel_person.py
@@ -51,7 +51,6 @@ def _create_sample_data(self, num, delete=False):
team=self.team,
timestamp="2021-05-05 00:00:00",
properties={"$browser": "Chrome", "$group_0": "g0"},
- group0_properties={"name": "g0"},
)
if delete:
person.delete()
diff --git a/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-breakdown-edit--light.png b/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-breakdown-edit--light.png
index 5f6bbab56ee34..664c0d103c72e 100644
Binary files a/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-breakdown-edit--light.png and b/frontend/__snapshots__/scenes-app-insights--funnel-top-to-bottom-breakdown-edit--light.png differ
diff --git a/frontend/__snapshots__/scenes-app-pipeline--pipeline-node-logs--dark.png b/frontend/__snapshots__/scenes-app-pipeline--pipeline-node-logs--dark.png
index 4f4f10f435fca..d023908198ae1 100644
Binary files a/frontend/__snapshots__/scenes-app-pipeline--pipeline-node-logs--dark.png and b/frontend/__snapshots__/scenes-app-pipeline--pipeline-node-logs--dark.png differ
diff --git a/frontend/__snapshots__/scenes-app-pipeline--pipeline-node-logs--light.png b/frontend/__snapshots__/scenes-app-pipeline--pipeline-node-logs--light.png
index fa333ce9cd387..009d03f7e7dca 100644
Binary files a/frontend/__snapshots__/scenes-app-pipeline--pipeline-node-logs--light.png and b/frontend/__snapshots__/scenes-app-pipeline--pipeline-node-logs--light.png differ
diff --git a/frontend/__snapshots__/scenes-app-pipeline--pipeline-node-logs-batch-export--dark.png b/frontend/__snapshots__/scenes-app-pipeline--pipeline-node-logs-batch-export--dark.png
index d368a3388deec..2a5f9525df9b0 100644
Binary files a/frontend/__snapshots__/scenes-app-pipeline--pipeline-node-logs-batch-export--dark.png and b/frontend/__snapshots__/scenes-app-pipeline--pipeline-node-logs-batch-export--dark.png differ
diff --git a/frontend/__snapshots__/scenes-app-pipeline--pipeline-node-logs-batch-export--light.png b/frontend/__snapshots__/scenes-app-pipeline--pipeline-node-logs-batch-export--light.png
index 37993b37f4551..1ab4188bfbec0 100644
Binary files a/frontend/__snapshots__/scenes-app-pipeline--pipeline-node-logs-batch-export--light.png and b/frontend/__snapshots__/scenes-app-pipeline--pipeline-node-logs-batch-export--light.png differ
diff --git a/frontend/__snapshots__/scenes-app-sessionattributionexplorer--session-attribution-explorer--dark.png b/frontend/__snapshots__/scenes-app-sessionattributionexplorer--session-attribution-explorer--dark.png
new file mode 100644
index 0000000000000..66a8c19d82e13
Binary files /dev/null and b/frontend/__snapshots__/scenes-app-sessionattributionexplorer--session-attribution-explorer--dark.png differ
diff --git a/frontend/__snapshots__/scenes-app-sessionattributionexplorer--session-attribution-explorer--light.png b/frontend/__snapshots__/scenes-app-sessionattributionexplorer--session-attribution-explorer--light.png
new file mode 100644
index 0000000000000..2cc8007742c86
Binary files /dev/null and b/frontend/__snapshots__/scenes-app-sessionattributionexplorer--session-attribution-explorer--light.png differ
diff --git a/frontend/__snapshots__/scenes-app-surveys--new-multi-question-survey-section--dark.png b/frontend/__snapshots__/scenes-app-surveys--new-multi-question-survey-section--dark.png
index d1cca86851882..ef426b28d765c 100644
Binary files a/frontend/__snapshots__/scenes-app-surveys--new-multi-question-survey-section--dark.png and b/frontend/__snapshots__/scenes-app-surveys--new-multi-question-survey-section--dark.png differ
diff --git a/frontend/__snapshots__/scenes-app-surveys--new-multi-question-survey-section--light.png b/frontend/__snapshots__/scenes-app-surveys--new-multi-question-survey-section--light.png
index 9e53d3e7ab24e..ac0ec1971e9a9 100644
Binary files a/frontend/__snapshots__/scenes-app-surveys--new-multi-question-survey-section--light.png and b/frontend/__snapshots__/scenes-app-surveys--new-multi-question-survey-section--light.png differ
diff --git a/frontend/__snapshots__/scenes-app-surveys--new-survey--dark.png b/frontend/__snapshots__/scenes-app-surveys--new-survey--dark.png
index d1cca86851882..ef426b28d765c 100644
Binary files a/frontend/__snapshots__/scenes-app-surveys--new-survey--dark.png and b/frontend/__snapshots__/scenes-app-surveys--new-survey--dark.png differ
diff --git a/frontend/__snapshots__/scenes-app-surveys--new-survey--light.png b/frontend/__snapshots__/scenes-app-surveys--new-survey--light.png
index 9e53d3e7ab24e..ac0ec1971e9a9 100644
Binary files a/frontend/__snapshots__/scenes-app-surveys--new-survey--light.png and b/frontend/__snapshots__/scenes-app-surveys--new-survey--light.png differ
diff --git a/frontend/__snapshots__/scenes-app-surveys--new-survey-with-html-question-description--dark.png b/frontend/__snapshots__/scenes-app-surveys--new-survey-with-html-question-description--dark.png
index c113cbaa5f8ff..b8505b8953a15 100644
Binary files a/frontend/__snapshots__/scenes-app-surveys--new-survey-with-html-question-description--dark.png and b/frontend/__snapshots__/scenes-app-surveys--new-survey-with-html-question-description--dark.png differ
diff --git a/frontend/__snapshots__/scenes-app-surveys--new-survey-with-html-question-description--light.png b/frontend/__snapshots__/scenes-app-surveys--new-survey-with-html-question-description--light.png
index cd120ab69019d..b3a45d014e8ea 100644
Binary files a/frontend/__snapshots__/scenes-app-surveys--new-survey-with-html-question-description--light.png and b/frontend/__snapshots__/scenes-app-surveys--new-survey-with-html-question-description--light.png differ
diff --git a/frontend/__snapshots__/scenes-app-surveys--new-survey-with-text-question-description-that-does-not-render-html--dark.png b/frontend/__snapshots__/scenes-app-surveys--new-survey-with-text-question-description-that-does-not-render-html--dark.png
index fa884f178fed5..d147deffc9e79 100644
Binary files a/frontend/__snapshots__/scenes-app-surveys--new-survey-with-text-question-description-that-does-not-render-html--dark.png and b/frontend/__snapshots__/scenes-app-surveys--new-survey-with-text-question-description-that-does-not-render-html--dark.png differ
diff --git a/frontend/__snapshots__/scenes-app-surveys--new-survey-with-text-question-description-that-does-not-render-html--light.png b/frontend/__snapshots__/scenes-app-surveys--new-survey-with-text-question-description-that-does-not-render-html--light.png
index d6eb10878900e..a7760e75771e4 100644
Binary files a/frontend/__snapshots__/scenes-app-surveys--new-survey-with-text-question-description-that-does-not-render-html--light.png and b/frontend/__snapshots__/scenes-app-surveys--new-survey-with-text-question-description-that-does-not-render-html--light.png differ
diff --git a/frontend/src/lib/api.ts b/frontend/src/lib/api.ts
index 06dbd4a6f50b5..c4ed2014b02eb 100644
--- a/frontend/src/lib/api.ts
+++ b/frontend/src/lib/api.ts
@@ -14,7 +14,6 @@ import {
ActivityScope,
AlertType,
BatchExportConfiguration,
- BatchExportLogEntry,
BatchExportRun,
CohortType,
CommentType,
@@ -34,6 +33,7 @@ import {
EventType,
Experiment,
ExportedAssetType,
+ ExternalDataJob,
ExternalDataSourceCreatePayload,
ExternalDataSourceSchema,
ExternalDataSourceSyncSchema,
@@ -51,6 +51,7 @@ import {
IntegrationType,
ListOrganizationMembersParams,
LogEntry,
+ LogEntryRequestParams,
MediaUploadResponse,
NewEarlyAccessFeatureType,
NotebookListItemType,
@@ -323,10 +324,6 @@ class ApiRequest {
return this.pluginConfigs(teamId).addPathComponent(id)
}
- public pluginLogs(pluginConfigId: number, teamId?: TeamType['id']): ApiRequest {
- return this.pluginConfig(pluginConfigId, teamId).addPathComponent('logs')
- }
-
public hogFunctions(teamId?: TeamType['id']): ApiRequest {
return this.projectsDetail(teamId).addPathComponent('hog_functions')
}
@@ -753,10 +750,6 @@ class ApiRequest {
return this.batchExports(teamId).addPathComponent(id)
}
- public batchExportLogs(id: BatchExportConfiguration['id'], teamId?: TeamType['id']): ApiRequest {
- return this.batchExport(id, teamId).addPathComponent('logs')
- }
-
public batchExportRuns(id: BatchExportConfiguration['id'], teamId?: TeamType['id']): ApiRequest {
return this.batchExports(teamId).addPathComponent(id).addPathComponent('runs')
}
@@ -769,14 +762,6 @@ class ApiRequest {
return this.batchExportRuns(id, teamId).addPathComponent(runId)
}
- public batchExportRunLogs(
- id: BatchExportConfiguration['id'],
- runId: BatchExportRun['id'],
- teamId?: TeamType['id']
- ): ApiRequest {
- return this.batchExportRun(id, runId, teamId).addPathComponent('logs')
- }
-
// External Data Source
public externalDataSources(teamId?: TeamType['id']): ApiRequest {
return this.projectsDetail(teamId).addPathComponent('external_data_sources')
@@ -1574,85 +1559,34 @@ const api = {
async list(): Promise> {
return await new ApiRequest().pluginConfigs().get()
},
- },
-
- pluginLogs: {
- async search(
- pluginConfigId: number,
- searchTerm: string | null = null,
- typeFilters: CheckboxValueType[] = [],
- trailingEntry: PluginLogEntry | null = null,
- leadingEntry: PluginLogEntry | null = null
- ): Promise {
- const params = toParams(
- {
- limit: LOGS_PORTION_LIMIT,
- type_filter: typeFilters,
- search: searchTerm || undefined,
- before: trailingEntry?.timestamp,
- after: leadingEntry?.timestamp,
- },
- true
- )
-
- const response = await new ApiRequest().pluginLogs(pluginConfigId).withQueryString(params).get()
-
- return response.results
- },
- },
-
- batchExportLogs: {
- async search(
- batchExportId: string,
- searchTerm: string | null = null,
- typeFilters: CheckboxValueType[] = [],
- trailingEntry: BatchExportLogEntry | null = null,
- leadingEntry: BatchExportLogEntry | null = null
- ): Promise {
- const params = toParams(
- {
- limit: LOGS_PORTION_LIMIT,
- level_filter: typeFilters,
- search: searchTerm || undefined,
- before: trailingEntry?.timestamp,
- after: leadingEntry?.timestamp,
- },
- true
- )
-
- const response = await new ApiRequest().batchExportLogs(batchExportId).withQueryString(params).get()
-
- return response.results
- },
- },
-
- batchExportRunLogs: {
- async search(
- batchExportId: string,
- batchExportRunId: string,
- currentTeamId: number | null,
- searchTerm: string | null = null,
- typeFilters: CheckboxValueType[] = [],
- trailingEntry: BatchExportLogEntry | null = null,
- leadingEntry: BatchExportLogEntry | null = null
- ): Promise {
- const params = toParams(
- {
- limit: LOGS_PORTION_LIMIT,
- type_filter: typeFilters,
- search: searchTerm || undefined,
- before: trailingEntry?.timestamp,
- after: leadingEntry?.timestamp,
- },
- true
- )
-
+ async logs(pluginConfigId: number, params: LogEntryRequestParams): Promise {
+ const levels = (params.level?.split(',') ?? []).filter((x) => x !== 'WARNING')
const response = await new ApiRequest()
- .batchExportRunLogs(batchExportId, batchExportRunId, currentTeamId || undefined)
- .withQueryString(params)
+ .pluginConfig(pluginConfigId)
+ .withAction('logs')
+ .withQueryString(
+ toParams(
+ {
+ limit: LOGS_PORTION_LIMIT,
+ type_filter: levels,
+ search: params.search,
+ before: params.before,
+ after: params.after,
+ },
+ true
+ )
+ )
.get()
- return response.results
+ const results = response.results.map((entry: PluginLogEntry) => ({
+ log_source_id: `${entry.plugin_config_id}`,
+ instance_id: entry.source,
+ timestamp: entry.timestamp,
+ level: entry.type,
+ message: entry.message,
+ }))
+
+ return results
},
},
@@ -1669,9 +1603,9 @@ const api = {
async update(id: HogFunctionType['id'], data: Partial): Promise {
return await new ApiRequest().hogFunction(id).update({ data })
},
- async searchLogs(
+ async logs(
id: HogFunctionType['id'],
- params: Record = {}
+ params: LogEntryRequestParams = {}
): Promise> {
return await new ApiRequest().hogFunction(id).withAction('logs').withQueryString(params).get()
},
@@ -1942,6 +1876,12 @@ const api = {
): Promise {
return await new ApiRequest().batchExport(id).withAction('backfill').create({ data })
},
+ async logs(
+ id: BatchExportConfiguration['id'],
+ params: LogEntryRequestParams = {}
+ ): Promise> {
+ return await new ApiRequest().batchExport(id).withAction('logs').withQueryString(params).get()
+ },
},
earlyAccessFeatures: {
@@ -2033,11 +1973,13 @@ const api = {
return await new ApiRequest().dataWarehouseSavedQuery(viewId).update({ data })
},
},
-
externalDataSources: {
async list(options?: ApiMethodOptions | undefined): Promise> {
return await new ApiRequest().externalDataSources().get(options)
},
+ async get(sourceId: ExternalDataStripeSource['id']): Promise {
+ return await new ApiRequest().externalDataSource(sourceId).get()
+ },
async create(data: Partial): Promise<{ id: string }> {
return await new ApiRequest().externalDataSources().create({ data })
},
@@ -2071,6 +2013,9 @@ const api = {
.withAction('source_prefix')
.create({ data: { source_type, prefix } })
},
+ async jobs(sourceId: ExternalDataStripeSource['id']): Promise {
+ return await new ApiRequest().externalDataSource(sourceId).withAction('jobs').get()
+ },
},
externalDataSchemas: {
diff --git a/frontend/src/lib/components/Playlist/Playlist.scss b/frontend/src/lib/components/Playlist/Playlist.scss
index e578c52028a86..5f6ab75a144b0 100644
--- a/frontend/src/lib/components/Playlist/Playlist.scss
+++ b/frontend/src/lib/components/Playlist/Playlist.scss
@@ -51,7 +51,7 @@
.SessionRecordingPlaylistHeightWrapper {
// NOTE: Somewhat random way to offset the various headers and tabs above the playlist
- height: calc(100vh - 9rem);
+ height: calc(100vh - 15rem);
min-height: 41rem;
}
diff --git a/frontend/src/lib/constants.tsx b/frontend/src/lib/constants.tsx
index 4a03e5398a119..12ffe885a0196 100644
--- a/frontend/src/lib/constants.tsx
+++ b/frontend/src/lib/constants.tsx
@@ -206,7 +206,6 @@ export const FEATURE_FLAGS = {
ALERTS: 'alerts', // owner: github.com/nikitaevg
ERROR_TRACKING: 'error-tracking', // owner: #team-replay
SETTINGS_BOUNCE_RATE_PAGE_VIEW_MODE: 'settings-bounce-rate-page-view-mode', // owner: @robbie-c
- SURVEYS_BRANCHING_LOGIC: 'surveys-branching-logic', // owner: @jurajmajerik #team-feature-success
MULTIPLE_BREAKDOWNS: 'multiple-breakdowns', // owner: @skoob13 #team-product-analytics
WEB_ANALYTICS_LIVE_USER_COUNT: 'web-analytics-live-user-count', // owner: @robbie-c
SETTINGS_SESSION_TABLE_VERSION: 'settings-session-table-version', // owner: @robbie-c
diff --git a/frontend/src/lib/lemon-ui/LemonCollapse/LemonCollapse.tsx b/frontend/src/lib/lemon-ui/LemonCollapse/LemonCollapse.tsx
index 96e8105c60133..32b569226dcaa 100644
--- a/frontend/src/lib/lemon-ui/LemonCollapse/LemonCollapse.tsx
+++ b/frontend/src/lib/lemon-ui/LemonCollapse/LemonCollapse.tsx
@@ -95,6 +95,7 @@ interface LemonCollapsePanelProps {
size: LemonButtonProps['size']
onChange: (isExpanded: boolean) => void
className?: string
+ dataAttr?: string
}
function LemonCollapsePanel({
@@ -103,6 +104,7 @@ function LemonCollapsePanel({
isExpanded,
size,
className,
+ dataAttr,
onChange,
}: LemonCollapsePanelProps): JSX.Element {
const { height: contentHeight, ref: contentRef } = useResizeObserver({ box: 'border-box' })
@@ -113,6 +115,7 @@ function LemonCollapsePanel({
onClick={() => onChange(!isExpanded)}
icon={isExpanded ? : }
className="LemonCollapsePanel__header"
+ {...(dataAttr ? { 'data-attr': dataAttr } : {})}
size={size}
>
{header}
diff --git a/frontend/src/queries/nodes/DataNode/DateRange.tsx b/frontend/src/queries/nodes/DataNode/DateRange.tsx
index 5691eee8f1ae2..af3a7bc92af39 100644
--- a/frontend/src/queries/nodes/DataNode/DateRange.tsx
+++ b/frontend/src/queries/nodes/DataNode/DateRange.tsx
@@ -1,13 +1,13 @@
import { DateFilter } from 'lib/components/DateFilter/DateFilter'
-import { EventsQuery, HogQLQuery } from '~/queries/schema'
-import { isEventsQuery, isHogQLQuery } from '~/queries/utils'
+import { EventsQuery, HogQLQuery, SessionAttributionExplorerQuery } from '~/queries/schema'
+import { isEventsQuery, isHogQLQuery, isSessionAttributionExplorerQuery } from '~/queries/utils'
-interface DateRangeProps {
+interface DateRangeProps {
query: Q
setQuery?: (query: Q) => void
}
-export function DateRange({
+export function DateRange({
query,
setQuery,
}: DateRangeProps): JSX.Element | null {
@@ -27,7 +27,7 @@ export function DateRange({
/>
)
}
- if (isHogQLQuery(query)) {
+ if (isHogQLQuery(query) || isSessionAttributionExplorerQuery(query)) {
return (
!query.hiddenColumns?.includes(column.dataIndex) && column.dataIndex !== '*')
const setQuerySource = useCallback(
- (source: EventsNode | EventsQuery | PersonsNode | ActorsQuery | HogQLQuery) => setQuery?.({ ...query, source }),
+ (source: EventsNode | EventsQuery | PersonsNode | ActorsQuery | HogQLQuery | SessionAttributionExplorerQuery) =>
+ setQuery?.({ ...query, source }),
[setQuery]
)
@@ -404,7 +406,11 @@ export function DataTable({ uniqueKey, query, setQuery, context, cachedResults }
/>
) : null,
showDateRange && sourceFeatures.has(QueryFeature.dateRangePicker) ? (
-
+
) : null,
showEventFilter && sourceFeatures.has(QueryFeature.eventNameFilter) ? (
@@ -415,7 +421,7 @@ export function DataTable({ uniqueKey, query, setQuery, context, cachedResults }
showPropertyFilter && sourceFeatures.has(QueryFeature.eventPropertyFilters) ? (
diff --git a/frontend/src/queries/nodes/DataTable/queryFeatures.ts b/frontend/src/queries/nodes/DataTable/queryFeatures.ts
index 4a6ae92296559..c5642f1a82c5f 100644
--- a/frontend/src/queries/nodes/DataTable/queryFeatures.ts
+++ b/frontend/src/queries/nodes/DataTable/queryFeatures.ts
@@ -4,6 +4,7 @@ import {
isEventsQuery,
isHogQLQuery,
isPersonsNode,
+ isSessionAttributionExplorerQuery,
isWebOverviewQuery,
isWebStatsTableQuery,
isWebTopClicksQuery,
@@ -29,7 +30,7 @@ export enum QueryFeature {
export function getQueryFeatures(query: Node): Set {
const features = new Set()
- if (isHogQLQuery(query) || isEventsQuery(query)) {
+ if (isHogQLQuery(query) || isEventsQuery(query) || isSessionAttributionExplorerQuery(query)) {
features.add(QueryFeature.dateRangePicker)
features.add(QueryFeature.columnsInResponse)
features.add(QueryFeature.eventPropertyFilters)
diff --git a/frontend/src/queries/nodes/DataTable/renderColumn.tsx b/frontend/src/queries/nodes/DataTable/renderColumn.tsx
index 9ad09e14d7642..5eddb88cba390 100644
--- a/frontend/src/queries/nodes/DataTable/renderColumn.tsx
+++ b/frontend/src/queries/nodes/DataTable/renderColumn.tsx
@@ -229,10 +229,14 @@ export function renderColumn(
} else if (key.startsWith('context.columns.')) {
const columnName = trimQuotes(key.substring(16)) // 16 = "context.columns.".length
const Component = context?.columns?.[columnName]?.render
- return Component ? : ''
+ return Component ? (
+
+ ) : (
+ String(value)
+ )
} else if (context?.columns?.[key]) {
const Component = context?.columns?.[key]?.render
- return Component ? : ''
+ return Component ? : String(value)
} else if (key === 'id' && (isPersonsNode(query.source) || isActorsQuery(query.source))) {
return (
{
+interface EventPropertyFiltersProps {
query: Q
setQuery?: (query: Q) => void
taxonomicGroupTypes?: TaxonomicFilterGroupType[]
}
let uniqueNode = 0
-export function EventPropertyFilters({
- query,
- setQuery,
- taxonomicGroupTypes,
-}: EventPropertyFiltersProps): JSX.Element {
+export function EventPropertyFilters<
+ Q extends EventsNode | EventsQuery | HogQLQuery | SessionAttributionExplorerQuery
+>({ query, setQuery, taxonomicGroupTypes }: EventPropertyFiltersProps): JSX.Element {
const [id] = useState(() => uniqueNode++)
- const properties = isHogQLQuery(query) ? query.filters?.properties : query.properties
- const eventNames = isHogQLQuery(query) ? [] : query.event ? [query.event] : []
+ const properties =
+ isHogQLQuery(query) || isSessionAttributionExplorerQuery(query) ? query.filters?.properties : query.properties
+ const eventNames =
+ isHogQLQuery(query) || isSessionAttributionExplorerQuery(query) ? [] : query.event ? [query.event] : []
return !properties || Array.isArray(properties) ? (
{
- if (isHogQLQuery(query)) {
+ if (isHogQLQuery(query) || isSessionAttributionExplorerQuery(query)) {
setQuery?.({ ...query, filters: { ...(query.filters ?? {}), properties: value } })
} else {
setQuery?.({ ...query, properties: value })
diff --git a/frontend/src/queries/schema.json b/frontend/src/queries/schema.json
index 7d1b44300637b..86509d63ccd4a 100644
--- a/frontend/src/queries/schema.json
+++ b/frontend/src/queries/schema.json
@@ -225,6 +225,9 @@
},
{
"$ref": "#/definitions/WebTopClicksQuery"
+ },
+ {
+ "$ref": "#/definitions/SessionAttributionExplorerQuery"
}
]
},
@@ -1372,6 +1375,86 @@
],
"type": "object"
},
+ "CachedSessionAttributionExplorerQueryResponse": {
+ "additionalProperties": false,
+ "properties": {
+ "cache_key": {
+ "type": "string"
+ },
+ "cache_target_age": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "calculation_trigger": {
+ "description": "What triggered the calculation of the query, leave empty if user/immediate",
+ "type": "string"
+ },
+ "columns": {
+ "items": {},
+ "type": "array"
+ },
+ "error": {
+ "description": "Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise.",
+ "type": "string"
+ },
+ "hasMore": {
+ "type": "boolean"
+ },
+ "hogql": {
+ "description": "Generated HogQL query.",
+ "type": "string"
+ },
+ "is_cached": {
+ "type": "boolean"
+ },
+ "last_refresh": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "limit": {
+ "type": "integer"
+ },
+ "modifiers": {
+ "$ref": "#/definitions/HogQLQueryModifiers",
+ "description": "Modifiers used when performing the query"
+ },
+ "next_allowed_client_refresh": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "offset": {
+ "type": "integer"
+ },
+ "query_status": {
+ "$ref": "#/definitions/QueryStatus",
+ "description": "Query status indicates whether next to the provided data, a query is still running."
+ },
+ "results": {},
+ "timezone": {
+ "type": "string"
+ },
+ "timings": {
+ "description": "Measured timings for different parts of the query generation process",
+ "items": {
+ "$ref": "#/definitions/QueryTiming"
+ },
+ "type": "array"
+ },
+ "types": {
+ "items": {},
+ "type": "array"
+ }
+ },
+ "required": [
+ "cache_key",
+ "is_cached",
+ "last_refresh",
+ "next_allowed_client_refresh",
+ "results",
+ "timezone"
+ ],
+ "type": "object"
+ },
"CachedSessionsTimelineQueryResponse": {
"additionalProperties": false,
"properties": {
@@ -2289,6 +2372,50 @@
},
"required": ["results"],
"type": "object"
+ },
+ {
+ "additionalProperties": false,
+ "properties": {
+ "columns": {
+ "items": {},
+ "type": "array"
+ },
+ "error": {
+ "description": "Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise.",
+ "type": "string"
+ },
+ "hasMore": {
+ "type": "boolean"
+ },
+ "hogql": {
+ "description": "Generated HogQL query.",
+ "type": "string"
+ },
+ "limit": {
+ "type": "integer"
+ },
+ "modifiers": {
+ "$ref": "#/definitions/HogQLQueryModifiers",
+ "description": "Modifiers used when performing the query"
+ },
+ "offset": {
+ "type": "integer"
+ },
+ "results": {},
+ "timings": {
+ "description": "Measured timings for different parts of the query generation process",
+ "items": {
+ "$ref": "#/definitions/QueryTiming"
+ },
+ "type": "array"
+ },
+ "types": {
+ "items": {},
+ "type": "array"
+ }
+ },
+ "required": ["results"],
+ "type": "object"
}
]
},
@@ -2391,6 +2518,9 @@
},
{
"$ref": "#/definitions/WebTopClicksQuery"
+ },
+ {
+ "$ref": "#/definitions/SessionAttributionExplorerQuery"
}
],
"description": "Source of the events"
@@ -5380,6 +5510,7 @@
"FunnelsActorsQuery",
"FunnelCorrelationActorsQuery",
"SessionsTimelineQuery",
+ "SessionAttributionExplorerQuery",
"DataTableNode",
"DataVisualizationNode",
"SavedInsightNode",
@@ -6371,6 +6502,50 @@
"required": ["results"],
"type": "object"
},
+ {
+ "additionalProperties": false,
+ "properties": {
+ "columns": {
+ "items": {},
+ "type": "array"
+ },
+ "error": {
+ "description": "Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise.",
+ "type": "string"
+ },
+ "hasMore": {
+ "type": "boolean"
+ },
+ "hogql": {
+ "description": "Generated HogQL query.",
+ "type": "string"
+ },
+ "limit": {
+ "type": "integer"
+ },
+ "modifiers": {
+ "$ref": "#/definitions/HogQLQueryModifiers",
+ "description": "Modifiers used when performing the query"
+ },
+ "offset": {
+ "type": "integer"
+ },
+ "results": {},
+ "timings": {
+ "description": "Measured timings for different parts of the query generation process",
+ "items": {
+ "$ref": "#/definitions/QueryTiming"
+ },
+ "type": "array"
+ },
+ "types": {
+ "items": {},
+ "type": "array"
+ }
+ },
+ "required": ["results"],
+ "type": "object"
+ },
{
"properties": {},
"type": "object"
@@ -6685,6 +6860,50 @@
"required": ["results"],
"type": "object"
},
+ {
+ "additionalProperties": false,
+ "properties": {
+ "columns": {
+ "items": {},
+ "type": "array"
+ },
+ "error": {
+ "description": "Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise.",
+ "type": "string"
+ },
+ "hasMore": {
+ "type": "boolean"
+ },
+ "hogql": {
+ "description": "Generated HogQL query.",
+ "type": "string"
+ },
+ "limit": {
+ "type": "integer"
+ },
+ "modifiers": {
+ "$ref": "#/definitions/HogQLQueryModifiers",
+ "description": "Modifiers used when performing the query"
+ },
+ "offset": {
+ "type": "integer"
+ },
+ "results": {},
+ "timings": {
+ "description": "Measured timings for different parts of the query generation process",
+ "items": {
+ "$ref": "#/definitions/QueryTiming"
+ },
+ "type": "array"
+ },
+ "types": {
+ "items": {},
+ "type": "array"
+ }
+ },
+ "required": ["results"],
+ "type": "object"
+ },
{
"additionalProperties": false,
"properties": {
@@ -7001,6 +7220,9 @@
{
"$ref": "#/definitions/WebTopClicksQuery"
},
+ {
+ "$ref": "#/definitions/SessionAttributionExplorerQuery"
+ },
{
"$ref": "#/definitions/DataVisualizationNode"
},
@@ -7557,6 +7779,99 @@
"required": ["kind", "shortId"],
"type": "object"
},
+ "SessionAttributionExplorerQuery": {
+ "additionalProperties": false,
+ "properties": {
+ "filters": {
+ "additionalProperties": false,
+ "properties": {
+ "dateRange": {
+ "$ref": "#/definitions/DateRange"
+ },
+ "properties": {
+ "items": {
+ "$ref": "#/definitions/SessionPropertyFilter"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
+ "groupBy": {
+ "items": {
+ "$ref": "#/definitions/SessionAttributionGroupBy"
+ },
+ "type": "array"
+ },
+ "kind": {
+ "const": "SessionAttributionExplorerQuery",
+ "type": "string"
+ },
+ "limit": {
+ "type": "integer"
+ },
+ "modifiers": {
+ "$ref": "#/definitions/HogQLQueryModifiers",
+ "description": "Modifiers used when performing the query"
+ },
+ "offset": {
+ "type": "integer"
+ },
+ "response": {
+ "$ref": "#/definitions/SessionAttributionExplorerQueryResponse"
+ }
+ },
+ "required": ["groupBy", "kind"],
+ "type": "object"
+ },
+ "SessionAttributionExplorerQueryResponse": {
+ "additionalProperties": false,
+ "properties": {
+ "columns": {
+ "items": {},
+ "type": "array"
+ },
+ "error": {
+ "description": "Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise.",
+ "type": "string"
+ },
+ "hasMore": {
+ "type": "boolean"
+ },
+ "hogql": {
+ "description": "Generated HogQL query.",
+ "type": "string"
+ },
+ "limit": {
+ "type": "integer"
+ },
+ "modifiers": {
+ "$ref": "#/definitions/HogQLQueryModifiers",
+ "description": "Modifiers used when performing the query"
+ },
+ "offset": {
+ "type": "integer"
+ },
+ "results": {},
+ "timings": {
+ "description": "Measured timings for different parts of the query generation process",
+ "items": {
+ "$ref": "#/definitions/QueryTiming"
+ },
+ "type": "array"
+ },
+ "types": {
+ "items": {},
+ "type": "array"
+ }
+ },
+ "required": ["results"],
+ "type": "object"
+ },
+ "SessionAttributionGroupBy": {
+ "enum": ["ChannelType", "Medium", "Source", "Campaign", "AdIds", "ReferringDomain", "InitialURL"],
+ "type": "string"
+ },
"SessionPropertyFilter": {
"additionalProperties": false,
"properties": {
diff --git a/frontend/src/queries/schema.ts b/frontend/src/queries/schema.ts
index 40ef1076b7305..164ae8bd33536 100644
--- a/frontend/src/queries/schema.ts
+++ b/frontend/src/queries/schema.ts
@@ -63,6 +63,7 @@ export enum NodeKind {
FunnelsActorsQuery = 'FunnelsActorsQuery',
FunnelCorrelationActorsQuery = 'FunnelCorrelationActorsQuery',
SessionsTimelineQuery = 'SessionsTimelineQuery',
+ SessionAttributionExplorerQuery = 'SessionAttributionExplorerQuery',
// Interface nodes
DataTableNode = 'DataTableNode',
@@ -105,6 +106,7 @@ export type AnyDataNode =
| WebOverviewQuery
| WebStatsTableQuery
| WebTopClicksQuery
+ | SessionAttributionExplorerQuery
/**
* @discriminator kind
@@ -127,6 +129,7 @@ export type QuerySchema =
| WebOverviewQuery
| WebStatsTableQuery
| WebTopClicksQuery
+ | SessionAttributionExplorerQuery
// Interface nodes
| DataVisualizationNode
@@ -512,6 +515,7 @@ export interface DataTableNode
| WebOverviewQuery
| WebStatsTableQuery
| WebTopClicksQuery
+ | SessionAttributionExplorerQuery
)['response']
>
>,
@@ -527,6 +531,7 @@ export interface DataTableNode
| WebOverviewQuery
| WebStatsTableQuery
| WebTopClicksQuery
+ | SessionAttributionExplorerQuery
/** Columns shown in the table, unless the `source` provides them. */
columns?: HogQLExpression[]
@@ -1229,6 +1234,35 @@ export interface WebStatsTableQueryResponse extends AnalyticsQueryResponseBase
+export enum SessionAttributionGroupBy {
+ ChannelType = 'ChannelType',
+ Medium = 'Medium',
+ Source = 'Source',
+ Campaign = 'Campaign',
+ AdIds = 'AdIds',
+ ReferringDomain = 'ReferringDomain',
+ InitialURL = 'InitialURL',
+}
+export interface SessionAttributionExplorerQuery extends DataNode {
+ kind: NodeKind.SessionAttributionExplorerQuery
+ groupBy: SessionAttributionGroupBy[]
+ filters?: {
+ properties?: SessionPropertyFilter[]
+ dateRange?: DateRange
+ }
+ limit?: integer
+ offset?: integer
+}
+
+export interface SessionAttributionExplorerQueryResponse extends AnalyticsQueryResponseBase {
+ hasMore?: boolean
+ limit?: integer
+ offset?: integer
+ types?: unknown[]
+ columns?: unknown[]
+}
+export type CachedSessionAttributionExplorerQueryResponse = CachedQueryResponse
+
export type InsightQueryNode =
| TrendsQuery
| FunnelsQuery
diff --git a/frontend/src/queries/utils.ts b/frontend/src/queries/utils.ts
index a059f585ae925..05e42c680b0e2 100644
--- a/frontend/src/queries/utils.ts
+++ b/frontend/src/queries/utils.ts
@@ -32,6 +32,7 @@ import {
PersonsNode,
RetentionQuery,
SavedInsightNode,
+ SessionAttributionExplorerQuery,
StickinessQuery,
TrendsQuery,
WebOverviewQuery,
@@ -128,6 +129,12 @@ export function isWebTopClicksQuery(node?: Record | null): node is
return node?.kind === NodeKind.WebTopClicksQuery
}
+export function isSessionAttributionExplorerQuery(
+ node?: Record | null
+): node is SessionAttributionExplorerQuery {
+ return node?.kind === NodeKind.SessionAttributionExplorerQuery
+}
+
export function containsHogQLQuery(node?: Record | null): boolean {
if (!node) {
return false
diff --git a/frontend/src/scenes/actions/ActionEdit.tsx b/frontend/src/scenes/actions/ActionEdit.tsx
index 03c4e45847570..09b38427e95b7 100644
--- a/frontend/src/scenes/actions/ActionEdit.tsx
+++ b/frontend/src/scenes/actions/ActionEdit.tsx
@@ -247,6 +247,9 @@ export function ActionEdit({ action: loadedAction, id }: ActionEditLogicProps):
onChange={onChange}
disabled={!slackEnabled || !action.post_to_slack}
data-attr="edit-slack-message-format"
+ maxLength={
+ 1200 /** Must be same as in posthog/models/action/action.py */
+ }
/>
any> = {
[Scene.DataWarehouseExternal]: () => import('./data-warehouse/external/DataWarehouseExternalScene'),
[Scene.DataWarehouseSettings]: () => import('./data-warehouse/settings/DataWarehouseSettingsScene'),
[Scene.DataWarehouseRedirect]: () => import('./data-warehouse/redirect/DataWarehouseRedirectScene'),
+ [Scene.dataWarehouseSourceSettings]: () =>
+ import('./data-warehouse/settings/source/DataWarehouseSourceSettingsScene'),
[Scene.OrganizationCreateFirst]: () => import('./organization/Create'),
[Scene.OrganizationCreationConfirm]: () => import('./organization/ConfirmOrganization/ConfirmOrganization'),
[Scene.ProjectHomepage]: () => import('./project-homepage/ProjectHomepage'),
@@ -80,5 +82,6 @@ export const appScenes: Record any> = {
[Scene.Settings]: () => import('./settings/SettingsScene'),
[Scene.MoveToPostHogCloud]: () => import('./moveToPostHogCloud/MoveToPostHogCloud'),
[Scene.Heatmaps]: () => import('./heatmaps/HeatmapsScene'),
- [Scene.SessionAttributionExplorer]: () => import('./web-analytics/SessionDebugger/SessionAttributionExplorerScene'),
+ [Scene.SessionAttributionExplorer]: () =>
+ import('scenes/web-analytics/SessionAttributionExplorer/SessionAttributionExplorerScene'),
}
diff --git a/frontend/src/scenes/batch_exports/BatchExportScene.tsx b/frontend/src/scenes/batch_exports/BatchExportScene.tsx
index 8caa9614da613..d7530dc36f5f5 100644
--- a/frontend/src/scenes/batch_exports/BatchExportScene.tsx
+++ b/frontend/src/scenes/batch_exports/BatchExportScene.tsx
@@ -24,15 +24,15 @@ import { capitalizeFirstLetter, identifierToHuman } from 'lib/utils'
import { pluralize } from 'lib/utils'
import { useEffect, useState } from 'react'
import { BatchExportRunsGrouped } from 'scenes/pipeline/BatchExportRuns'
-import { PipelineLogLevel } from 'scenes/pipeline/pipelineNodeLogsLogic'
+import { LogLevelDisplay } from 'scenes/pipeline/utils'
import { SceneExport } from 'scenes/sceneTypes'
import { urls } from 'scenes/urls'
-import { BatchExportLogEntry } from '~/types'
+import { LogEntry } from '~/types'
import { BatchExportBackfillModal } from './BatchExportBackfillModal'
import { batchExportLogic, BatchExportLogicProps, BatchExportTab } from './batchExportLogic'
-import { batchExportLogsLogic, BatchExportLogsProps, LOGS_PORTION_LIMIT } from './batchExportLogsLogic'
+import { ALL_LOG_LEVELS, batchExportLogsLogic, BatchExportLogsProps, LOGS_PORTION_LIMIT } from './batchExportLogsLogic'
import { BatchExportTag } from './components'
import { humanizeDestination, intervalToFrequency, showBatchExports } from './utils'
@@ -114,52 +114,27 @@ export function RunsTab(): JSX.Element {
)
}
-function BatchExportLogEntryLevelDisplay(type: PipelineLogLevel): JSX.Element {
- let color: string | undefined
- switch (type) {
- case PipelineLogLevel.Debug:
- color = 'var(--muted)'
- break
- case PipelineLogLevel.Log:
- color = 'var(--text-3000)'
- break
- case PipelineLogLevel.Info:
- color = 'var(--blue)'
- break
- case PipelineLogLevel.Warning:
- color = 'var(--warning)'
- break
- case PipelineLogLevel.Error:
- color = 'var(--danger)'
- break
- default:
- break
- }
- // eslint-disable-next-line react/forbid-dom-props
- return {type}
-}
-
-const columns: LemonTableColumns = [
+const columns: LemonTableColumns = [
{
title: 'Timestamp',
key: 'timestamp',
dataIndex: 'timestamp',
width: 1,
- render: (_, entry: BatchExportLogEntry) => dayjs(entry.timestamp).format('YYYY-MM-DD HH:mm:ss.SSS UTC'),
+ render: (_, entry) => dayjs(entry.timestamp).format('YYYY-MM-DD HH:mm:ss.SSS UTC'),
},
{
title: 'Level',
key: 'level',
dataIndex: 'level',
width: 1,
- render: (_, entry: BatchExportLogEntry) => BatchExportLogEntryLevelDisplay(entry.level),
+ render: (_, entry) => LogLevelDisplay(entry.level),
},
{
title: 'Run ID',
key: 'run_id',
- dataIndex: 'run_id',
+ dataIndex: 'instance_id',
width: 1,
- render: (_, entry) => entry.run_id,
+ render: (_, entry) => entry.instance_id,
},
{
title: 'Message',
@@ -197,7 +172,8 @@ export function LogsTab({ batchExportId }: BatchExportLogsProps): JSX.Element {
/>
Show logs of type:
- {Object.values(PipelineLogLevel).map((type) => {
+
+ {ALL_LOG_LEVELS.map((type) => {
return (
([
}),
loaders(({ props: { batchExportId }, values, actions, cache }) => ({
batchExportLogs: {
- __default: [] as BatchExportLogEntry[],
+ __default: [] as LogEntry[],
loadBatchExportLogs: async () => {
- const results = await api.batchExportLogs.search(batchExportId, values.searchTerm, values.typeFilters)
+ const response = await api.batchExports.logs(batchExportId, {
+ search: values.searchTerm,
+ level: values.typeFilters.join(','),
+ })
if (!cache.pollingInterval) {
cache.pollingInterval = setInterval(actions.loadBatchExportLogsBackgroundPoll, 2000)
}
actions.clearBatchExportLogsBackground()
- return results
+ return response.results
},
loadBatchExportLogsMore: async () => {
- const results = await api.batchExportLogs.search(
- batchExportId,
- values.searchTerm,
- values.typeFilters,
- values.trailingEntry
- )
+ const response = await api.batchExports.logs(batchExportId, {
+ search: values.searchTerm,
+ level: values.typeFilters.join(','),
+ before: values.trailingEntry?.timestamp,
+ })
- if (results.length < LOGS_PORTION_LIMIT) {
+ if (response.results.length < LOGS_PORTION_LIMIT) {
actions.markLogsEnd()
}
- return [...values.batchExportLogs, ...results]
+ return [...values.batchExportLogs, ...response.results]
},
revealBackground: () => {
const newArray = [...values.batchExportLogsBackground, ...values.batchExportLogs]
@@ -57,33 +61,31 @@ export const batchExportLogsLogic = kea([
},
},
batchExportLogsBackground: {
- __default: [] as BatchExportLogEntry[],
+ __default: [] as LogEntry[],
loadBatchExportLogsBackgroundPoll: async () => {
if (values.batchExportLogsLoading) {
return values.batchExportLogsBackground
}
- const results = await api.batchExportLogs.search(
- batchExportId,
- values.searchTerm,
- values.typeFilters,
- null,
- values.leadingEntry
- )
+ const response = await api.batchExports.logs(batchExportId, {
+ search: values.searchTerm,
+ level: values.typeFilters.join(','),
+ after: values.leadingEntry?.timestamp,
+ })
- return [...results, ...values.batchExportLogsBackground]
+ return [...response.results, ...values.batchExportLogsBackground]
},
},
})),
reducers({
batchExportLogsTypes: [
- Object.values(PipelineLogLevel).filter((type) => type !== 'DEBUG'),
+ DEFAULT_LOG_LEVELS,
{
- setBatchExportLogsTypes: (_, { typeFilters }) => typeFilters.map((tf) => tf as PipelineLogLevel),
+ setBatchExportLogsTypes: (_, { typeFilters }) => typeFilters.map((tf) => tf as LogEntryLevel),
},
],
batchExportLogsBackground: [
- [] as BatchExportLogEntry[],
+ [] as LogEntry[],
{
clearBatchExportLogsBackground: () => [],
},
@@ -95,7 +97,7 @@ export const batchExportLogsLogic = kea([
},
],
typeFilters: [
- Object.values(PipelineLogLevel).filter((type) => type !== 'DEBUG') as CheckboxValueType[],
+ DEFAULT_LOG_LEVELS as CheckboxValueType[],
{
setBatchExportLogsTypes: (_, { typeFilters }) => typeFilters || [],
},
@@ -108,13 +110,10 @@ export const batchExportLogsLogic = kea([
},
],
}),
- selectors(({ selectors }) => ({
+ selectors(() => ({
leadingEntry: [
- () => [selectors.batchExportLogs, selectors.batchExportLogsBackground],
- (
- batchExportLogs: BatchExportLogEntry[],
- batchExportLogsBackground: BatchExportLogEntry[]
- ): BatchExportLogEntry | null => {
+ (s) => [s.batchExportLogs, s.batchExportLogsBackground],
+ (batchExportLogs, batchExportLogsBackground): LogEntry | null => {
if (batchExportLogsBackground.length) {
return batchExportLogsBackground[0]
}
@@ -125,11 +124,8 @@ export const batchExportLogsLogic = kea([
},
],
trailingEntry: [
- () => [selectors.batchExportLogs, selectors.batchExportLogsBackground],
- (
- batchExportLogs: BatchExportLogEntry[],
- batchExportLogsBackground: BatchExportLogEntry[]
- ): BatchExportLogEntry | null => {
+ (s) => [s.batchExportLogs, s.batchExportLogsBackground],
+ (batchExportLogs, batchExportLogsBackground): LogEntry | null => {
if (batchExportLogs.length) {
return batchExportLogs[batchExportLogs.length - 1]
}
diff --git a/frontend/src/scenes/data-warehouse/settings/DataWarehouseManagedSourcesTable.tsx b/frontend/src/scenes/data-warehouse/settings/DataWarehouseManagedSourcesTable.tsx
index 489c61a360e77..eb4ec4e8172ac 100644
--- a/frontend/src/scenes/data-warehouse/settings/DataWarehouseManagedSourcesTable.tsx
+++ b/frontend/src/scenes/data-warehouse/settings/DataWarehouseManagedSourcesTable.tsx
@@ -1,21 +1,10 @@
import { TZLabel } from '@posthog/apps-common'
-import {
- LemonButton,
- LemonDialog,
- LemonModal,
- LemonSelect,
- LemonSkeleton,
- LemonSwitch,
- LemonTable,
- LemonTag,
- Link,
- Spinner,
- Tooltip,
-} from '@posthog/lemon-ui'
+import { LemonButton, LemonDialog, LemonTable, LemonTag, Link, Spinner, Tooltip } from '@posthog/lemon-ui'
import { useActions, useValues } from 'kea'
import { router } from 'kea-router'
import { ProductIntroduction } from 'lib/components/ProductIntroduction/ProductIntroduction'
import { More } from 'lib/lemon-ui/LemonButton/More'
+import { LemonTableLink } from 'lib/lemon-ui/LemonTable/LemonTableLink'
import cloudflareLogo from 'public/cloudflare-logo.svg'
import googleStorageLogo from 'public/google-cloud-storage-logo.png'
import hubspotLogo from 'public/hubspot-logo.svg'
@@ -24,21 +13,11 @@ import s3Logo from 'public/s3-logo.png'
import snowflakeLogo from 'public/snowflake-logo.svg'
import stripeLogo from 'public/stripe-logo.svg'
import zendeskLogo from 'public/zendesk-logo.svg'
-import { useEffect } from 'react'
import { urls } from 'scenes/urls'
-import {
- DataWarehouseSyncInterval,
- ExternalDataSourceSchema,
- ExternalDataStripeSource,
- manualLinkSources,
- ProductKey,
-} from '~/types'
+import { manualLinkSources, ProductKey } from '~/types'
-import { SyncMethodForm } from '../external/forms/SyncMethodForm'
-import { defaultQuery } from '../utils'
import { dataWarehouseSettingsLogic } from './dataWarehouseSettingsLogic'
-import { dataWarehouseSourcesTableSyncMethodModalLogic } from './dataWarehouseSourcesTableSyncMethodModalLogic'
const StatusTagSetting = {
Running: 'primary',
@@ -48,21 +27,9 @@ const StatusTagSetting = {
}
export function DataWarehouseManagedSourcesTable(): JSX.Element {
- const { dataWarehouseSources, dataWarehouseSourcesLoading, sourceReloadingById } =
+ const { dataWarehouseSources, dataWarehouseSourcesLoading, sourceReloadingById, currentTab } =
useValues(dataWarehouseSettingsLogic)
- const { deleteSource, reloadSource, updateSource } = useActions(dataWarehouseSettingsLogic)
-
- const renderExpandable = (source: ExternalDataStripeSource): JSX.Element => {
- return (
-
- )
- }
+ const { deleteSource, reloadSource } = useActions(dataWarehouseSettingsLogic)
if (!dataWarehouseSourcesLoading && dataWarehouseSources?.results.length === 0) {
return (
@@ -91,35 +58,14 @@ export function DataWarehouseManagedSourcesTable(): JSX.Element {
},
},
{
- title: 'Source Type',
+ title: 'Source',
key: 'name',
render: function RenderName(_, source) {
- return source.source_type
- },
- },
- {
- title: 'Table prefix',
- key: 'prefix',
- render: function RenderPrefix(_, source) {
- return source.prefix
- },
- },
- {
- title: 'Sync Frequency',
- key: 'frequency',
- render: function RenderFrequency(_, source) {
return (
-
- updateSource({ ...source, sync_frequency: value as DataWarehouseSyncInterval })
- }
- options={[
- { value: 'day' as DataWarehouseSyncInterval, label: 'Daily' },
- { value: 'week' as DataWarehouseSyncInterval, label: 'Weekly' },
- { value: 'month' as DataWarehouseSyncInterval, label: 'Monthly' },
- ]}
+
)
},
@@ -214,11 +160,6 @@ export function DataWarehouseManagedSourcesTable(): JSX.Element {
},
},
]}
- expandable={{
- expandedRowRender: renderExpandable,
- rowExpandable: () => true,
- noIndent: true,
- }}
/>
)
}
@@ -269,270 +210,3 @@ export function RenderDataWarehouseSourceIcon({
)
}
-
-interface SchemaTableProps {
- schemas: ExternalDataSourceSchema[]
-}
-
-const SchemaTable = ({ schemas }: SchemaTableProps): JSX.Element => {
- const { updateSchema, reloadSchema, resyncSchema } = useActions(dataWarehouseSettingsLogic)
- const { schemaReloadingById } = useValues(dataWarehouseSettingsLogic)
-
- return (
- <>
- {schema.name}
- },
- },
- {
- title: 'Sync method',
- key: 'incremental',
- render: function RenderIncremental(_, schema) {
- const { openSyncMethodModal } = useActions(
- dataWarehouseSourcesTableSyncMethodModalLogic({ schema })
- )
-
- if (!schema.sync_type) {
- return (
- <>
- openSyncMethodModal(schema)}
- >
- Set up
-
-
- >
- )
- }
-
- return (
- <>
- openSyncMethodModal(schema)}
- >
- {schema.sync_type == 'incremental' ? 'Incremental' : 'Full refresh'}
-
-
- >
- )
- },
- },
- {
- title: 'Enabled',
- key: 'should_sync',
- render: function RenderShouldSync(_, schema) {
- return (
- {
- updateSchema({ ...schema, should_sync: active })
- }}
- />
- )
- },
- },
- {
- title: 'Synced Table',
- key: 'table',
- render: function RenderTable(_, schema) {
- if (schema.table) {
- const query = defaultQuery(schema.table.name, schema.table.columns)
- return (
-
- {schema.table.name}
-
- )
- }
- return Not yet synced
- },
- },
- {
- title: 'Last Synced At',
- key: 'last_synced_at',
- render: function Render(_, schema) {
- return schema.last_synced_at ? (
- <>
-
- >
- ) : null
- },
- },
- {
- title: 'Rows Synced',
- key: 'rows_synced',
- render: function Render(_, schema) {
- return (schema.table?.row_count ?? 0).toLocaleString()
- },
- },
- {
- title: 'Status',
- key: 'status',
- render: function RenderStatus(_, schema) {
- if (!schema.status) {
- return null
- }
-
- return (
- {schema.status}
- )
- },
- },
- {
- key: 'actions',
- width: 0,
- render: function RenderActions(_, schema) {
- if (schemaReloadingById[schema.id]) {
- return (
-
-
-
- )
- }
-
- return (
-
-
-
- {
- reloadSchema(schema)
- }}
- >
- Reload
-
- {schema.incremental && (
-
- {
- resyncSchema(schema)
- }}
- status="danger"
- >
- Resync
-
-
- )}
- >
- }
- />
-
-
- )
- },
- },
- ]}
- />
- >
- )
-}
-
-const SyncMethodModal = ({ schema }: { schema: ExternalDataSourceSchema }): JSX.Element => {
- const {
- syncMethodModalIsOpen,
- currentSyncMethodModalSchema,
- schemaIncrementalFields,
- schemaIncrementalFieldsLoading,
- saveButtonIsLoading,
- } = useValues(dataWarehouseSourcesTableSyncMethodModalLogic({ schema }))
- const { closeSyncMethodModal, loadSchemaIncrementalFields, resetSchemaIncrementalFields, updateSchema } =
- useActions(dataWarehouseSourcesTableSyncMethodModalLogic({ schema }))
-
- useEffect(() => {
- if (currentSyncMethodModalSchema?.id) {
- resetSchemaIncrementalFields()
- loadSchemaIncrementalFields(currentSyncMethodModalSchema.id)
- }
- }, [currentSyncMethodModalSchema?.id])
-
- const schemaLoading = schemaIncrementalFieldsLoading || !schemaIncrementalFields
- const showForm = !schemaLoading && schemaIncrementalFields
-
- if (!currentSyncMethodModalSchema) {
- return <>>
- }
-
- return (
-
-
-
- >
- )
- }
- >
- {schemaLoading && (
-
-
-
-
- )}
- {showForm && (
- {
- resetSchemaIncrementalFields()
- closeSyncMethodModal()
- }}
- onSave={(syncType, incrementalField, incrementalFieldType) => {
- if (syncType === 'full_refresh') {
- updateSchema({
- ...currentSyncMethodModalSchema,
- should_sync: true,
- sync_type: syncType,
- incremental_field: null,
- incremental_field_type: null,
- })
- } else {
- updateSchema({
- ...currentSyncMethodModalSchema,
- should_sync: true,
- sync_type: syncType,
- incremental_field: incrementalField,
- incremental_field_type: incrementalFieldType,
- })
- }
- }}
- />
- )}
-
- )
-}
diff --git a/frontend/src/scenes/data-warehouse/settings/source/DataWarehouseSourceSettingsScene.tsx b/frontend/src/scenes/data-warehouse/settings/source/DataWarehouseSourceSettingsScene.tsx
new file mode 100644
index 0000000000000..f3635b8df718f
--- /dev/null
+++ b/frontend/src/scenes/data-warehouse/settings/source/DataWarehouseSourceSettingsScene.tsx
@@ -0,0 +1,72 @@
+import { LemonButton, LemonTabs } from '@posthog/lemon-ui'
+import { useActions, useValues } from 'kea'
+import { PageHeader } from 'lib/components/PageHeader'
+import { SceneExport } from 'scenes/sceneTypes'
+import { urls } from 'scenes/urls'
+
+import { DataWarehouseSettingsTab } from '~/types'
+
+import {
+ dataWarehouseSourceSettingsLogic,
+ DataWarehouseSourceSettingsLogicProps,
+ DataWarehouseSourceSettingsTabs,
+} from './dataWarehouseSourceSettingsLogic'
+import { Schemas } from './Schemas'
+import { Syncs } from './Syncs'
+
+const paramsToProps = ({
+ params: { id, tab },
+}: {
+ params: { id?: string; tab?: string }
+}): DataWarehouseSourceSettingsLogicProps => {
+ if (!id || !tab) {
+ throw new Error('Loaded DataWarehouseSourceSettings without eother `id` or `tab`')
+ }
+
+ return {
+ id,
+ parentSettingsTab: tab as DataWarehouseSettingsTab,
+ }
+}
+
+export const scene: SceneExport = {
+ component: DataWarehouseSourceSettingsScene,
+ logic: dataWarehouseSourceSettingsLogic,
+ paramsToProps,
+}
+
+const TabContent: Record JSX.Element> = {
+ [DataWarehouseSourceSettingsTabs.Schemas]: Schemas,
+ [DataWarehouseSourceSettingsTabs.Syncs]: Syncs,
+}
+
+const FriendlyTabNames: Record = {
+ [DataWarehouseSourceSettingsTabs.Schemas]: 'Schemas',
+ [DataWarehouseSourceSettingsTabs.Syncs]: 'Syncs',
+}
+
+export function DataWarehouseSourceSettingsScene(): JSX.Element {
+ const { parentSettingsTab, currentTab } = useValues(dataWarehouseSourceSettingsLogic)
+ const { setCurrentTab } = useActions(dataWarehouseSourceSettingsLogic)
+
+ return (
+
+
+ Cancel
+
+ }
+ />
+ setCurrentTab(tab as DataWarehouseSourceSettingsTabs)}
+ tabs={Object.entries(TabContent).map(([tab, ContentComponent]) => ({
+ label: FriendlyTabNames[tab],
+ key: tab,
+ content: ,
+ }))}
+ />
+
+ )
+}
diff --git a/frontend/src/scenes/data-warehouse/settings/source/Schemas.tsx b/frontend/src/scenes/data-warehouse/settings/source/Schemas.tsx
new file mode 100644
index 0000000000000..f106fb91bff2c
--- /dev/null
+++ b/frontend/src/scenes/data-warehouse/settings/source/Schemas.tsx
@@ -0,0 +1,331 @@
+import { TZLabel } from '@posthog/apps-common'
+import {
+ LemonButton,
+ LemonModal,
+ LemonSelect,
+ LemonSkeleton,
+ LemonSwitch,
+ LemonTable,
+ LemonTag,
+ Link,
+ Spinner,
+ Tooltip,
+} from '@posthog/lemon-ui'
+import { useActions, useValues } from 'kea'
+import { More } from 'lib/lemon-ui/LemonButton/More'
+import { useEffect } from 'react'
+import { defaultQuery } from 'scenes/data-warehouse/utils'
+import { urls } from 'scenes/urls'
+
+import { DataWarehouseSyncInterval, ExternalDataSourceSchema } from '~/types'
+
+import { SyncMethodForm } from '../../external/forms/SyncMethodForm'
+import { dataWarehouseSettingsLogic } from '../dataWarehouseSettingsLogic'
+import { dataWarehouseSourcesTableSyncMethodModalLogic } from '../dataWarehouseSourcesTableSyncMethodModalLogic'
+import { dataWarehouseSourceSettingsLogic } from './dataWarehouseSourceSettingsLogic'
+
+export const Schemas = (): JSX.Element => {
+ const { source, sourceLoading } = useValues(dataWarehouseSourceSettingsLogic)
+ return (
+ <>
+
+ >
+ )
+}
+
+interface SchemaTableProps {
+ schemas: ExternalDataSourceSchema[]
+ isLoading: boolean
+}
+
+const StatusTagSetting = {
+ Running: 'primary',
+ Completed: 'success',
+ Error: 'danger',
+ Failed: 'danger',
+}
+
+export const SchemaTable = ({ schemas, isLoading }: SchemaTableProps): JSX.Element => {
+ const { reloadSchema, resyncSchema } = useActions(dataWarehouseSettingsLogic)
+ const { updateSchema } = useActions(dataWarehouseSourceSettingsLogic)
+ const { schemaReloadingById } = useValues(dataWarehouseSettingsLogic)
+
+ return (
+ <>
+ {schema.name}
+ },
+ },
+ {
+ title: 'Sync Frequency',
+ key: 'frequency',
+ render: function RenderFrequency(_, schema) {
+ return (
+
+ updateSchema({ ...schema, sync_frequency: value as DataWarehouseSyncInterval })
+ }
+ options={[
+ { value: 'day' as DataWarehouseSyncInterval, label: 'Daily' },
+ { value: 'week' as DataWarehouseSyncInterval, label: 'Weekly' },
+ { value: 'month' as DataWarehouseSyncInterval, label: 'Monthly' },
+ ]}
+ />
+ )
+ },
+ },
+ {
+ title: 'Sync method',
+ key: 'incremental',
+ render: function RenderIncremental(_, schema) {
+ const { openSyncMethodModal } = useActions(
+ dataWarehouseSourcesTableSyncMethodModalLogic({ schema })
+ )
+
+ if (!schema.sync_type) {
+ return (
+ <>
+ openSyncMethodModal(schema)}
+ >
+ Set up
+
+
+ >
+ )
+ }
+
+ return (
+ <>
+ openSyncMethodModal(schema)}
+ >
+ {schema.sync_type == 'incremental' ? 'Incremental' : 'Full refresh'}
+
+
+ >
+ )
+ },
+ },
+ {
+ title: 'Enabled',
+ key: 'should_sync',
+ render: function RenderShouldSync(_, schema) {
+ return (
+ {
+ updateSchema({ ...schema, should_sync: active })
+ }}
+ />
+ )
+ },
+ },
+ {
+ title: 'Synced Table',
+ key: 'table',
+ render: function RenderTable(_, schema) {
+ if (schema.table) {
+ const query = defaultQuery(schema.table.name, schema.table.columns)
+ return (
+
+ {schema.table.name}
+
+ )
+ }
+ return Not yet synced
+ },
+ },
+ {
+ title: 'Last Synced At',
+ key: 'last_synced_at',
+ render: function Render(_, schema) {
+ return schema.last_synced_at ? (
+ <>
+
+ >
+ ) : null
+ },
+ },
+ {
+ title: 'Rows Synced',
+ key: 'rows_synced',
+ render: function Render(_, schema) {
+ return (schema.table?.row_count ?? 0).toLocaleString()
+ },
+ },
+ {
+ title: 'Status',
+ key: 'status',
+ render: function RenderStatus(_, schema) {
+ if (!schema.status) {
+ return null
+ }
+
+ return (
+ {schema.status}
+ )
+ },
+ },
+ {
+ key: 'actions',
+ width: 0,
+ render: function RenderActions(_, schema) {
+ if (schemaReloadingById[schema.id]) {
+ return (
+
+
+
+ )
+ }
+
+ return (
+
+
+
+ {
+ reloadSchema(schema)
+ }}
+ >
+ Reload
+
+ {schema.incremental && (
+
+ {
+ resyncSchema(schema)
+ }}
+ status="danger"
+ >
+ Resync
+
+
+ )}
+ >
+ }
+ />
+
+
+ )
+ },
+ },
+ ]}
+ />
+ >
+ )
+}
+
+const SyncMethodModal = ({ schema }: { schema: ExternalDataSourceSchema }): JSX.Element => {
+ const {
+ syncMethodModalIsOpen,
+ currentSyncMethodModalSchema,
+ schemaIncrementalFields,
+ schemaIncrementalFieldsLoading,
+ saveButtonIsLoading,
+ } = useValues(dataWarehouseSourcesTableSyncMethodModalLogic({ schema }))
+ const { closeSyncMethodModal, loadSchemaIncrementalFields, resetSchemaIncrementalFields, updateSchema } =
+ useActions(dataWarehouseSourcesTableSyncMethodModalLogic({ schema }))
+
+ useEffect(() => {
+ if (currentSyncMethodModalSchema?.id) {
+ resetSchemaIncrementalFields()
+ loadSchemaIncrementalFields(currentSyncMethodModalSchema.id)
+ }
+ }, [currentSyncMethodModalSchema?.id])
+
+ const schemaLoading = schemaIncrementalFieldsLoading || !schemaIncrementalFields
+ const showForm = !schemaLoading && schemaIncrementalFields
+
+ if (!currentSyncMethodModalSchema) {
+ return <>>
+ }
+
+ return (
+
+
+
+ >
+ )
+ }
+ >
+ {schemaLoading && (
+
+
+
+
+ )}
+ {showForm && (
+ {
+ resetSchemaIncrementalFields()
+ closeSyncMethodModal()
+ }}
+ onSave={(syncType, incrementalField, incrementalFieldType) => {
+ if (syncType === 'full_refresh') {
+ updateSchema({
+ ...currentSyncMethodModalSchema,
+ should_sync: true,
+ sync_type: syncType,
+ incremental_field: null,
+ incremental_field_type: null,
+ })
+ } else {
+ updateSchema({
+ ...currentSyncMethodModalSchema,
+ should_sync: true,
+ sync_type: syncType,
+ incremental_field: incrementalField,
+ incremental_field_type: incrementalFieldType,
+ })
+ }
+ }}
+ />
+ )}
+
+ )
+}
diff --git a/frontend/src/scenes/data-warehouse/settings/source/Syncs.tsx b/frontend/src/scenes/data-warehouse/settings/source/Syncs.tsx
new file mode 100644
index 0000000000000..c53f1a3d4c096
--- /dev/null
+++ b/frontend/src/scenes/data-warehouse/settings/source/Syncs.tsx
@@ -0,0 +1,51 @@
+import { TZLabel } from '@posthog/apps-common'
+import { LemonTable, LemonTag, LemonTagType } from '@posthog/lemon-ui'
+import { useValues } from 'kea'
+
+import { ExternalDataJob } from '~/types'
+
+import { dataWarehouseSourceSettingsLogic } from './dataWarehouseSourceSettingsLogic'
+
+const StatusTagSetting: Record = {
+ Running: 'primary',
+ Completed: 'success',
+ Failed: 'danger',
+ Cancelled: 'default',
+}
+
+export const Syncs = (): JSX.Element => {
+ const { jobs, jobsLoading } = useValues(dataWarehouseSourceSettingsLogic)
+
+ return (
+ {
+ return job.schema.name
+ },
+ },
+ {
+ title: 'Status',
+ render: (_, job) => {
+ return {job.status}
+ },
+ },
+ {
+ title: 'Rows synced',
+ render: (_, job) => {
+ return job.rows_synced
+ },
+ },
+ {
+ title: 'Synced at',
+ render: (_, job) => {
+ return
+ },
+ },
+ ]}
+ />
+ )
+}
diff --git a/frontend/src/scenes/data-warehouse/settings/source/dataWarehouseSourceSettingsLogic.ts b/frontend/src/scenes/data-warehouse/settings/source/dataWarehouseSourceSettingsLogic.ts
new file mode 100644
index 0000000000000..aa869b87c3680
--- /dev/null
+++ b/frontend/src/scenes/data-warehouse/settings/source/dataWarehouseSourceSettingsLogic.ts
@@ -0,0 +1,123 @@
+import { actions, afterMount, kea, key, path, props, reducers, selectors } from 'kea'
+import { loaders } from 'kea-loaders'
+import { urlToAction } from 'kea-router'
+import api from 'lib/api'
+import { Scene } from 'scenes/sceneTypes'
+import { urls } from 'scenes/urls'
+
+import {
+ Breadcrumb,
+ DataWarehouseSettingsTab,
+ ExternalDataJob,
+ ExternalDataSourceSchema,
+ ExternalDataStripeSource,
+} from '~/types'
+
+import type { dataWarehouseSourceSettingsLogicType } from './dataWarehouseSourceSettingsLogicType'
+
+export enum DataWarehouseSourceSettingsTabs {
+ Schemas = 'schemas',
+ Syncs = 'syncs',
+}
+
+export interface DataWarehouseSourceSettingsLogicProps {
+ id: string
+ parentSettingsTab: DataWarehouseSettingsTab
+}
+
+export const dataWarehouseSourceSettingsLogic = kea([
+ path(['scenes', 'data-warehouse', 'settings', 'source', 'dataWarehouseSourceSettingsLogic']),
+ props({} as DataWarehouseSourceSettingsLogicProps),
+ key(({ id }) => id),
+ actions({
+ setCurrentTab: (tab: DataWarehouseSourceSettingsTabs) => ({ tab }),
+ setParentSettingsTab: (tab: DataWarehouseSettingsTab) => ({ tab }),
+ setSourceId: (id: string) => ({ id }),
+ }),
+ loaders(({ values }) => ({
+ source: [
+ null as ExternalDataStripeSource | null,
+ {
+ loadSource: async () => {
+ return await api.externalDataSources.get(values.sourceId)
+ },
+ updateSchema: async (schema: ExternalDataSourceSchema) => {
+ const updatedSchema = await api.externalDataSchemas.update(schema.id, schema)
+
+ const source = values.source
+ const schemaIndex = source?.schemas.findIndex((n) => n.id === schema.id)
+ if (schemaIndex !== undefined) {
+ source!.schemas[schemaIndex] = updatedSchema
+ }
+
+ return source
+ },
+ },
+ ],
+ jobs: [
+ [] as ExternalDataJob[],
+ {
+ loadJobs: async () => {
+ return await api.externalDataSources.jobs(values.sourceId)
+ },
+ },
+ ],
+ })),
+ reducers({
+ currentTab: [
+ DataWarehouseSourceSettingsTabs.Schemas as DataWarehouseSourceSettingsTabs,
+ {
+ setCurrentTab: (_, { tab }) => tab,
+ },
+ ],
+ parentSettingsTab: [
+ DataWarehouseSettingsTab.Managed as DataWarehouseSettingsTab,
+ {
+ setParentSettingsTab: (_, { tab }) => tab,
+ },
+ ],
+ sourceId: [
+ '' as string,
+ {
+ setSourceId: (_, { id }) => id,
+ },
+ ],
+ }),
+ selectors({
+ breadcrumbs: [
+ (s) => [s.parentSettingsTab, s.sourceId],
+ (parentSettingsTab, sourceId): Breadcrumb[] => [
+ {
+ key: Scene.DataWarehouse,
+ name: 'Data Warehouse',
+ path: urls.dataWarehouse(),
+ },
+ {
+ key: Scene.DataWarehouseSettings,
+ name: 'Data Warehouse Settings',
+ path: urls.dataWarehouseSettings(parentSettingsTab),
+ },
+ {
+ key: Scene.dataWarehouseSourceSettings,
+ name: 'Data Warehouse Source Settings',
+ path: urls.dataWarehouseSourceSettings(sourceId, parentSettingsTab),
+ },
+ ],
+ ],
+ }),
+ urlToAction(({ actions, values }) => ({
+ '/data-warehouse/settings/:parentTab/:id': ({ parentTab, id }) => {
+ if (id) {
+ actions.setSourceId(id)
+ }
+
+ if (parentTab !== values.parentSettingsTab) {
+ actions.setParentSettingsTab(parentTab as DataWarehouseSettingsTab)
+ }
+ },
+ })),
+ afterMount(({ actions }) => {
+ actions.loadSource()
+ actions.loadJobs()
+ }),
+])
diff --git a/frontend/src/scenes/experiments/ExperimentView/components.tsx b/frontend/src/scenes/experiments/ExperimentView/components.tsx
index 23ff276af4475..d439681fa4d6b 100644
--- a/frontend/src/scenes/experiments/ExperimentView/components.tsx
+++ b/frontend/src/scenes/experiments/ExperimentView/components.tsx
@@ -173,7 +173,7 @@ export function NoResultsEmptyState(): JSX.Element {
function ChecklistItem({ failureReason, checked }: { failureReason: string; checked: boolean }): JSX.Element {
const failureReasonToText = {
- 'no-events': 'Events have been received',
+ 'no-events': 'Experiment events have been received',
'no-flag-info': 'Feature flag information is present on the events',
'no-control-variant': 'Events with the control variant received',
'no-test-variant': 'Events with at least one test variant received',
diff --git a/frontend/src/scenes/experiments/experimentLogic.tsx b/frontend/src/scenes/experiments/experimentLogic.tsx
index 9419842092131..2a1befb09c01e 100644
--- a/frontend/src/scenes/experiments/experimentLogic.tsx
+++ b/frontend/src/scenes/experiments/experimentLogic.tsx
@@ -581,6 +581,10 @@ export const experimentLogic = kea([
if (values.changingSecondaryMetrics) {
actions.loadSecondaryMetricResults()
}
+
+ if (values.experiment?.start_date) {
+ actions.loadExperimentResults()
+ }
},
setExperiment: async ({ experiment }) => {
const experimentEntitiesChanged =
diff --git a/frontend/src/scenes/onboarding/Onboarding.tsx b/frontend/src/scenes/onboarding/Onboarding.tsx
index a2ba4d97bac32..0c5d05b3699a8 100644
--- a/frontend/src/scenes/onboarding/Onboarding.tsx
+++ b/frontend/src/scenes/onboarding/Onboarding.tsx
@@ -178,6 +178,14 @@ const SessionReplayOnboarding = (): JSX.Element => {
value: currentTeam?.capture_performance_opt_in ?? true,
visible: true,
},
+ {
+ type: 'toggle',
+ title: 'Record user sessions',
+ description: 'Watch recordings of how users interact with your web app to see what can be improved.',
+ teamProperty: 'session_recording_opt_in',
+ value: true,
+ visible: false,
+ },
]
if (hasAvailableFeature(AvailableFeature.REPLAY_RECORDING_DURATION_MINIMUM)) {
diff --git a/frontend/src/scenes/pipeline/PipelineNodeLogs.tsx b/frontend/src/scenes/pipeline/PipelineNodeLogs.tsx
index ca8ad55303768..6b0962ddbaced 100644
--- a/frontend/src/scenes/pipeline/PipelineNodeLogs.tsx
+++ b/frontend/src/scenes/pipeline/PipelineNodeLogs.tsx
@@ -5,7 +5,7 @@ import { LOGS_PORTION_LIMIT } from 'lib/constants'
import { pluralize } from 'lib/utils'
import { PipelineNodeLogicProps } from './pipelineNodeLogic'
-import { PipelineLogLevel, pipelineNodeLogsLogic } from './pipelineNodeLogsLogic'
+import { ALL_LOG_LEVELS, pipelineNodeLogsLogic } from './pipelineNodeLogsLogic'
export function PipelineNodeLogs({ id, stage }: PipelineNodeLogicProps): JSX.Element {
const logic = pipelineNodeLogsLogic({ id, stage })
@@ -32,7 +32,7 @@ export function PipelineNodeLogs({ id, stage }: PipelineNodeLogicProps): JSX.Ele
/>
Show logs of level:
- {Object.values(PipelineLogLevel).map((level) => {
+ {ALL_LOG_LEVELS.map((level) => {
return (
`${record.log_source_id}:${record.instance_id}:${record.timestamp}`}
pagination={{ pageSize: 200, hideOnSinglePage: true }}
/>
{!!logs.length && (
diff --git a/frontend/src/scenes/pipeline/__mocks__/batchExportLogs.json b/frontend/src/scenes/pipeline/__mocks__/batchExportLogs.json
index 8bd35cab9d8cc..00c1763a600ec 100644
--- a/frontend/src/scenes/pipeline/__mocks__/batchExportLogs.json
+++ b/frontend/src/scenes/pipeline/__mocks__/batchExportLogs.json
@@ -4,33 +4,29 @@
"previous": null,
"results": [
{
- "team_id": 2,
- "batch_export_id": "018cf79f-a9e5-0001-cd6a-edc4886d939d",
- "run_id": "62acf018-c2e4-47a8-88ff-20839ca84816",
+ "log_source_id": "018cf79f-a9e5-0001-cd6a-edc4886d939d",
+ "instance_id": "62acf018-c2e4-47a8-88ff-20839ca84816",
"timestamp": "2024-01-11T09:09:07.849132Z",
"level": "INFO",
"message": "Successfully finished exporting batch 2024-01-11 08:00:00+00:00 - 2024-01-11 09:00:00+00:00"
},
{
- "team_id": 2,
- "batch_export_id": "018cf79f-a9e5-0001-cd6a-edc4886d939d",
- "run_id": "62acf018-c2e4-47a8-88ff-20839ca84816",
+ "log_source_id": "018cf79f-a9e5-0001-cd6a-edc4886d939d",
+ "instance_id": "62acf018-c2e4-47a8-88ff-20839ca84816",
"timestamp": "2024-01-11T09:03:23.257635Z",
"level": "INFO",
"message": "BatchExporting 109171 rows"
},
{
- "team_id": 2,
- "batch_export_id": "018cf79f-a9e5-0001-cd6a-edc4886d939d",
- "run_id": "62acf018-c2e4-47a8-88ff-20839ca84816",
+ "log_source_id": "018cf79f-a9e5-0001-cd6a-edc4886d939d",
+ "instance_id": "62acf018-c2e4-47a8-88ff-20839ca84816",
"timestamp": "2024-01-11T09:03:23.053067Z",
"level": "INFO",
"message": "Exporting batch 2024-01-11T08:00:00+00:00 - 2024-01-11T09:00:00+00:00"
},
{
- "team_id": 2,
- "batch_export_id": "018cf79f-a9e5-0001-cd6a-edc4886d939d",
- "run_id": "62acf018-c2e4-47a8-88ff-20839ca84816",
+ "log_source_id": "018cf79f-a9e5-0001-cd6a-edc4886d939d",
+ "instance_id": "62acf018-c2e4-47a8-88ff-20839ca84816",
"timestamp": "2024-01-11T09:03:23.011577Z",
"level": "INFO",
"message": "Creating batch export for range 2024-01-11T08:00:00+00:00 - 2024-01-11T09:00:00+00:00"
diff --git a/frontend/src/scenes/pipeline/hogfunctions/HogFunctionConfiguration.tsx b/frontend/src/scenes/pipeline/hogfunctions/HogFunctionConfiguration.tsx
index 343c97e569aef..8de4129d20c8f 100644
--- a/frontend/src/scenes/pipeline/hogfunctions/HogFunctionConfiguration.tsx
+++ b/frontend/src/scenes/pipeline/hogfunctions/HogFunctionConfiguration.tsx
@@ -45,6 +45,7 @@ export function HogFunctionConfiguration({ templateId, id }: { templateId?: stri
loaded,
hogFunction,
willReEnableOnSave,
+ invocationGlobals,
} = useValues(logic)
const {
submitConfiguration,
@@ -333,6 +334,7 @@ export function HogFunctionConfiguration({ templateId, id }: { templateId?: stri
language="hog"
value={value ?? ''}
onChange={(v) => onChange(v ?? '')}
+ globals={invocationGlobals}
options={{
minimap: {
enabled: false,
diff --git a/frontend/src/scenes/pipeline/hogfunctions/HogFunctionInputs.tsx b/frontend/src/scenes/pipeline/hogfunctions/HogFunctionInputs.tsx
index f2715855a8a59..dc166ff9434f8 100644
--- a/frontend/src/scenes/pipeline/hogfunctions/HogFunctionInputs.tsx
+++ b/frontend/src/scenes/pipeline/hogfunctions/HogFunctionInputs.tsx
@@ -180,8 +180,8 @@ function JsonConfigField(props: {
}
function HogFunctionTemplateInput(props: Omit): JSX.Element {
- const { globalVars } = useValues(hogFunctionConfigurationLogic)
- return
+ const { inputGlobals } = useValues(hogFunctionConfigurationLogic)
+ return
}
function DictionaryField({ onChange, value }: { onChange?: (value: any) => void; value: any }): JSX.Element {
diff --git a/frontend/src/scenes/pipeline/hogfunctions/hogFunctionConfigurationLogic.tsx b/frontend/src/scenes/pipeline/hogfunctions/hogFunctionConfigurationLogic.tsx
index 5b79dde55aab2..063eb4a84f667 100644
--- a/frontend/src/scenes/pipeline/hogfunctions/hogFunctionConfigurationLogic.tsx
+++ b/frontend/src/scenes/pipeline/hogfunctions/hogFunctionConfigurationLogic.tsx
@@ -277,8 +277,20 @@ export const hogFunctionConfigurationLogic = kea= 3
},
],
- // TODO: connect to the actual globals
- globalVars: [(s) => [s.hogFunction], (): Record => createExampleEvent()],
+ inputGlobals: [(s) => [s.configuration], (): Record => createExampleEvent()],
+ invocationGlobals: [
+ (s) => [s.inputGlobals, s.configuration],
+ (inputGlobals, configuration): Record => {
+ const event = {
+ ...inputGlobals,
+ inputs: {},
+ }
+ for (const input of configuration?.inputs_schema || []) {
+ event.inputs[input.key] = input.type
+ }
+ return event
+ },
+ ],
})),
listeners(({ actions, values, cache }) => ({
diff --git a/frontend/src/scenes/pipeline/hogfunctions/hogFunctionTestLogic.tsx b/frontend/src/scenes/pipeline/hogfunctions/hogFunctionTestLogic.tsx
index 4ae6514c471ca..60f8092be8257 100644
--- a/frontend/src/scenes/pipeline/hogfunctions/hogFunctionTestLogic.tsx
+++ b/frontend/src/scenes/pipeline/hogfunctions/hogFunctionTestLogic.tsx
@@ -8,7 +8,6 @@ import { LogEntry } from '~/types'
import { hogFunctionConfigurationLogic, sanitizeConfiguration } from './hogFunctionConfigurationLogic'
import type { hogFunctionTestLogicType } from './hogFunctionTestLogicType'
-import { createExampleEvent } from './utils/event-conversion'
export interface HogFunctionTestLogicProps {
id: string
@@ -29,7 +28,10 @@ export const hogFunctionTestLogic = kea([
key((props) => props.id),
path((id) => ['scenes', 'pipeline', 'hogfunctions', 'hogFunctionTestLogic', id]),
connect((props: HogFunctionTestLogicProps) => ({
- values: [hogFunctionConfigurationLogic({ id: props.id }), ['configuration', 'configurationHasErrors']],
+ values: [
+ hogFunctionConfigurationLogic({ id: props.id }),
+ ['configuration', 'configurationHasErrors', 'invocationGlobals'],
+ ],
actions: [hogFunctionConfigurationLogic({ id: props.id }), ['touchConfigurationField']],
})),
actions({
@@ -89,7 +91,7 @@ export const hogFunctionTestLogic = kea([
},
},
})),
- afterMount(({ actions }) => {
- actions.setTestInvocationValue('globals', JSON.stringify(createExampleEvent(), null, 2))
+ afterMount(({ actions, values }) => {
+ actions.setTestInvocationValue('globals', JSON.stringify(values.invocationGlobals, null, 2))
}),
])
diff --git a/frontend/src/scenes/pipeline/pipelineNodeLogsLogic.tsx b/frontend/src/scenes/pipeline/pipelineNodeLogsLogic.tsx
index fdf15ae7b39aa..382038edf7e62 100644
--- a/frontend/src/scenes/pipeline/pipelineNodeLogsLogic.tsx
+++ b/frontend/src/scenes/pipeline/pipelineNodeLogsLogic.tsx
@@ -7,22 +7,15 @@ import { dayjs } from 'lib/dayjs'
import { pipelineNodeLogic, PipelineNodeLogicProps } from 'scenes/pipeline/pipelineNodeLogic'
import api from '~/lib/api'
-import { BatchExportLogEntry, LogEntry, PluginLogEntry } from '~/types'
+import { LogEntry, LogEntryLevel, LogEntryRequestParams } from '~/types'
import { teamLogic } from '../teamLogic'
import type { pipelineNodeLogsLogicType } from './pipelineNodeLogsLogicType'
import { PipelineBackend } from './types'
-import { LogLevelDisplay, logLevelsToTypeFilters, LogTypeDisplay } from './utils'
+import { LogLevelDisplay } from './utils'
-export type PipelineNodeLogEntry = BatchExportLogEntry | PluginLogEntry | LogEntry
-
-export enum PipelineLogLevel {
- Debug = 'DEBUG',
- Log = 'LOG',
- Info = 'INFO',
- Warning = 'WARNING',
- Error = 'ERROR',
-}
+export const ALL_LOG_LEVELS: LogEntryLevel[] = ['DEBUG', 'LOG', 'INFO', 'WARNING', 'ERROR']
+export const DEFAULT_LOG_LEVELS: LogEntryLevel[] = ['LOG', 'INFO', 'WARNING', 'ERROR']
export const pipelineNodeLogsLogic = kea([
props({} as PipelineNodeLogicProps), // TODO: Remove `stage` from props, it isn't needed here for anything
@@ -32,7 +25,7 @@ export const pipelineNodeLogsLogic = kea([
values: [teamLogic(), ['currentTeamId'], pipelineNodeLogic(props), ['node']],
})),
actions({
- setSelectedLogLevels: (levels: PipelineLogLevel[]) => ({
+ setSelectedLogLevels: (levels: LogEntryLevel[]) => ({
levels,
}),
setSearchTerm: (searchTerm: string) => ({ searchTerm }),
@@ -40,33 +33,27 @@ export const pipelineNodeLogsLogic = kea([
clearBackgroundLogs: true,
markLogsEnd: true,
}),
- loaders(({ props: { id }, values, actions, cache }) => ({
+ loaders(({ values, actions, cache }) => ({
logs: [
- [] as PipelineNodeLogEntry[],
+ [] as LogEntry[],
{
loadLogs: async () => {
- let results: PipelineNodeLogEntry[]
+ let results: LogEntry[] = []
+ const logParams: LogEntryRequestParams = {
+ search: values.searchTerm,
+ level: values.selectedLogLevelsForAPI.join(','),
+ limit: LOGS_PORTION_LIMIT,
+ instance_id: values.instanceId ?? undefined,
+ }
+
if (values.node.backend === PipelineBackend.BatchExport) {
- results = await api.batchExportLogs.search(
- values.node.id,
- values.searchTerm,
- values.selectedLogLevels
- )
+ const res = await api.batchExports.logs(values.node.id, logParams)
+ results = res.results
} else if (values.node.backend === PipelineBackend.HogFunction) {
- const res = await api.hogFunctions.searchLogs(values.node.id, {
- search: values.searchTerm,
- levels: values.selectedLogLevels,
- limit: LOGS_PORTION_LIMIT,
- instance_id: values.instanceId,
- })
-
+ const res = await api.hogFunctions.logs(values.node.id, logParams)
results = res.results
} else {
- results = await api.pluginLogs.search(
- values.node.id,
- values.searchTerm,
- logLevelsToTypeFilters(values.selectedLogLevels)
- )
+ results = await api.pluginConfigs.logs(values.node.id, logParams)
}
if (!cache.pollingInterval) {
@@ -76,31 +63,22 @@ export const pipelineNodeLogsLogic = kea([
return results
},
loadMoreLogs: async () => {
- let results: PipelineNodeLogEntry[]
+ let results: LogEntry[]
+ const logParams: LogEntryRequestParams = {
+ search: values.searchTerm,
+ level: values.selectedLogLevels.join(','),
+ limit: LOGS_PORTION_LIMIT,
+ before: values.trailingEntry?.timestamp,
+ instance_id: values.instanceId ?? undefined,
+ }
if (values.node.backend === PipelineBackend.BatchExport) {
- results = await api.batchExportLogs.search(
- id as string,
- values.searchTerm,
- values.selectedLogLevels,
- values.trailingEntry as BatchExportLogEntry | null
- )
+ const res = await api.batchExports.logs(values.node.id, logParams)
+ results = res.results
} else if (values.node.backend === PipelineBackend.HogFunction) {
- const res = await api.hogFunctions.searchLogs(values.node.id, {
- search: values.searchTerm,
- levels: values.selectedLogLevels,
- limit: LOGS_PORTION_LIMIT,
- before: values.trailingEntry?.timestamp,
- instance_id: values.instanceId,
- })
-
+ const res = await api.hogFunctions.logs(values.node.id, logParams)
results = res.results
} else {
- results = await api.pluginLogs.search(
- id as number,
- values.searchTerm,
- logLevelsToTypeFilters(values.selectedLogLevels),
- values.trailingEntry as PluginLogEntry | null
- )
+ results = await api.pluginConfigs.logs(values.node.id, logParams)
}
if (results.length < LOGS_PORTION_LIMIT) {
@@ -116,7 +94,7 @@ export const pipelineNodeLogsLogic = kea([
},
],
backgroundLogs: [
- [] as PipelineNodeLogEntry[],
+ [] as LogEntry[],
{
pollBackgroundLogs: async () => {
// we fetch new logs in the background and allow the user to expand
@@ -125,33 +103,23 @@ export const pipelineNodeLogsLogic = kea([
return values.backgroundLogs
}
- let results: PipelineNodeLogEntry[]
+ let results: LogEntry[]
+ const logParams: LogEntryRequestParams = {
+ search: values.searchTerm,
+ level: values.selectedLogLevels.join(','),
+ limit: LOGS_PORTION_LIMIT,
+ after: values.leadingEntry?.timestamp,
+ instance_id: values.instanceId ?? undefined,
+ }
+
if (values.node.backend === PipelineBackend.BatchExport) {
- results = await api.batchExportLogs.search(
- id as string,
- values.searchTerm,
- values.selectedLogLevels,
- null,
- values.leadingEntry as BatchExportLogEntry | null
- )
+ const res = await api.batchExports.logs(values.node.id, logParams)
+ results = res.results
} else if (values.node.backend === PipelineBackend.HogFunction) {
- const res = await api.hogFunctions.searchLogs(values.node.id, {
- search: values.searchTerm,
- levels: values.selectedLogLevels,
- limit: LOGS_PORTION_LIMIT,
- after: values.leadingEntry?.timestamp,
- instance_id: values.instanceId,
- })
-
+ const res = await api.hogFunctions.logs(values.node.id, logParams)
results = res.results
} else {
- results = await api.pluginLogs.search(
- id as number,
- values.searchTerm,
- logLevelsToTypeFilters(values.selectedLogLevels),
- null,
- values.leadingEntry as PluginLogEntry | null
- )
+ results = await api.pluginConfigs.logs(values.node.id, logParams)
}
return [...results, ...values.backgroundLogs]
@@ -161,13 +129,13 @@ export const pipelineNodeLogsLogic = kea([
})),
reducers({
selectedLogLevels: [
- Object.values(PipelineLogLevel).filter((level) => level !== 'DEBUG'),
+ DEFAULT_LOG_LEVELS,
{
setSelectedLogLevels: (_, { levels }) => levels,
},
],
backgroundLogs: [
- [] as PipelineNodeLogEntry[],
+ [] as LogEntry[],
{
clearBackgroundLogs: () => [],
},
@@ -192,10 +160,10 @@ export const pipelineNodeLogsLogic = kea([
},
],
}),
- selectors(({ actions }) => ({
+ selectors(({ actions, values }) => ({
leadingEntry: [
(s) => [s.logs, s.backgroundLogs],
- (logs: PipelineNodeLogEntry[], backgroundLogs: PipelineNodeLogEntry[]): PipelineNodeLogEntry | null => {
+ (logs: LogEntry[], backgroundLogs: LogEntry[]): LogEntry | null => {
if (backgroundLogs.length) {
return backgroundLogs[0]
}
@@ -207,7 +175,7 @@ export const pipelineNodeLogsLogic = kea([
],
trailingEntry: [
(s) => [s.logs, s.backgroundLogs],
- (logs: PipelineNodeLogEntry[], backgroundLogs: PipelineNodeLogEntry[]): PipelineNodeLogEntry | null => {
+ (logs: LogEntry[], backgroundLogs: LogEntry[]): LogEntry | null => {
if (logs.length) {
return logs[logs.length - 1]
}
@@ -219,14 +187,13 @@ export const pipelineNodeLogsLogic = kea([
],
columns: [
(s) => [s.node],
- (node): LemonTableColumns => {
+ (node): LemonTableColumns => {
return [
{
title: 'Timestamp',
key: 'timestamp',
dataIndex: 'timestamp',
- sorter: (a: PipelineNodeLogEntry, b: PipelineNodeLogEntry) =>
- dayjs(a.timestamp).unix() - dayjs(b.timestamp).unix(),
+ sorter: (a: LogEntry, b: LogEntry) => dayjs(a.timestamp).unix() - dayjs(b.timestamp).unix(),
render: (timestamp: string) => ,
width: 0,
},
@@ -238,26 +205,19 @@ export const pipelineNodeLogsLogic = kea([
: node.backend == PipelineBackend.BatchExport
? 'Run Id'
: 'Source',
- dataIndex:
- node.backend == PipelineBackend.HogFunction
- ? 'instance_id'
- : node.backend == PipelineBackend.BatchExport
- ? 'run_id'
- : 'source',
- key:
- node.backend == PipelineBackend.HogFunction
- ? 'instance_id'
- : node.backend == PipelineBackend.BatchExport
- ? 'run_id'
- : 'source',
-
+ dataIndex: 'instance_id',
+ key: 'instance_id',
render: (instanceId: string) => (
- {node.backend === PipelineBackend.HogFunction ? (
+ {node.backend !== PipelineBackend.Plugin ? (
{
- actions.setInstanceId(instanceId)
+ if (values.instanceId === instanceId) {
+ actions.setInstanceId(null)
+ } else {
+ actions.setInstanceId(instanceId)
+ }
}}
>
{instanceId}
@@ -271,24 +231,9 @@ export const pipelineNodeLogsLogic = kea([
{
width: 100,
title: 'Level',
- key:
- node.backend == PipelineBackend.HogFunction
- ? 'level'
- : node.backend == PipelineBackend.BatchExport
- ? 'level'
- : 'type',
- dataIndex:
- node.backend == PipelineBackend.HogFunction
- ? 'level'
- : node.backend == PipelineBackend.BatchExport
- ? 'level'
- : 'type',
- render:
- node.backend == PipelineBackend.HogFunction
- ? LogLevelDisplay
- : node.backend == PipelineBackend.BatchExport
- ? LogLevelDisplay
- : LogTypeDisplay,
+ key: 'level',
+ dataIndex: 'level',
+ render: LogLevelDisplay,
},
{
title: 'Message',
@@ -296,7 +241,21 @@ export const pipelineNodeLogsLogic = kea([
dataIndex: 'message',
render: (message: string) => {message}
,
},
- ] as LemonTableColumns
+ ] as LemonTableColumns
+ },
+ ],
+
+ selectedLogLevelsForAPI: [
+ (s) => [s.selectedLogLevels],
+ (logLevels): LogEntryLevel[] => {
+ const uniqueLevels = new Set(logLevels)
+ if (uniqueLevels.has('WARN')) {
+ uniqueLevels.add('WARNING')
+ }
+ if (uniqueLevels.has('WARNING')) {
+ uniqueLevels.add('WARN')
+ }
+ return Array.from(uniqueLevels)
},
],
})),
diff --git a/frontend/src/scenes/pipeline/utils.tsx b/frontend/src/scenes/pipeline/utils.tsx
index 4f7e1ed393cce..9a587b5d84aa8 100644
--- a/frontend/src/scenes/pipeline/utils.tsx
+++ b/frontend/src/scenes/pipeline/utils.tsx
@@ -18,15 +18,14 @@ import { urls } from 'scenes/urls'
import {
BatchExportConfiguration,
BatchExportService,
+ LogEntryLevel,
PipelineNodeTab,
PipelineStage,
PluginConfigTypeNew,
- PluginLogEntryType,
PluginType,
} from '~/types'
import { pipelineAccessLogic } from './pipelineAccessLogic'
-import { PipelineLogLevel } from './pipelineNodeLogsLogic'
import {
Destination,
ImportApp,
@@ -190,59 +189,23 @@ export function RenderBatchExportIcon({
)
}
-export const logLevelToTypeFilter = (level: PipelineLogLevel): PluginLogEntryType => {
- switch (level) {
- case PipelineLogLevel.Debug:
- return PluginLogEntryType.Debug
- case PipelineLogLevel.Error:
- return PluginLogEntryType.Error
- case PipelineLogLevel.Info:
- return PluginLogEntryType.Info
- case PipelineLogLevel.Log:
- return PluginLogEntryType.Log
- case PipelineLogLevel.Warning:
- return PluginLogEntryType.Warn
- default:
- throw new Error('unknown log level')
- }
-}
-
-export const logLevelsToTypeFilters = (levels: PipelineLogLevel[]): PluginLogEntryType[] =>
- levels.map((l) => logLevelToTypeFilter(l))
-
-export const typeToLogLevel = (type: PluginLogEntryType): PipelineLogLevel => {
- switch (type) {
- case PluginLogEntryType.Debug:
- return PipelineLogLevel.Debug
- case PluginLogEntryType.Error:
- return PipelineLogLevel.Error
- case PluginLogEntryType.Info:
- return PipelineLogLevel.Info
- case PluginLogEntryType.Log:
- return PipelineLogLevel.Log
- case PluginLogEntryType.Warn:
- return PipelineLogLevel.Warning
- default:
- throw new Error('unknown log type')
- }
-}
-
-export function LogLevelDisplay(level: PipelineLogLevel): JSX.Element {
+export function LogLevelDisplay(level: LogEntryLevel): JSX.Element {
let color: string | undefined
switch (level) {
- case PipelineLogLevel.Debug:
+ case 'DEBUG':
color = 'text-muted'
break
- case PipelineLogLevel.Log:
+ case 'LOG':
color = 'text-text-3000'
break
- case PipelineLogLevel.Info:
+ case 'INFO':
color = 'text-primary'
break
- case PipelineLogLevel.Warning:
+ case 'WARNING':
+ case 'WARN':
color = 'text-warning'
break
- case PipelineLogLevel.Error:
+ case 'ERROR':
color = 'text-danger'
break
default:
@@ -251,23 +214,6 @@ export function LogLevelDisplay(level: PipelineLogLevel): JSX.Element {
return {level}
}
-export function LogTypeDisplay(type: PluginLogEntryType): JSX.Element {
- return LogLevelDisplay(typeToLogLevel(type))
-}
-
-export const humanFriendlyFrequencyName = (frequency: Destination['interval']): string => {
- switch (frequency) {
- case 'realtime':
- return 'Realtime'
- case 'day':
- return 'Daily'
- case 'hour':
- return 'Hourly'
- case 'every 5 minutes':
- return '5 min'
- }
-}
-
export function nameColumn<
T extends { stage: PipelineStage; id: number; name: string; description?: string }
>(): LemonTableColumn {
diff --git a/frontend/src/scenes/saved-insights/SavedInsights.tsx b/frontend/src/scenes/saved-insights/SavedInsights.tsx
index 3c79822d2c8ec..7eae17f38e8db 100644
--- a/frontend/src/scenes/saved-insights/SavedInsights.tsx
+++ b/frontend/src/scenes/saved-insights/SavedInsights.tsx
@@ -9,6 +9,7 @@ import {
IconHogQL,
IconLifecycle,
IconPerson,
+ IconPieChart,
IconPlusSmall,
IconRetention,
IconStar,
@@ -288,19 +289,19 @@ export const QUERY_TYPES_METADATA: Record = {
[NodeKind.WebOverviewQuery]: {
name: 'Overview Stats',
description: 'View overview stats for a website',
- icon: IconTrends,
+ icon: IconPieChart,
inMenu: true,
},
[NodeKind.WebStatsTableQuery]: {
name: 'Web Table',
description: 'A table of results from web analytics, with a breakdown',
- icon: IconTrends,
+ icon: IconPieChart,
inMenu: true,
},
[NodeKind.WebTopClicksQuery]: {
name: 'Top Clicks',
description: 'View top clicks for a website',
- icon: IconTrends,
+ icon: IconPieChart,
inMenu: true,
},
[NodeKind.HogQuery]: {
@@ -309,6 +310,12 @@ export const QUERY_TYPES_METADATA: Record = {
icon: IconHogQL,
inMenu: true,
},
+ [NodeKind.SessionAttributionExplorerQuery]: {
+ name: 'Session Attribution',
+ description: 'Session Attribution Explorer',
+ icon: IconPieChart,
+ inMenu: true,
+ },
}
export const INSIGHT_TYPE_OPTIONS: LemonSelectOptions = [
diff --git a/frontend/src/scenes/sceneTypes.ts b/frontend/src/scenes/sceneTypes.ts
index eef8381063270..56ed570a68a10 100644
--- a/frontend/src/scenes/sceneTypes.ts
+++ b/frontend/src/scenes/sceneTypes.ts
@@ -50,6 +50,7 @@ export enum Scene {
DataWarehouseExternal = 'DataWarehouseExternal',
DataWarehouseTable = 'DataWarehouseTable',
DataWarehouseSettings = 'DataWarehouseSettings',
+ dataWarehouseSourceSettings = 'DataWarehouseSourceSettings',
DataWarehouseRedirect = 'DataWarehouseRedirect',
OrganizationCreateFirst = 'OrganizationCreate',
ProjectHomepage = 'ProjectHomepage',
diff --git a/frontend/src/scenes/scenes.ts b/frontend/src/scenes/scenes.ts
index 6133cf6fa1afe..eadcb5aaf6e24 100644
--- a/frontend/src/scenes/scenes.ts
+++ b/frontend/src/scenes/scenes.ts
@@ -251,6 +251,11 @@ export const sceneConfigurations: Record = {
name: 'Data warehouse settings',
defaultDocsPath: '/docs/data-warehouse',
},
+ [Scene.dataWarehouseSourceSettings]: {
+ projectBased: true,
+ name: 'Data warehouse source settings',
+ defaultDocsPath: '/docs/data-warehouse',
+ },
[Scene.DataWarehouseRedirect]: {
name: 'Data warehouse redirect',
},
@@ -561,6 +566,7 @@ export const routes: Record = {
[urls.dataWarehouseTable()]: Scene.DataWarehouseTable,
[urls.dataWarehouseSettings(':tab')]: Scene.DataWarehouseSettings,
[urls.dataWarehouseRedirect(':kind')]: Scene.DataWarehouseRedirect,
+ [urls.dataWarehouseSourceSettings(':id', ':tab')]: Scene.dataWarehouseSourceSettings,
[urls.featureFlags()]: Scene.FeatureFlags,
[urls.featureFlag(':id')]: Scene.FeatureFlag,
[urls.annotations()]: Scene.DataManagement,
diff --git a/frontend/src/scenes/settings/project/ManagedReverseProxy.tsx b/frontend/src/scenes/settings/project/ManagedReverseProxy.tsx
index 23948a65ed44d..dc753a32a35ab 100644
--- a/frontend/src/scenes/settings/project/ManagedReverseProxy.tsx
+++ b/frontend/src/scenes/settings/project/ManagedReverseProxy.tsx
@@ -25,6 +25,11 @@ import { proxyLogic, ProxyRecord } from './proxyLogic'
const MAX_PROXY_RECORDS = 3
+const statusText = {
+ valid: 'live',
+ timed_out: 'timed out',
+}
+
export function ManagedReverseProxy(): JSX.Element {
const { formState, proxyRecords, proxyRecordsLoading } = useValues(proxyLogic)
const { showForm, deleteRecord } = useActions(proxyLogic)
@@ -58,12 +63,17 @@ export function ManagedReverseProxy(): JSX.Element {
)}
>
{status === 'issuing' && }
- {status === 'valid' ? 'live' : status}
+ {statusText[status] || status}
{status === 'waiting' && (
)}
+ {status === 'timed_out' && (
+
+
+
+ )}
)
},
diff --git a/frontend/src/scenes/surveys/QuestionBranchingInput.tsx b/frontend/src/scenes/surveys/QuestionBranchingInput.tsx
index 2a6b69f0e6dca..3935712027bc7 100644
--- a/frontend/src/scenes/surveys/QuestionBranchingInput.tsx
+++ b/frontend/src/scenes/surveys/QuestionBranchingInput.tsx
@@ -35,7 +35,7 @@ export function QuestionBranchingInput({
{
const handleSelect = (): void => {
let specificQuestionIndex
@@ -164,7 +164,7 @@ function QuestionResponseBasedBranchingInput({
{
let specificQuestionIndex
if (nextStep.startsWith(SurveyQuestionBranchingType.SpecificQuestion)) {
diff --git a/frontend/src/scenes/surveys/SurveyEdit.tsx b/frontend/src/scenes/surveys/SurveyEdit.tsx
index 8eca8f3d910d4..4fc3a353f13ce 100644
--- a/frontend/src/scenes/surveys/SurveyEdit.tsx
+++ b/frontend/src/scenes/surveys/SurveyEdit.tsx
@@ -229,6 +229,7 @@ export default function SurveyEdit(): JSX.Element {
index: number
) => ({
key: index,
+ dataAttr: `survey-question-panel-${index}`,
header: (
}
diff --git a/frontend/src/scenes/surveys/SurveyEditQuestionRow.tsx b/frontend/src/scenes/surveys/SurveyEditQuestionRow.tsx
index 900f2b3d22470..e0e711b9f4e40 100644
--- a/frontend/src/scenes/surveys/SurveyEditQuestionRow.tsx
+++ b/frontend/src/scenes/surveys/SurveyEditQuestionRow.tsx
@@ -7,10 +7,8 @@ import { IconPlusSmall, IconTrash } from '@posthog/icons'
import { LemonButton, LemonCheckbox, LemonDialog, LemonInput, LemonSelect } from '@posthog/lemon-ui'
import { useActions, useValues } from 'kea'
import { Group } from 'kea-forms'
-import { FEATURE_FLAGS } from 'lib/constants'
import { SortableDragIcon } from 'lib/lemon-ui/icons'
import { LemonField } from 'lib/lemon-ui/LemonField'
-import { featureFlagLogic as enabledFeaturesLogic } from 'lib/logic/featureFlagLogic'
import { Survey, SurveyQuestionType } from '~/types'
@@ -117,8 +115,6 @@ export function SurveyEditQuestionHeader({
export function SurveyEditQuestionGroup({ index, question }: { index: number; question: any }): JSX.Element {
const { survey, descriptionContentType } = useValues(surveyLogic)
const { setDefaultForQuestionType, setSurveyValue, resetBranchingForQuestion } = useActions(surveyLogic)
- const { featureFlags } = useValues(enabledFeaturesLogic)
- const hasBranching = featureFlags[FEATURE_FLAGS.SURVEYS_BRANCHING_LOGIC]
const initialDescriptionContentType = descriptionContentType(index) ?? 'text'
@@ -167,30 +163,35 @@ export function SurveyEditQuestionGroup({ index, question }: { index: number; qu
{
label: SurveyQuestionLabel[SurveyQuestionType.Open],
value: SurveyQuestionType.Open,
+ 'data-attr': `survey-question-type-${index}-${SurveyQuestionType.Open}`,
},
{
label: 'Link/Notification',
value: SurveyQuestionType.Link,
+ 'data-attr': `survey-question-type-${index}-${SurveyQuestionType.Link}`,
},
{
label: 'Rating',
value: SurveyQuestionType.Rating,
+ 'data-attr': `survey-question-type-${index}-${SurveyQuestionType.Rating}`,
},
...[
{
label: 'Single choice select',
value: SurveyQuestionType.SingleChoice,
+ 'data-attr': `survey-question-type-${index}-${SurveyQuestionType.SingleChoice}`,
},
{
label: 'Multiple choice select',
value: SurveyQuestionType.MultipleChoice,
+ 'data-attr': `survey-question-type-${index}-${SurveyQuestionType.MultipleChoice}`,
},
],
]}
/>
-
+
{({ value, onChange }) => (
@@ -383,7 +384,7 @@ export function SurveyEditQuestionGroup({ index, question }: { index: number; qu
}
/>
- {hasBranching && }
+
)
diff --git a/frontend/src/scenes/urls.ts b/frontend/src/scenes/urls.ts
index e7d90253b5902..73925a37f7f77 100644
--- a/frontend/src/scenes/urls.ts
+++ b/frontend/src/scenes/urls.ts
@@ -164,6 +164,8 @@ export const urls = {
dataWarehouseSettings: (tab?: DataWarehouseSettingsTab | ':tab'): string =>
`/data-warehouse/settings/${tab ? tab : DataWarehouseSettingsTab.Managed}`,
dataWarehouseRedirect: (kind: string): string => `/data-warehouse/${kind}/redirect`,
+ dataWarehouseSourceSettings: (id: string, tab?: DataWarehouseSettingsTab | ':tab'): string =>
+ `/data-warehouse/settings/${tab ? tab : DataWarehouseSettingsTab.Managed}/${id}`,
annotations: (): string => '/data-management/annotations',
annotation: (id: AnnotationType['id'] | ':id'): string => `/data-management/annotations/${id}`,
projectApps: (tab?: PluginTab): string => `/apps${tab ? `?tab=${tab}` : ''}`,
diff --git a/frontend/src/scenes/web-analytics/SessionDebugger/SessionAttributionExplorerScene.tsx b/frontend/src/scenes/web-analytics/SessionAttributionExplorer/SessionAttributionExplorerScene.tsx
similarity index 69%
rename from frontend/src/scenes/web-analytics/SessionDebugger/SessionAttributionExplorerScene.tsx
rename to frontend/src/scenes/web-analytics/SessionAttributionExplorer/SessionAttributionExplorerScene.tsx
index dacf2ff8caccd..3289068e33fc5 100644
--- a/frontend/src/scenes/web-analytics/SessionDebugger/SessionAttributionExplorerScene.tsx
+++ b/frontend/src/scenes/web-analytics/SessionAttributionExplorer/SessionAttributionExplorerScene.tsx
@@ -1,4 +1,5 @@
-import { IconCollapse, IconExpand } from '@posthog/icons'
+import { IconCollapse, IconExpand, IconPlus } from '@posthog/icons'
+import { LemonMenu, LemonSwitch } from '@posthog/lemon-ui'
import { useActions, useValues } from 'kea'
import { supportLogic } from 'lib/components/Support/supportLogic'
import { IconFeedback } from 'lib/lemon-ui/icons'
@@ -11,7 +12,7 @@ import { preflightLogic } from 'scenes/PreflightCheck/preflightLogic'
import { SceneExport } from 'scenes/sceneTypes'
import { Query } from '~/queries/Query/Query'
-import { DataTableNode, HogQLQuery } from '~/queries/schema'
+import { DataTableNode, HogQLQuery, SessionAttributionGroupBy } from '~/queries/schema'
import { isSessionPropertyFilters } from '~/queries/schema-guards'
import { QueryContext, QueryContextColumnComponent } from '~/queries/types'
@@ -103,7 +104,7 @@ const queryContext: QueryContext = {
title: 'UTM campaign',
render: ExpandableDataCell,
},
- has_ad_id: {
+ ad_ids: {
title: 'Ad IDs',
render: ExpandableDataCell,
},
@@ -112,6 +113,73 @@ const queryContext: QueryContext = {
render: ExpandableDataCell,
},
},
+ emptyStateHeading: 'There are no matching sessions for this query',
+ emptyStateDetail: 'Try changing the date range, or changing the property filters.',
+}
+
+const groupByOptions = [
+ {
+ label: 'Channel type',
+ value: SessionAttributionGroupBy.ChannelType,
+ },
+ {
+ label: 'Referring domain',
+ value: SessionAttributionGroupBy.ReferringDomain,
+ },
+ {
+ label: 'UTM source',
+ value: SessionAttributionGroupBy.Source,
+ },
+ {
+ label: 'UTM medium',
+ value: SessionAttributionGroupBy.Medium,
+ },
+ {
+ label: 'UTM campaign',
+ value: SessionAttributionGroupBy.Campaign,
+ },
+ {
+ label: 'Ad IDs',
+ value: SessionAttributionGroupBy.AdIds,
+ },
+ {
+ label: 'Entry URL',
+ value: SessionAttributionGroupBy.InitialURL,
+ },
+]
+
+export const GroupByFilter = (): JSX.Element => {
+ const { groupBy } = useValues(sessionAttributionExplorerLogic)
+ const { enableGroupBy, disableGroupBy } = useActions(sessionAttributionExplorerLogic)
+
+ return (
+
+ {
+ return {
+ label: () => (
+ {
+ if (val) {
+ enableGroupBy(value)
+ } else {
+ disableGroupBy(value)
+ }
+ }}
+ fullWidth={true}
+ label={label}
+ />
+ ),
+ }
+ })}
+ >
+ } size="small" type="secondary">
+ Group by
+
+
+
+ )
}
export function SessionAttributionExplorer(): JSX.Element {
@@ -134,9 +202,8 @@ export function SessionAttributionExplorer(): JSX.Element {
Channel type.
- The table below groups sessions with the same value for Channel type, referring domain,
- source, medium, and which ad ids are present. It shows the count of sessions in each group,
- and some example entry URLs from that group.
+ The table below shows sessions that are grouped, and you can change how they are grouped.
+ Any columns that are not used in the grouping will show example values.
If you believe that a session is attributed incorrectly, please let us know!
@@ -159,17 +226,18 @@ export function SessionAttributionExplorer(): JSX.Element {
) : null}
+
context={queryContext}
query={query}
setQuery={(query) => {
const source = query.source as HogQLQuery
- if (source.filters?.properties && isSessionPropertyFilters(source.filters.properties)) {
+ if (source.filters && isSessionPropertyFilters(source.filters.properties)) {
setProperties(source.filters.properties)
+ } else {
+ setProperties([])
}
- if (source.filters?.dateRange) {
- setDateRange(source.filters.dateRange)
- }
+ setDateRange(source.filters?.dateRange ?? null)
}}
/>
diff --git a/frontend/src/scenes/web-analytics/SessionAttributionExplorer/__mocks__/sessionAttributionQuery.json b/frontend/src/scenes/web-analytics/SessionAttributionExplorer/__mocks__/sessionAttributionQuery.json
new file mode 100644
index 0000000000000..8b45fc79953e2
--- /dev/null
+++ b/frontend/src/scenes/web-analytics/SessionAttributionExplorer/__mocks__/sessionAttributionQuery.json
@@ -0,0 +1,181 @@
+{
+ "cache_key": "cache_ffcae1d8084f585670caee559af58a79",
+ "cache_target_age": "2024-07-10T09:38:27.761334Z",
+ "columns": [
+ "context.columns.count",
+ "context.columns.channel_type",
+ "context.columns.referring_domain",
+ "context.columns.utm_source",
+ "context.columns.utm_medium",
+ "context.columns.utm_campaign",
+ "context.columns.ad_ids",
+ "context.columns.example_entry_urls"
+ ],
+ "error": null,
+ "hasMore": false,
+ "hogql": "SELECT\n count() AS `context.columns.count`,\n $channel_type AS `context.columns.channel_type`,\n $entry_referring_domain AS `context.columns.referring_domain`,\n $entry_utm_source AS `context.columns.utm_source`,\n $entry_utm_medium AS `context.columns.utm_medium`,\n topK(10)($entry_utm_campaign) AS `context.columns.utm_campaign`,\n topK(10)(nullIf(arrayStringConcat([if(isNotNull($entry_gclid), 'glcid', NULL), if(isNotNull($entry_gad_source), 'gad_source', NULL)], ','), '')) AS `context.columns.ad_ids`,\n topK(10)($entry_current_url) AS `context.columns.example_entry_urls`\nFROM\n sessions\nWHERE\n and(1, 1, less($start_timestamp, toDateTime('2024-07-10 09:38:12.535618')), greaterOrEquals($start_timestamp, toDateTime('2024-07-03 09:38:12.535669')))\nGROUP BY\n `context.columns.channel_type`,\n `context.columns.referring_domain`,\n `context.columns.utm_source`,\n `context.columns.utm_medium`\nORDER BY\n `context.columns.count` DESC\nLIMIT 101\nOFFSET 0",
+ "is_cached": true,
+ "last_refresh": "2024-07-10T09:38:12.761334Z",
+ "limit": 100,
+ "modifiers": {
+ "bounceRatePageViewMode": "count_pageviews",
+ "dataWarehouseEventsModifiers": null,
+ "debug": null,
+ "inCohortVia": "auto",
+ "materializationMode": "legacy_null_as_null",
+ "optimizeJoinedFilters": false,
+ "personsArgMaxVersion": "auto",
+ "personsJoinMode": null,
+ "personsOnEventsMode": "disabled",
+ "s3TableUseInvalidColumns": null,
+ "sessionTableVersion": "v2"
+ },
+ "next_allowed_client_refresh": "2024-07-10T09:39:12.761339Z",
+ "offset": 0,
+ "query_status": {
+ "complete": false,
+ "end_time": null,
+ "error": false,
+ "error_message": null,
+ "expiration_time": null,
+ "id": "817cdeac-13ef-490c-b64c-9ace3990f598",
+ "labels": null,
+ "query_async": true,
+ "query_progress": null,
+ "results": null,
+ "start_time": "2024-07-10T10:06:19.839326Z",
+ "task_id": "90e54ce6-f8b1-4cb7-9af7-3d2f66116452",
+ "team_id": 1
+ },
+ "results": [
+ [
+ 17,
+ "Unknown",
+ "localhost:8000",
+ null,
+ null,
+ [],
+ [],
+ [
+ "http://localhost:8000/project/1/web/session-attribution-debugger",
+ "http://localhost:8000/project/1/web/session-attribution-explorer",
+ "http://localhost:8000/project/1/insights/new",
+ "http://localhost:8000/project/1/web/session-attribution-explorer?filters=%5B%7B%22key%22%3A%22%24entry_pathname%22%2C%22value%22%3A%5B%22%2Ffiles%2F%22%5D%2C%22operator%22%3A%22exact%22%2C%22type%22%3A%22session%22%7D%5D",
+ "http://localhost:8000/login?next=/project/1/web",
+ "http://localhost:8000/project/1/web/session-attribution-explorer?properties=%5B%7B%22key%22%3A%22%24channel_type%22%2C%22value%22%3A%5B%22Referral%22%5D%2C%22operator%22%3A%22exact%22%2C%22type%22%3A%22session%22%7D%5D&dateRange=%7B%22date_from%22%3A%22dStart%22%7D",
+ "http://localhost:8000/project/1/data-management/events"
+ ]
+ ],
+ [
+ 6,
+ "Direct",
+ "$direct",
+ null,
+ null,
+ [],
+ [],
+ [
+ "http://localhost:8000/",
+ "http://localhost:8000/login?next=/",
+ "http://localhost:8000/project/1/web/session-attribution-explorer?dateRange=%7B%22date_from%22%3A%22-180d%22%7D"
+ ]
+ ]
+ ],
+ "timezone": "UTC",
+ "timings": [
+ {
+ "k": "./session_attribution_query_runner",
+ "t": 0.00008904199057724327
+ },
+ {
+ "k": "./parse_select_cpp",
+ "t": 0.018147832990507595
+ },
+ {
+ "k": "./query",
+ "t": 0.0003516669967211783
+ },
+ {
+ "k": "./replace_placeholders",
+ "t": 0.0007442920032190159
+ },
+ {
+ "k": "./max_limit",
+ "t": 0.000022374995751306415
+ },
+ {
+ "k": "./hogql/prepare_ast/clone",
+ "t": 0.0001059580099536106
+ },
+ {
+ "k": "./hogql/prepare_ast/create_hogql_database",
+ "t": 0.03962483300711028
+ },
+ {
+ "k": "./hogql/prepare_ast/resolve_types",
+ "t": 0.0003752080083359033
+ },
+ {
+ "k": "./hogql/prepare_ast",
+ "t": 0.04015908399014734
+ },
+ {
+ "k": "./hogql/print_ast/printer",
+ "t": 0.0002745000092545524
+ },
+ {
+ "k": "./hogql/print_ast",
+ "t": 0.0002916249941335991
+ },
+ {
+ "k": "./hogql",
+ "t": 0.040463582990923896
+ },
+ {
+ "k": "./print_ast/create_hogql_database",
+ "t": 0.0375871249998454
+ },
+ {
+ "k": "./print_ast/resolve_types",
+ "t": 0.0003574169968487695
+ },
+ {
+ "k": "./print_ast/resolve_property_types",
+ "t": 0.00029016700864303857
+ },
+ {
+ "k": "./print_ast/resolve_lazy_tables",
+ "t": 0.03512458399927709
+ },
+ {
+ "k": "./print_ast/swap_properties",
+ "t": 0.0009043330064741895
+ },
+ {
+ "k": "./print_ast/printer",
+ "t": 0.0018909170030383393
+ },
+ {
+ "k": "./print_ast",
+ "t": 0.07628516700060572
+ },
+ {
+ "k": "./clickhouse_execute",
+ "t": 0.10822070798894856
+ },
+ {
+ "k": ".",
+ "t": 0.2550588330050232
+ }
+ ],
+ "types": [
+ ["context.columns.count", "UInt64"],
+ ["context.columns.channel_type", "String"],
+ ["context.columns.referring_domain", "Nullable(String)"],
+ ["context.columns.utm_source", "Nullable(String)"],
+ ["context.columns.utm_medium", "Nullable(String)"],
+ ["context.columns.utm_campaign", "Array(String)"],
+ ["context.columns.ad_ids", "Array(String)"],
+ ["context.columns.example_entry_urls", "Array(String)"]
+ ]
+}
diff --git a/frontend/src/scenes/web-analytics/SessionAttributionExplorer/__mocks__/sessionAttributionQueryStatus.json b/frontend/src/scenes/web-analytics/SessionAttributionExplorer/__mocks__/sessionAttributionQueryStatus.json
new file mode 100644
index 0000000000000..9eeba429b6db2
--- /dev/null
+++ b/frontend/src/scenes/web-analytics/SessionAttributionExplorer/__mocks__/sessionAttributionQueryStatus.json
@@ -0,0 +1,183 @@
+{
+ "query_status": {
+ "complete": true,
+ "end_time": "2024-07-10T10:06:20.116Z",
+ "error": false,
+ "error_message": null,
+ "expiration_time": "2024-07-10T10:16:20.116Z",
+ "id": "817cdeac-13ef-490c-b64c-9ace3990f598",
+ "labels": null,
+ "query_async": true,
+ "query_progress": null,
+ "results": {
+ "cache_key": "cache_ffcae1d8084f585670caee559af58a79",
+ "cache_target_age": null,
+ "columns": [
+ "context.columns.count",
+ "context.columns.channel_type",
+ "context.columns.referring_domain",
+ "context.columns.utm_source",
+ "context.columns.utm_medium",
+ "context.columns.utm_campaign",
+ "context.columns.ad_ids",
+ "context.columns.example_entry_urls"
+ ],
+ "error": null,
+ "hasMore": false,
+ "hogql": "SELECT\n count() AS `context.columns.count`,\n $channel_type AS `context.columns.channel_type`,\n $entry_referring_domain AS `context.columns.referring_domain`,\n $entry_utm_source AS `context.columns.utm_source`,\n $entry_utm_medium AS `context.columns.utm_medium`,\n topK(10)($entry_utm_campaign) AS `context.columns.utm_campaign`,\n topK(10)(nullIf(arrayStringConcat([if(isNotNull($entry_gclid), 'glcid', NULL), if(isNotNull($entry_gad_source), 'gad_source', NULL)], ','), '')) AS `context.columns.ad_ids`,\n topK(10)($entry_current_url) AS `context.columns.example_entry_urls`\nFROM\n sessions\nWHERE\n and(1, 1, less($start_timestamp, toDateTime('2024-07-10 10:06:19.898500')), greaterOrEquals($start_timestamp, toDateTime('2024-07-03 10:06:19.898633')))\nGROUP BY\n `context.columns.channel_type`,\n `context.columns.referring_domain`,\n `context.columns.utm_source`,\n `context.columns.utm_medium`\nORDER BY\n `context.columns.count` DESC\nLIMIT 101\nOFFSET 0",
+ "is_cached": false,
+ "last_refresh": "2024-07-10T10:06:20.115209Z",
+ "limit": 100,
+ "modifiers": {
+ "bounceRatePageViewMode": "count_pageviews",
+ "dataWarehouseEventsModifiers": null,
+ "debug": null,
+ "inCohortVia": "auto",
+ "materializationMode": "legacy_null_as_null",
+ "optimizeJoinedFilters": false,
+ "personsArgMaxVersion": "auto",
+ "personsJoinMode": null,
+ "personsOnEventsMode": "disabled",
+ "s3TableUseInvalidColumns": null,
+ "sessionTableVersion": "v2"
+ },
+ "next_allowed_client_refresh": "2024-07-10T10:07:20.115214Z",
+ "offset": 0,
+ "query_status": null,
+ "results": [
+ [
+ 17,
+ "Unknown",
+ "localhost:8000",
+ null,
+ null,
+ [],
+ [],
+ [
+ "http://localhost:8000/project/1/web/session-attribution-debugger",
+ "http://localhost:8000/project/1/web/session-attribution-explorer",
+ "http://localhost:8000/project/1/insights/new",
+ "http://localhost:8000/project/1/web/session-attribution-explorer?filters=%5B%7B%22key%22%3A%22%24entry_pathname%22%2C%22value%22%3A%5B%22%2Ffiles%2F%22%5D%2C%22operator%22%3A%22exact%22%2C%22type%22%3A%22session%22%7D%5D",
+ "http://localhost:8000/login?next=/project/1/web",
+ "http://localhost:8000/project/1/web/session-attribution-explorer?properties=%5B%7B%22key%22%3A%22%24channel_type%22%2C%22value%22%3A%5B%22Referral%22%5D%2C%22operator%22%3A%22exact%22%2C%22type%22%3A%22session%22%7D%5D&dateRange=%7B%22date_from%22%3A%22dStart%22%7D",
+ "http://localhost:8000/project/1/data-management/events"
+ ]
+ ],
+ [
+ 6,
+ "Direct",
+ "$direct",
+ null,
+ null,
+ [],
+ [],
+ [
+ "http://localhost:8000/",
+ "http://localhost:8000/login?next=/",
+ "http://localhost:8000/project/1/web/session-attribution-explorer?dateRange=%7B%22date_from%22%3A%22-180d%22%7D"
+ ]
+ ]
+ ],
+ "timezone": "UTC",
+ "timings": [
+ {
+ "k": "./session_attribution_query_runner",
+ "t": 0.00018341699615120888
+ },
+ {
+ "k": "./parse_select_cpp",
+ "t": 0.013566417008405551
+ },
+ {
+ "k": "./query",
+ "t": 6.879199645482004e-5
+ },
+ {
+ "k": "./replace_placeholders",
+ "t": 0.0007592500041937456
+ },
+ {
+ "k": "./max_limit",
+ "t": 1.8708000425249338e-5
+ },
+ {
+ "k": "./hogql/prepare_ast/clone",
+ "t": 0.00010145900887437165
+ },
+ {
+ "k": "./hogql/prepare_ast/create_hogql_database",
+ "t": 0.033654708007816225
+ },
+ {
+ "k": "./hogql/prepare_ast/resolve_types",
+ "t": 0.0007856669981265441
+ },
+ {
+ "k": "./hogql/prepare_ast",
+ "t": 0.034647958003915846
+ },
+ {
+ "k": "./hogql/print_ast/printer",
+ "t": 0.0004404580104164779
+ },
+ {
+ "k": "./hogql/print_ast",
+ "t": 0.0004706659965449944
+ },
+ {
+ "k": "./hogql",
+ "t": 0.035132000004523434
+ },
+ {
+ "k": "./print_ast/create_hogql_database",
+ "t": 0.03552412499266211
+ },
+ {
+ "k": "./print_ast/resolve_types",
+ "t": 0.0016556659975321963
+ },
+ {
+ "k": "./print_ast/resolve_property_types",
+ "t": 0.0003872499946737662
+ },
+ {
+ "k": "./print_ast/resolve_lazy_tables",
+ "t": 0.031225833008647896
+ },
+ {
+ "k": "./print_ast/swap_properties",
+ "t": 0.0007154159975470975
+ },
+ {
+ "k": "./print_ast/printer",
+ "t": 0.0016986249975161627
+ },
+ {
+ "k": "./print_ast",
+ "t": 0.07132712499878835
+ },
+ {
+ "k": "./clickhouse_execute",
+ "t": 0.10960962499666493
+ },
+ {
+ "k": ".",
+ "t": 0.2371137909940444
+ }
+ ],
+ "types": [
+ ["context.columns.count", "UInt64"],
+ ["context.columns.channel_type", "String"],
+ ["context.columns.referring_domain", "Nullable(String)"],
+ ["context.columns.utm_source", "Nullable(String)"],
+ ["context.columns.utm_medium", "Nullable(String)"],
+ ["context.columns.utm_campaign", "Array(String)"],
+ ["context.columns.ad_ids", "Array(String)"],
+ ["context.columns.example_entry_urls", "Array(String)"]
+ ]
+ },
+ "start_time": "2024-07-10T10:06:19.839Z",
+ "task_id": null,
+ "team_id": 1
+ }
+}
diff --git a/frontend/src/scenes/web-analytics/SessionAttributionExplorer/sessionAttributionExplorer.stories.tsx b/frontend/src/scenes/web-analytics/SessionAttributionExplorer/sessionAttributionExplorer.stories.tsx
new file mode 100644
index 0000000000000..b98489824fd5f
--- /dev/null
+++ b/frontend/src/scenes/web-analytics/SessionAttributionExplorer/sessionAttributionExplorer.stories.tsx
@@ -0,0 +1,44 @@
+import { Meta, StoryFn } from '@storybook/react'
+import { router } from 'kea-router'
+import { useEffect } from 'react'
+import { App } from 'scenes/App'
+import { urls } from 'scenes/urls'
+
+import { mswDecorator } from '~/mocks/browser'
+
+const meta: Meta = {
+ title: 'Scenes-App/SessionAttributionExplorer',
+ parameters: {
+ layout: 'fullscreen',
+ viewMode: 'story',
+ mockDate: '2022-03-11',
+ },
+ decorators: [
+ mswDecorator({
+ get: {
+ '/api/projects/:team_id/query/:id/': async (_, res, ctx) => {
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
+ return res(ctx.json(require('./__mocks__/sessionAttributionQueryStatus.json')))
+ },
+ },
+ post: {
+ '/api/projects/:team_id/query/': async (_, res, ctx) => {
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
+ return res(ctx.json(require('./__mocks__/sessionAttributionQuery.json')))
+ },
+ },
+ }),
+ ],
+}
+export default meta
+
+// Session Attribution Explorer
+export const SessionAttributionExplorer: StoryFn = () => {
+ useEffect(() => {
+ router.actions.push(urls.sessionAttributionExplorer())
+ }, [])
+ return
+}
+SessionAttributionExplorer.parameters = {
+ testOptions: { waitForSelector: '.LemonTable__boundary' },
+}
diff --git a/frontend/src/scenes/web-analytics/SessionDebugger/sessionAttributionExplorerLogic.ts b/frontend/src/scenes/web-analytics/SessionAttributionExplorer/sessionAttributionExplorerLogic.ts
similarity index 66%
rename from frontend/src/scenes/web-analytics/SessionDebugger/sessionAttributionExplorerLogic.ts
rename to frontend/src/scenes/web-analytics/SessionAttributionExplorer/sessionAttributionExplorerLogic.ts
index 765cbd35cc89a..8465e0c32b871 100644
--- a/frontend/src/scenes/web-analytics/SessionDebugger/sessionAttributionExplorerLogic.ts
+++ b/frontend/src/scenes/web-analytics/SessionAttributionExplorer/sessionAttributionExplorerLogic.ts
@@ -4,13 +4,25 @@ import { TaxonomicFilterGroupType } from 'lib/components/TaxonomicFilter/types'
import { featureFlagLogic } from 'lib/logic/featureFlagLogic'
import { urls } from 'scenes/urls'
-import { DataTableNode, DateRange, HogQLQuery, NodeKind } from '~/queries/schema'
+import {
+ DataTableNode,
+ DateRange,
+ NodeKind,
+ SessionAttributionExplorerQuery,
+ SessionAttributionGroupBy,
+} from '~/queries/schema'
import { isSessionPropertyFilters } from '~/queries/schema-guards'
import { SessionPropertyFilter } from '~/types'
import type { sessionAttributionExplorerLogicType } from './sessionAttributionExplorerLogicType'
export const initialProperties = [] as SessionPropertyFilter[]
+export const initialGroupBy = [
+ SessionAttributionGroupBy.Source,
+ SessionAttributionGroupBy.Medium,
+ SessionAttributionGroupBy.ChannelType,
+ SessionAttributionGroupBy.ReferringDomain,
+]
export const defaultDateRange: DateRange = { date_from: '-7d', date_to: 'now' }
export const sessionAttributionExplorerLogic = kea([
path(['scenes', 'webAnalytics', 'sessionDebuggerLogic']),
@@ -19,10 +31,16 @@ export const sessionAttributionExplorerLogic = kea ({ properties }),
- setDateRange: (dateRange: DateRange) => ({ dateRange }),
+ setDateRange: (dateRange: DateRange | null) => ({ dateRange }),
setStateFromUrl: (state: { properties: SessionPropertyFilter[]; dateRange: DateRange | null }) => ({
state,
}),
+ enableGroupBy: (groupBy: SessionAttributionGroupBy) => {
+ return { groupBy }
+ },
+ disableGroupBy: (groupBy: SessionAttributionGroupBy) => {
+ return { groupBy }
+ },
}),
reducers({
properties: [
@@ -39,44 +57,32 @@ export const sessionAttributionExplorerLogic = kea state.dateRange,
},
],
+ groupBy: [
+ initialGroupBy,
+ {
+ enableGroupBy: (state, { groupBy }) => {
+ return Array.from(new Set([...state, groupBy]))
+ },
+ disableGroupBy: (state, { groupBy }) => {
+ return state.filter((item) => item !== groupBy)
+ },
+ },
+ ],
}),
selectors({
query: [
- (s) => [s.properties, s.dateRange],
- (properties: SessionPropertyFilter[], dateRange): DataTableNode => {
- const source: HogQLQuery = {
- kind: NodeKind.HogQLQuery,
- filters: {
- properties,
- dateRange: dateRange ?? defaultDateRange,
- },
- query: `
-SELECT
- count() as "context.columns.count",
- "$channel_type" as "context.columns.channel_type",
- "$entry_referring_domain" as "context.columns.referring_domain",
- "$entry_utm_source" as "context.columns.utm_source",
- "$entry_utm_medium" as "context.columns.utm_medium",
- "$entry_utm_campaign" as "context.columns.utm_campaign",
- nullIf(arrayStringConcat([
- if(isNotNull($entry_gclid), 'glcid', NULL),
- if(isNotNull($entry_gad_source), 'gad_source', NULL)
- -- add more here if we add more ad ids
- ], ','), '') as "context.columns.has_ad_id",
- topK(10)($entry_current_url) as "context.columns.example_entry_urls"
-FROM sessions
-WHERE {filters}
-GROUP BY
- "context.columns.referring_domain",
- "context.columns.utm_source",
- "context.columns.utm_medium",
- "context.columns.utm_campaign",
- "context.columns.has_ad_id",
- "context.columns.channel_type"
-ORDER BY
- "context.columns.count" DESC
-`,
+ (s) => [s.properties, s.dateRange, s.groupBy],
+ (properties: SessionPropertyFilter[], dateRange, groupBy): DataTableNode => {
+ const filters = {
+ properties,
+ dateRange: dateRange ?? defaultDateRange,
+ }
+ const source: SessionAttributionExplorerQuery = {
+ kind: NodeKind.SessionAttributionExplorerQuery,
+ groupBy: groupBy,
+ filters: filters,
}
+
return {
kind: NodeKind.DataTableNode,
source: source,
diff --git a/frontend/src/types.ts b/frontend/src/types.ts
index 9096e172150a4..d8a29799aaf2e 100644
--- a/frontend/src/types.ts
+++ b/frontend/src/types.ts
@@ -28,7 +28,6 @@ import { LogLevel } from 'rrweb'
import { BehavioralFilterKey, BehavioralFilterType } from 'scenes/cohorts/CohortFilters/types'
import { AggregationAxisFormat } from 'scenes/insights/aggregationAxisFormat'
import { JSONContent } from 'scenes/notebooks/Notebook/utils'
-import { PipelineLogLevel } from 'scenes/pipeline/pipelineNodeLogsLogic'
import { Scene } from 'scenes/sceneTypes'
import { QueryContext } from '~/queries/types'
@@ -1941,21 +1940,25 @@ export interface PluginErrorType {
event?: Record
}
+export type LogEntryLevel = 'DEBUG' | 'LOG' | 'INFO' | 'WARN' | 'WARNING' | 'ERROR'
+
// The general log entry format that eventually everything should match
export type LogEntry = {
log_source_id: string
instance_id: string
timestamp: string
- level: 'DEBUG' | 'INFO' | 'WARN' | 'ERROR'
+ level: LogEntryLevel
message: string
}
-export enum PluginLogEntryType {
- Debug = 'DEBUG',
- Log = 'LOG',
- Info = 'INFO',
- Warn = 'WARN',
- Error = 'ERROR',
+export type LogEntryRequestParams = {
+ limit?: number
+ after?: string
+ before?: string
+ // Comma separated list of log levels
+ level?: string
+ search?: string
+ instance_id?: string
}
export interface PluginLogEntry {
@@ -1964,21 +1967,13 @@ export interface PluginLogEntry {
plugin_id: number
plugin_config_id: number
timestamp: string
- type: PluginLogEntryType
+ source: string
+ type: LogEntryLevel
is_system: boolean
message: string
instance_id: string
}
-export interface BatchExportLogEntry {
- team_id: number
- batch_export_id: number
- run_id: number
- timestamp: string
- level: PipelineLogLevel
- message: string
-}
-
export enum AnnotationScope {
Insight = 'dashboard_item',
Project = 'project',
@@ -3868,6 +3863,16 @@ export interface ExternalDataSourceSchema extends SimpleExternalDataSourceSchema
status?: string
incremental_field: string | null
incremental_field_type: string | null
+ sync_frequency: DataWarehouseSyncInterval
+}
+
+export interface ExternalDataJob {
+ id: string
+ created_at: string
+ status: 'Running' | 'Failed' | 'Completed' | 'Cancelled'
+ schema: SimpleExternalDataSourceSchema
+ rows_synced: number
+ latest_error: string
}
export interface SimpleDataWarehouseTable {
diff --git a/hogql_parser/HogQLParser.cpp b/hogql_parser/HogQLParser.cpp
index 4a77b7b33b70d..17f52f0d28c27 100644
--- a/hogql_parser/HogQLParser.cpp
+++ b/hogql_parser/HogQLParser.cpp
@@ -53,12 +53,12 @@ void hogqlparserParserInitialize() {
auto staticData = std::make_unique(
std::vector{
"program", "declaration", "expression", "varDecl", "identifierList",
- "statement", "returnStmt", "ifStmt", "whileStmt", "forStmt", "funcStmt",
- "varAssignment", "exprStmt", "emptyStmt", "block", "kvPair", "kvPairList",
- "select", "selectUnionStmt", "selectStmtWithParens", "selectStmt",
- "withClause", "topClause", "fromClause", "arrayJoinClause", "windowClause",
- "prewhereClause", "whereClause", "groupByClause", "havingClause",
- "orderByClause", "projectionOrderByClause", "limitAndOffsetClause",
+ "statement", "returnStmt", "ifStmt", "whileStmt", "forStmt", "forInStmt",
+ "funcStmt", "varAssignment", "exprStmt", "emptyStmt", "block", "kvPair",
+ "kvPairList", "select", "selectUnionStmt", "selectStmtWithParens",
+ "selectStmt", "withClause", "topClause", "fromClause", "arrayJoinClause",
+ "windowClause", "prewhereClause", "whereClause", "groupByClause",
+ "havingClause", "orderByClause", "projectionOrderByClause", "limitAndOffsetClause",
"offsetOnlyClause", "settingsClause", "joinExpr", "joinOp", "joinOpCross",
"joinConstraintClause", "sampleClause", "orderExprList", "orderExpr",
"ratioExpr", "settingExprList", "settingExpr", "windowExpr", "winPartitionByClause",
@@ -114,7 +114,7 @@ void hogqlparserParserInitialize() {
}
);
static const int32_t serializedATNSegment[] = {
- 4,1,155,1249,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7,6,
+ 4,1,155,1267,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7,6,
2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7,13,2,14,
7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,19,2,20,7,20,2,21,
7,21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2,26,7,26,2,27,7,27,2,28,
@@ -125,459 +125,466 @@ void hogqlparserParserInitialize() {
7,56,2,57,7,57,2,58,7,58,2,59,7,59,2,60,7,60,2,61,7,61,2,62,7,62,2,63,
7,63,2,64,7,64,2,65,7,65,2,66,7,66,2,67,7,67,2,68,7,68,2,69,7,69,2,70,
7,70,2,71,7,71,2,72,7,72,2,73,7,73,2,74,7,74,2,75,7,75,2,76,7,76,2,77,
- 7,77,2,78,7,78,2,79,7,79,2,80,7,80,2,81,7,81,2,82,7,82,2,83,7,83,1,0,
- 5,0,170,8,0,10,0,12,0,173,9,0,1,0,1,0,1,1,1,1,3,1,179,8,1,1,2,1,2,1,3,
- 1,3,1,3,1,3,1,3,3,3,188,8,3,1,4,1,4,1,4,5,4,193,8,4,10,4,12,4,196,9,4,
- 1,4,3,4,199,8,4,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,3,5,210,8,5,1,6,1,
- 6,3,6,214,8,6,1,6,3,6,217,8,6,1,7,1,7,1,7,1,7,1,7,1,7,1,7,3,7,226,8,7,
- 1,8,1,8,1,8,1,8,1,8,1,8,3,8,234,8,8,1,9,1,9,1,9,1,9,1,9,3,9,241,8,9,1,
- 9,1,9,3,9,245,8,9,1,9,1,9,1,9,1,9,3,9,251,8,9,1,9,1,9,1,9,3,9,256,8,9,
- 1,10,1,10,1,10,1,10,3,10,262,8,10,1,10,1,10,1,10,1,11,1,11,1,11,1,11,
- 1,11,1,12,1,12,3,12,274,8,12,1,13,1,13,1,14,1,14,5,14,280,8,14,10,14,
- 12,14,283,9,14,1,14,1,14,1,15,1,15,1,15,1,15,1,16,1,16,1,16,5,16,294,
- 8,16,10,16,12,16,297,9,16,1,16,3,16,300,8,16,1,17,1,17,1,17,3,17,305,
- 8,17,1,17,1,17,1,18,1,18,1,18,1,18,5,18,313,8,18,10,18,12,18,316,9,18,
- 1,19,1,19,1,19,1,19,1,19,1,19,3,19,324,8,19,1,20,3,20,327,8,20,1,20,1,
- 20,3,20,331,8,20,1,20,3,20,334,8,20,1,20,1,20,3,20,338,8,20,1,20,3,20,
- 341,8,20,1,20,3,20,344,8,20,1,20,3,20,347,8,20,1,20,3,20,350,8,20,1,20,
- 1,20,3,20,354,8,20,1,20,1,20,3,20,358,8,20,1,20,3,20,361,8,20,1,20,3,
- 20,364,8,20,1,20,3,20,367,8,20,1,20,1,20,3,20,371,8,20,1,20,3,20,374,
- 8,20,1,21,1,21,1,21,1,22,1,22,1,22,1,22,3,22,383,8,22,1,23,1,23,1,23,
- 1,24,3,24,389,8,24,1,24,1,24,1,24,1,24,1,25,1,25,1,25,1,25,1,25,1,25,
- 1,25,1,25,1,25,1,25,1,25,1,25,1,25,5,25,408,8,25,10,25,12,25,411,9,25,
- 1,26,1,26,1,26,1,27,1,27,1,27,1,28,1,28,1,28,1,28,1,28,1,28,1,28,1,28,
- 3,28,427,8,28,1,29,1,29,1,29,1,30,1,30,1,30,1,30,1,31,1,31,1,31,1,31,
- 1,32,1,32,1,32,1,32,3,32,444,8,32,1,32,1,32,1,32,1,32,3,32,450,8,32,1,
- 32,1,32,1,32,1,32,3,32,456,8,32,1,32,1,32,1,32,1,32,1,32,1,32,1,32,1,
- 32,1,32,3,32,467,8,32,3,32,469,8,32,1,33,1,33,1,33,1,34,1,34,1,34,1,35,
- 1,35,1,35,3,35,480,8,35,1,35,3,35,483,8,35,1,35,1,35,1,35,1,35,3,35,489,
- 8,35,1,35,1,35,1,35,1,35,1,35,1,35,3,35,497,8,35,1,35,1,35,1,35,1,35,
- 5,35,503,8,35,10,35,12,35,506,9,35,1,36,3,36,509,8,36,1,36,1,36,1,36,
- 3,36,514,8,36,1,36,3,36,517,8,36,1,36,3,36,520,8,36,1,36,1,36,3,36,524,
- 8,36,1,36,1,36,3,36,528,8,36,1,36,3,36,531,8,36,3,36,533,8,36,1,36,3,
- 36,536,8,36,1,36,1,36,3,36,540,8,36,1,36,1,36,3,36,544,8,36,1,36,3,36,
- 547,8,36,3,36,549,8,36,3,36,551,8,36,1,37,1,37,1,37,3,37,556,8,37,1,38,
- 1,38,1,38,1,38,1,38,1,38,1,38,1,38,1,38,3,38,567,8,38,1,39,1,39,1,39,
- 1,39,3,39,573,8,39,1,40,1,40,1,40,5,40,578,8,40,10,40,12,40,581,9,40,
- 1,41,1,41,3,41,585,8,41,1,41,1,41,3,41,589,8,41,1,41,1,41,3,41,593,8,
- 41,1,42,1,42,1,42,1,42,3,42,599,8,42,3,42,601,8,42,1,43,1,43,1,43,5,43,
- 606,8,43,10,43,12,43,609,9,43,1,44,1,44,1,44,1,44,1,45,3,45,616,8,45,
- 1,45,3,45,619,8,45,1,45,3,45,622,8,45,1,46,1,46,1,46,1,46,1,47,1,47,1,
- 47,1,47,1,48,1,48,1,48,1,49,1,49,1,49,1,49,1,49,1,49,3,49,641,8,49,1,
- 50,1,50,1,50,1,50,1,50,1,50,1,50,1,50,1,50,1,50,1,50,1,50,3,50,655,8,
- 50,1,51,1,51,1,51,1,52,1,52,1,52,1,52,1,52,1,52,1,52,1,52,1,52,5,52,669,
- 8,52,10,52,12,52,672,9,52,1,52,3,52,675,8,52,1,52,1,52,1,52,1,52,1,52,
- 1,52,1,52,5,52,684,8,52,10,52,12,52,687,9,52,1,52,3,52,690,8,52,1,52,
- 1,52,1,52,1,52,1,52,1,52,1,52,5,52,699,8,52,10,52,12,52,702,9,52,1,52,
- 3,52,705,8,52,1,52,1,52,1,52,1,52,1,52,3,52,712,8,52,1,52,1,52,3,52,716,
- 8,52,1,53,1,53,1,53,5,53,721,8,53,10,53,12,53,724,9,53,1,53,3,53,727,
- 8,53,1,54,1,54,1,54,3,54,732,8,54,1,54,1,54,1,54,1,54,1,54,4,54,739,8,
- 54,11,54,12,54,740,1,54,1,54,3,54,745,8,54,1,54,1,54,1,54,1,54,1,54,1,
- 54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,
- 54,1,54,1,54,3,54,769,8,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,
- 54,1,54,1,54,1,54,1,54,1,54,1,54,3,54,786,8,54,1,54,1,54,1,54,1,54,3,
- 54,792,8,54,1,54,3,54,795,8,54,1,54,3,54,798,8,54,1,54,1,54,1,54,1,54,
- 1,54,1,54,1,54,1,54,3,54,808,8,54,1,54,1,54,1,54,1,54,3,54,814,8,54,1,
- 54,3,54,817,8,54,1,54,3,54,820,8,54,1,54,1,54,1,54,1,54,1,54,1,54,3,54,
- 828,8,54,1,54,3,54,831,8,54,1,54,1,54,3,54,835,8,54,1,54,3,54,838,8,54,
- 1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,3,54,852,
- 8,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,
- 1,54,1,54,3,54,869,8,54,1,54,1,54,1,54,3,54,874,8,54,1,54,1,54,3,54,878,
- 8,54,1,54,1,54,1,54,1,54,3,54,884,8,54,1,54,1,54,1,54,1,54,1,54,3,54,
- 891,8,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,3,54,903,8,
- 54,1,54,1,54,3,54,907,8,54,1,54,3,54,910,8,54,1,54,1,54,1,54,1,54,1,54,
- 1,54,1,54,3,54,919,8,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,
- 1,54,1,54,1,54,3,54,933,8,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,
- 1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,
- 1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,
- 1,54,3,54,972,8,54,1,54,1,54,1,54,1,54,1,54,1,54,3,54,980,8,54,5,54,982,
- 8,54,10,54,12,54,985,9,54,1,55,1,55,1,55,5,55,990,8,55,10,55,12,55,993,
- 9,55,1,55,3,55,996,8,55,1,56,1,56,3,56,1000,8,56,1,57,1,57,1,57,1,57,
- 5,57,1006,8,57,10,57,12,57,1009,9,57,1,57,3,57,1012,8,57,1,57,1,57,1,
- 57,1,57,1,57,5,57,1019,8,57,10,57,12,57,1022,9,57,1,57,3,57,1025,8,57,
- 3,57,1027,8,57,1,57,1,57,1,57,1,58,1,58,1,58,5,58,1035,8,58,10,58,12,
- 58,1038,9,58,1,58,1,58,1,58,1,58,1,58,1,58,5,58,1046,8,58,10,58,12,58,
- 1049,9,58,1,58,1,58,3,58,1053,8,58,1,58,1,58,1,58,1,58,1,58,3,58,1060,
- 8,58,1,59,1,59,1,59,1,59,1,59,1,59,1,59,1,59,1,59,1,59,1,59,3,59,1073,
- 8,59,1,60,1,60,1,60,5,60,1078,8,60,10,60,12,60,1081,9,60,1,60,3,60,1084,
- 8,60,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,3,61,1096,8,61,
- 1,62,1,62,1,62,1,62,3,62,1102,8,62,1,62,3,62,1105,8,62,1,63,1,63,1,63,
- 5,63,1110,8,63,10,63,12,63,1113,9,63,1,64,1,64,1,64,1,64,1,64,1,64,1,
- 64,1,64,1,64,3,64,1124,8,64,1,64,1,64,1,64,1,64,3,64,1130,8,64,5,64,1132,
- 8,64,10,64,12,64,1135,9,64,1,65,1,65,1,65,3,65,1140,8,65,1,65,1,65,1,
- 66,1,66,1,66,3,66,1147,8,66,1,66,1,66,1,67,1,67,1,67,5,67,1154,8,67,10,
- 67,12,67,1157,9,67,1,67,3,67,1160,8,67,1,68,1,68,1,69,1,69,1,69,1,69,
- 1,69,1,69,3,69,1170,8,69,3,69,1172,8,69,1,70,3,70,1175,8,70,1,70,1,70,
- 1,70,1,70,1,70,1,70,3,70,1183,8,70,1,71,1,71,1,71,3,71,1188,8,71,1,72,
- 1,72,1,73,1,73,1,74,1,74,1,75,1,75,3,75,1198,8,75,1,76,1,76,1,76,3,76,
- 1203,8,76,1,77,1,77,1,77,1,77,1,78,1,78,1,78,1,78,1,79,1,79,3,79,1215,
- 8,79,1,80,1,80,5,80,1219,8,80,10,80,12,80,1222,9,80,1,80,1,80,1,81,1,
- 81,1,81,1,81,1,81,3,81,1231,8,81,1,82,1,82,5,82,1235,8,82,10,82,12,82,
- 1238,9,82,1,82,1,82,1,83,1,83,1,83,1,83,1,83,3,83,1247,8,83,1,83,0,3,
- 70,108,128,84,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,
- 40,42,44,46,48,50,52,54,56,58,60,62,64,66,68,70,72,74,76,78,80,82,84,
- 86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,118,120,122,
- 124,126,128,130,132,134,136,138,140,142,144,146,148,150,152,154,156,158,
- 160,162,164,166,0,16,2,0,17,17,72,72,2,0,42,42,49,49,3,0,1,1,4,4,8,8,
- 4,0,1,1,3,4,8,8,78,78,2,0,49,49,71,71,2,0,1,1,4,4,2,0,7,7,21,22,2,0,28,
- 28,47,47,2,0,69,69,74,74,3,0,10,10,48,48,87,87,2,0,39,39,51,51,1,0,103,
- 104,2,0,114,114,135,135,7,0,20,20,36,36,53,54,68,68,76,76,93,93,99,99,
- 12,0,1,19,21,28,30,35,37,40,42,49,51,52,56,56,58,67,69,75,77,92,94,95,
- 97,98,4,0,19,19,28,28,37,37,46,46,1409,0,171,1,0,0,0,2,178,1,0,0,0,4,
- 180,1,0,0,0,6,182,1,0,0,0,8,189,1,0,0,0,10,209,1,0,0,0,12,211,1,0,0,0,
- 14,218,1,0,0,0,16,227,1,0,0,0,18,235,1,0,0,0,20,257,1,0,0,0,22,266,1,
- 0,0,0,24,271,1,0,0,0,26,275,1,0,0,0,28,277,1,0,0,0,30,286,1,0,0,0,32,
- 290,1,0,0,0,34,304,1,0,0,0,36,308,1,0,0,0,38,323,1,0,0,0,40,326,1,0,0,
- 0,42,375,1,0,0,0,44,378,1,0,0,0,46,384,1,0,0,0,48,388,1,0,0,0,50,394,
- 1,0,0,0,52,412,1,0,0,0,54,415,1,0,0,0,56,418,1,0,0,0,58,428,1,0,0,0,60,
- 431,1,0,0,0,62,435,1,0,0,0,64,468,1,0,0,0,66,470,1,0,0,0,68,473,1,0,0,
- 0,70,488,1,0,0,0,72,550,1,0,0,0,74,555,1,0,0,0,76,566,1,0,0,0,78,568,
- 1,0,0,0,80,574,1,0,0,0,82,582,1,0,0,0,84,600,1,0,0,0,86,602,1,0,0,0,88,
- 610,1,0,0,0,90,615,1,0,0,0,92,623,1,0,0,0,94,627,1,0,0,0,96,631,1,0,0,
- 0,98,640,1,0,0,0,100,654,1,0,0,0,102,656,1,0,0,0,104,715,1,0,0,0,106,
- 717,1,0,0,0,108,877,1,0,0,0,110,986,1,0,0,0,112,999,1,0,0,0,114,1026,
- 1,0,0,0,116,1059,1,0,0,0,118,1072,1,0,0,0,120,1074,1,0,0,0,122,1095,1,
- 0,0,0,124,1104,1,0,0,0,126,1106,1,0,0,0,128,1123,1,0,0,0,130,1136,1,0,
- 0,0,132,1146,1,0,0,0,134,1150,1,0,0,0,136,1161,1,0,0,0,138,1171,1,0,0,
- 0,140,1174,1,0,0,0,142,1187,1,0,0,0,144,1189,1,0,0,0,146,1191,1,0,0,0,
- 148,1193,1,0,0,0,150,1197,1,0,0,0,152,1202,1,0,0,0,154,1204,1,0,0,0,156,
- 1208,1,0,0,0,158,1214,1,0,0,0,160,1216,1,0,0,0,162,1230,1,0,0,0,164,1232,
- 1,0,0,0,166,1246,1,0,0,0,168,170,3,2,1,0,169,168,1,0,0,0,170,173,1,0,
- 0,0,171,169,1,0,0,0,171,172,1,0,0,0,172,174,1,0,0,0,173,171,1,0,0,0,174,
- 175,5,0,0,1,175,1,1,0,0,0,176,179,3,6,3,0,177,179,3,10,5,0,178,176,1,
- 0,0,0,178,177,1,0,0,0,179,3,1,0,0,0,180,181,3,108,54,0,181,5,1,0,0,0,
- 182,183,5,50,0,0,183,187,3,152,76,0,184,185,5,111,0,0,185,186,5,118,0,
- 0,186,188,3,4,2,0,187,184,1,0,0,0,187,188,1,0,0,0,188,7,1,0,0,0,189,194,
- 3,152,76,0,190,191,5,112,0,0,191,193,3,152,76,0,192,190,1,0,0,0,193,196,
- 1,0,0,0,194,192,1,0,0,0,194,195,1,0,0,0,195,198,1,0,0,0,196,194,1,0,0,
- 0,197,199,5,112,0,0,198,197,1,0,0,0,198,199,1,0,0,0,199,9,1,0,0,0,200,
- 210,3,12,6,0,201,210,3,14,7,0,202,210,3,16,8,0,203,210,3,18,9,0,204,210,
- 3,20,10,0,205,210,3,22,11,0,206,210,3,28,14,0,207,210,3,24,12,0,208,210,
- 3,26,13,0,209,200,1,0,0,0,209,201,1,0,0,0,209,202,1,0,0,0,209,203,1,0,
- 0,0,209,204,1,0,0,0,209,205,1,0,0,0,209,206,1,0,0,0,209,207,1,0,0,0,209,
- 208,1,0,0,0,210,11,1,0,0,0,211,213,5,70,0,0,212,214,3,4,2,0,213,212,1,
- 0,0,0,213,214,1,0,0,0,214,216,1,0,0,0,215,217,5,146,0,0,216,215,1,0,0,
- 0,216,217,1,0,0,0,217,13,1,0,0,0,218,219,5,38,0,0,219,220,5,126,0,0,220,
- 221,3,4,2,0,221,222,5,145,0,0,222,225,3,10,5,0,223,224,5,24,0,0,224,226,
- 3,10,5,0,225,223,1,0,0,0,225,226,1,0,0,0,226,15,1,0,0,0,227,228,5,96,
- 0,0,228,229,5,126,0,0,229,230,3,4,2,0,230,231,5,145,0,0,231,233,3,10,
- 5,0,232,234,5,146,0,0,233,232,1,0,0,0,233,234,1,0,0,0,234,17,1,0,0,0,
- 235,236,5,31,0,0,236,240,5,126,0,0,237,241,3,6,3,0,238,241,3,22,11,0,
- 239,241,3,4,2,0,240,237,1,0,0,0,240,238,1,0,0,0,240,239,1,0,0,0,240,241,
- 1,0,0,0,241,242,1,0,0,0,242,244,5,146,0,0,243,245,3,4,2,0,244,243,1,0,
- 0,0,244,245,1,0,0,0,245,246,1,0,0,0,246,250,5,146,0,0,247,251,3,6,3,0,
- 248,251,3,22,11,0,249,251,3,4,2,0,250,247,1,0,0,0,250,248,1,0,0,0,250,
- 249,1,0,0,0,250,251,1,0,0,0,251,252,1,0,0,0,252,253,5,145,0,0,253,255,
- 3,10,5,0,254,256,5,146,0,0,255,254,1,0,0,0,255,256,1,0,0,0,256,19,1,0,
- 0,0,257,258,5,29,0,0,258,259,3,152,76,0,259,261,5,126,0,0,260,262,3,8,
- 4,0,261,260,1,0,0,0,261,262,1,0,0,0,262,263,1,0,0,0,263,264,5,145,0,0,
- 264,265,3,28,14,0,265,21,1,0,0,0,266,267,3,4,2,0,267,268,5,111,0,0,268,
- 269,5,118,0,0,269,270,3,4,2,0,270,23,1,0,0,0,271,273,3,4,2,0,272,274,
- 5,146,0,0,273,272,1,0,0,0,273,274,1,0,0,0,274,25,1,0,0,0,275,276,5,146,
- 0,0,276,27,1,0,0,0,277,281,5,124,0,0,278,280,3,2,1,0,279,278,1,0,0,0,
- 280,283,1,0,0,0,281,279,1,0,0,0,281,282,1,0,0,0,282,284,1,0,0,0,283,281,
- 1,0,0,0,284,285,5,143,0,0,285,29,1,0,0,0,286,287,3,4,2,0,287,288,5,111,
- 0,0,288,289,3,4,2,0,289,31,1,0,0,0,290,295,3,30,15,0,291,292,5,112,0,
- 0,292,294,3,30,15,0,293,291,1,0,0,0,294,297,1,0,0,0,295,293,1,0,0,0,295,
- 296,1,0,0,0,296,299,1,0,0,0,297,295,1,0,0,0,298,300,5,112,0,0,299,298,
- 1,0,0,0,299,300,1,0,0,0,300,33,1,0,0,0,301,305,3,36,18,0,302,305,3,40,
- 20,0,303,305,3,116,58,0,304,301,1,0,0,0,304,302,1,0,0,0,304,303,1,0,0,
- 0,305,306,1,0,0,0,306,307,5,0,0,1,307,35,1,0,0,0,308,314,3,38,19,0,309,
- 310,5,91,0,0,310,311,5,1,0,0,311,313,3,38,19,0,312,309,1,0,0,0,313,316,
- 1,0,0,0,314,312,1,0,0,0,314,315,1,0,0,0,315,37,1,0,0,0,316,314,1,0,0,
- 0,317,324,3,40,20,0,318,319,5,126,0,0,319,320,3,36,18,0,320,321,5,145,
- 0,0,321,324,1,0,0,0,322,324,3,156,78,0,323,317,1,0,0,0,323,318,1,0,0,
- 0,323,322,1,0,0,0,324,39,1,0,0,0,325,327,3,42,21,0,326,325,1,0,0,0,326,
- 327,1,0,0,0,327,328,1,0,0,0,328,330,5,77,0,0,329,331,5,23,0,0,330,329,
- 1,0,0,0,330,331,1,0,0,0,331,333,1,0,0,0,332,334,3,44,22,0,333,332,1,0,
- 0,0,333,334,1,0,0,0,334,335,1,0,0,0,335,337,3,106,53,0,336,338,3,46,23,
- 0,337,336,1,0,0,0,337,338,1,0,0,0,338,340,1,0,0,0,339,341,3,48,24,0,340,
- 339,1,0,0,0,340,341,1,0,0,0,341,343,1,0,0,0,342,344,3,52,26,0,343,342,
- 1,0,0,0,343,344,1,0,0,0,344,346,1,0,0,0,345,347,3,54,27,0,346,345,1,0,
- 0,0,346,347,1,0,0,0,347,349,1,0,0,0,348,350,3,56,28,0,349,348,1,0,0,0,
- 349,350,1,0,0,0,350,353,1,0,0,0,351,352,5,98,0,0,352,354,7,0,0,0,353,
- 351,1,0,0,0,353,354,1,0,0,0,354,357,1,0,0,0,355,356,5,98,0,0,356,358,
- 5,86,0,0,357,355,1,0,0,0,357,358,1,0,0,0,358,360,1,0,0,0,359,361,3,58,
- 29,0,360,359,1,0,0,0,360,361,1,0,0,0,361,363,1,0,0,0,362,364,3,50,25,
- 0,363,362,1,0,0,0,363,364,1,0,0,0,364,366,1,0,0,0,365,367,3,60,30,0,366,
- 365,1,0,0,0,366,367,1,0,0,0,367,370,1,0,0,0,368,371,3,64,32,0,369,371,
- 3,66,33,0,370,368,1,0,0,0,370,369,1,0,0,0,370,371,1,0,0,0,371,373,1,0,
- 0,0,372,374,3,68,34,0,373,372,1,0,0,0,373,374,1,0,0,0,374,41,1,0,0,0,
- 375,376,5,98,0,0,376,377,3,120,60,0,377,43,1,0,0,0,378,379,5,85,0,0,379,
- 382,5,104,0,0,380,381,5,98,0,0,381,383,5,82,0,0,382,380,1,0,0,0,382,383,
- 1,0,0,0,383,45,1,0,0,0,384,385,5,32,0,0,385,386,3,70,35,0,386,47,1,0,
- 0,0,387,389,7,1,0,0,388,387,1,0,0,0,388,389,1,0,0,0,389,390,1,0,0,0,390,
- 391,5,5,0,0,391,392,5,45,0,0,392,393,3,106,53,0,393,49,1,0,0,0,394,395,
- 5,97,0,0,395,396,3,152,76,0,396,397,5,6,0,0,397,398,5,126,0,0,398,399,
- 3,90,45,0,399,409,5,145,0,0,400,401,5,112,0,0,401,402,3,152,76,0,402,
- 403,5,6,0,0,403,404,5,126,0,0,404,405,3,90,45,0,405,406,5,145,0,0,406,
- 408,1,0,0,0,407,400,1,0,0,0,408,411,1,0,0,0,409,407,1,0,0,0,409,410,1,
- 0,0,0,410,51,1,0,0,0,411,409,1,0,0,0,412,413,5,67,0,0,413,414,3,108,54,
- 0,414,53,1,0,0,0,415,416,5,95,0,0,416,417,3,108,54,0,417,55,1,0,0,0,418,
- 419,5,34,0,0,419,426,5,11,0,0,420,421,7,0,0,0,421,422,5,126,0,0,422,423,
- 3,106,53,0,423,424,5,145,0,0,424,427,1,0,0,0,425,427,3,106,53,0,426,420,
- 1,0,0,0,426,425,1,0,0,0,427,57,1,0,0,0,428,429,5,35,0,0,429,430,3,108,
- 54,0,430,59,1,0,0,0,431,432,5,62,0,0,432,433,5,11,0,0,433,434,3,80,40,
- 0,434,61,1,0,0,0,435,436,5,62,0,0,436,437,5,11,0,0,437,438,3,106,53,0,
- 438,63,1,0,0,0,439,440,5,52,0,0,440,443,3,108,54,0,441,442,5,112,0,0,
- 442,444,3,108,54,0,443,441,1,0,0,0,443,444,1,0,0,0,444,449,1,0,0,0,445,
- 446,5,98,0,0,446,450,5,82,0,0,447,448,5,11,0,0,448,450,3,106,53,0,449,
- 445,1,0,0,0,449,447,1,0,0,0,449,450,1,0,0,0,450,469,1,0,0,0,451,452,5,
- 52,0,0,452,455,3,108,54,0,453,454,5,98,0,0,454,456,5,82,0,0,455,453,1,
- 0,0,0,455,456,1,0,0,0,456,457,1,0,0,0,457,458,5,59,0,0,458,459,3,108,
- 54,0,459,469,1,0,0,0,460,461,5,52,0,0,461,462,3,108,54,0,462,463,5,59,
- 0,0,463,466,3,108,54,0,464,465,5,11,0,0,465,467,3,106,53,0,466,464,1,
- 0,0,0,466,467,1,0,0,0,467,469,1,0,0,0,468,439,1,0,0,0,468,451,1,0,0,0,
- 468,460,1,0,0,0,469,65,1,0,0,0,470,471,5,59,0,0,471,472,3,108,54,0,472,
- 67,1,0,0,0,473,474,5,79,0,0,474,475,3,86,43,0,475,69,1,0,0,0,476,477,
- 6,35,-1,0,477,479,3,128,64,0,478,480,5,27,0,0,479,478,1,0,0,0,479,480,
- 1,0,0,0,480,482,1,0,0,0,481,483,3,78,39,0,482,481,1,0,0,0,482,483,1,0,
- 0,0,483,489,1,0,0,0,484,485,5,126,0,0,485,486,3,70,35,0,486,487,5,145,
- 0,0,487,489,1,0,0,0,488,476,1,0,0,0,488,484,1,0,0,0,489,504,1,0,0,0,490,
- 491,10,3,0,0,491,492,3,74,37,0,492,493,3,70,35,4,493,503,1,0,0,0,494,
- 496,10,4,0,0,495,497,3,72,36,0,496,495,1,0,0,0,496,497,1,0,0,0,497,498,
- 1,0,0,0,498,499,5,45,0,0,499,500,3,70,35,0,500,501,3,76,38,0,501,503,
- 1,0,0,0,502,490,1,0,0,0,502,494,1,0,0,0,503,506,1,0,0,0,504,502,1,0,0,
- 0,504,505,1,0,0,0,505,71,1,0,0,0,506,504,1,0,0,0,507,509,7,2,0,0,508,
- 507,1,0,0,0,508,509,1,0,0,0,509,510,1,0,0,0,510,517,5,42,0,0,511,513,
- 5,42,0,0,512,514,7,2,0,0,513,512,1,0,0,0,513,514,1,0,0,0,514,517,1,0,
- 0,0,515,517,7,2,0,0,516,508,1,0,0,0,516,511,1,0,0,0,516,515,1,0,0,0,517,
- 551,1,0,0,0,518,520,7,3,0,0,519,518,1,0,0,0,519,520,1,0,0,0,520,521,1,
- 0,0,0,521,523,7,4,0,0,522,524,5,63,0,0,523,522,1,0,0,0,523,524,1,0,0,
- 0,524,533,1,0,0,0,525,527,7,4,0,0,526,528,5,63,0,0,527,526,1,0,0,0,527,
- 528,1,0,0,0,528,530,1,0,0,0,529,531,7,3,0,0,530,529,1,0,0,0,530,531,1,
- 0,0,0,531,533,1,0,0,0,532,519,1,0,0,0,532,525,1,0,0,0,533,551,1,0,0,0,
- 534,536,7,5,0,0,535,534,1,0,0,0,535,536,1,0,0,0,536,537,1,0,0,0,537,539,
- 5,33,0,0,538,540,5,63,0,0,539,538,1,0,0,0,539,540,1,0,0,0,540,549,1,0,
- 0,0,541,543,5,33,0,0,542,544,5,63,0,0,543,542,1,0,0,0,543,544,1,0,0,0,
- 544,546,1,0,0,0,545,547,7,5,0,0,546,545,1,0,0,0,546,547,1,0,0,0,547,549,
- 1,0,0,0,548,535,1,0,0,0,548,541,1,0,0,0,549,551,1,0,0,0,550,516,1,0,0,
- 0,550,532,1,0,0,0,550,548,1,0,0,0,551,73,1,0,0,0,552,553,5,16,0,0,553,
- 556,5,45,0,0,554,556,5,112,0,0,555,552,1,0,0,0,555,554,1,0,0,0,556,75,
- 1,0,0,0,557,558,5,60,0,0,558,567,3,106,53,0,559,560,5,92,0,0,560,561,
- 5,126,0,0,561,562,3,106,53,0,562,563,5,145,0,0,563,567,1,0,0,0,564,565,
- 5,92,0,0,565,567,3,106,53,0,566,557,1,0,0,0,566,559,1,0,0,0,566,564,1,
- 0,0,0,567,77,1,0,0,0,568,569,5,75,0,0,569,572,3,84,42,0,570,571,5,59,
- 0,0,571,573,3,84,42,0,572,570,1,0,0,0,572,573,1,0,0,0,573,79,1,0,0,0,
- 574,579,3,82,41,0,575,576,5,112,0,0,576,578,3,82,41,0,577,575,1,0,0,0,
- 578,581,1,0,0,0,579,577,1,0,0,0,579,580,1,0,0,0,580,81,1,0,0,0,581,579,
- 1,0,0,0,582,584,3,108,54,0,583,585,7,6,0,0,584,583,1,0,0,0,584,585,1,
- 0,0,0,585,588,1,0,0,0,586,587,5,58,0,0,587,589,7,7,0,0,588,586,1,0,0,
- 0,588,589,1,0,0,0,589,592,1,0,0,0,590,591,5,15,0,0,591,593,5,106,0,0,
- 592,590,1,0,0,0,592,593,1,0,0,0,593,83,1,0,0,0,594,601,3,156,78,0,595,
- 598,3,140,70,0,596,597,5,147,0,0,597,599,3,140,70,0,598,596,1,0,0,0,598,
- 599,1,0,0,0,599,601,1,0,0,0,600,594,1,0,0,0,600,595,1,0,0,0,601,85,1,
- 0,0,0,602,607,3,88,44,0,603,604,5,112,0,0,604,606,3,88,44,0,605,603,1,
- 0,0,0,606,609,1,0,0,0,607,605,1,0,0,0,607,608,1,0,0,0,608,87,1,0,0,0,
- 609,607,1,0,0,0,610,611,3,152,76,0,611,612,5,118,0,0,612,613,3,142,71,
- 0,613,89,1,0,0,0,614,616,3,92,46,0,615,614,1,0,0,0,615,616,1,0,0,0,616,
- 618,1,0,0,0,617,619,3,94,47,0,618,617,1,0,0,0,618,619,1,0,0,0,619,621,
- 1,0,0,0,620,622,3,96,48,0,621,620,1,0,0,0,621,622,1,0,0,0,622,91,1,0,
- 0,0,623,624,5,65,0,0,624,625,5,11,0,0,625,626,3,106,53,0,626,93,1,0,0,
- 0,627,628,5,62,0,0,628,629,5,11,0,0,629,630,3,80,40,0,630,95,1,0,0,0,
- 631,632,7,8,0,0,632,633,3,98,49,0,633,97,1,0,0,0,634,641,3,100,50,0,635,
- 636,5,9,0,0,636,637,3,100,50,0,637,638,5,2,0,0,638,639,3,100,50,0,639,
- 641,1,0,0,0,640,634,1,0,0,0,640,635,1,0,0,0,641,99,1,0,0,0,642,643,5,
- 18,0,0,643,655,5,73,0,0,644,645,5,90,0,0,645,655,5,66,0,0,646,647,5,90,
- 0,0,647,655,5,30,0,0,648,649,3,140,70,0,649,650,5,66,0,0,650,655,1,0,
- 0,0,651,652,3,140,70,0,652,653,5,30,0,0,653,655,1,0,0,0,654,642,1,0,0,
- 0,654,644,1,0,0,0,654,646,1,0,0,0,654,648,1,0,0,0,654,651,1,0,0,0,655,
- 101,1,0,0,0,656,657,3,108,54,0,657,658,5,0,0,1,658,103,1,0,0,0,659,716,
- 3,152,76,0,660,661,3,152,76,0,661,662,5,126,0,0,662,663,3,152,76,0,663,
- 670,3,104,52,0,664,665,5,112,0,0,665,666,3,152,76,0,666,667,3,104,52,
- 0,667,669,1,0,0,0,668,664,1,0,0,0,669,672,1,0,0,0,670,668,1,0,0,0,670,
- 671,1,0,0,0,671,674,1,0,0,0,672,670,1,0,0,0,673,675,5,112,0,0,674,673,
- 1,0,0,0,674,675,1,0,0,0,675,676,1,0,0,0,676,677,5,145,0,0,677,716,1,0,
- 0,0,678,679,3,152,76,0,679,680,5,126,0,0,680,685,3,154,77,0,681,682,5,
- 112,0,0,682,684,3,154,77,0,683,681,1,0,0,0,684,687,1,0,0,0,685,683,1,
- 0,0,0,685,686,1,0,0,0,686,689,1,0,0,0,687,685,1,0,0,0,688,690,5,112,0,
- 0,689,688,1,0,0,0,689,690,1,0,0,0,690,691,1,0,0,0,691,692,5,145,0,0,692,
- 716,1,0,0,0,693,694,3,152,76,0,694,695,5,126,0,0,695,700,3,104,52,0,696,
- 697,5,112,0,0,697,699,3,104,52,0,698,696,1,0,0,0,699,702,1,0,0,0,700,
- 698,1,0,0,0,700,701,1,0,0,0,701,704,1,0,0,0,702,700,1,0,0,0,703,705,5,
- 112,0,0,704,703,1,0,0,0,704,705,1,0,0,0,705,706,1,0,0,0,706,707,5,145,
- 0,0,707,716,1,0,0,0,708,709,3,152,76,0,709,711,5,126,0,0,710,712,3,106,
- 53,0,711,710,1,0,0,0,711,712,1,0,0,0,712,713,1,0,0,0,713,714,5,145,0,
- 0,714,716,1,0,0,0,715,659,1,0,0,0,715,660,1,0,0,0,715,678,1,0,0,0,715,
- 693,1,0,0,0,715,708,1,0,0,0,716,105,1,0,0,0,717,722,3,108,54,0,718,719,
- 5,112,0,0,719,721,3,108,54,0,720,718,1,0,0,0,721,724,1,0,0,0,722,720,
- 1,0,0,0,722,723,1,0,0,0,723,726,1,0,0,0,724,722,1,0,0,0,725,727,5,112,
- 0,0,726,725,1,0,0,0,726,727,1,0,0,0,727,107,1,0,0,0,728,729,6,54,-1,0,
- 729,731,5,12,0,0,730,732,3,108,54,0,731,730,1,0,0,0,731,732,1,0,0,0,732,
- 738,1,0,0,0,733,734,5,94,0,0,734,735,3,108,54,0,735,736,5,81,0,0,736,
- 737,3,108,54,0,737,739,1,0,0,0,738,733,1,0,0,0,739,740,1,0,0,0,740,738,
- 1,0,0,0,740,741,1,0,0,0,741,744,1,0,0,0,742,743,5,24,0,0,743,745,3,108,
- 54,0,744,742,1,0,0,0,744,745,1,0,0,0,745,746,1,0,0,0,746,747,5,25,0,0,
- 747,878,1,0,0,0,748,749,5,13,0,0,749,750,5,126,0,0,750,751,3,108,54,0,
- 751,752,5,6,0,0,752,753,3,104,52,0,753,754,5,145,0,0,754,878,1,0,0,0,
- 755,756,5,19,0,0,756,878,5,106,0,0,757,758,5,43,0,0,758,759,3,108,54,
- 0,759,760,3,144,72,0,760,878,1,0,0,0,761,762,5,80,0,0,762,763,5,126,0,
- 0,763,764,3,108,54,0,764,765,5,32,0,0,765,768,3,108,54,0,766,767,5,31,
- 0,0,767,769,3,108,54,0,768,766,1,0,0,0,768,769,1,0,0,0,769,770,1,0,0,
- 0,770,771,5,145,0,0,771,878,1,0,0,0,772,773,5,83,0,0,773,878,5,106,0,
- 0,774,775,5,88,0,0,775,776,5,126,0,0,776,777,7,9,0,0,777,778,3,158,79,
- 0,778,779,5,32,0,0,779,780,3,108,54,0,780,781,5,145,0,0,781,878,1,0,0,
- 0,782,783,3,152,76,0,783,785,5,126,0,0,784,786,3,106,53,0,785,784,1,0,
- 0,0,785,786,1,0,0,0,786,787,1,0,0,0,787,788,5,145,0,0,788,797,1,0,0,0,
- 789,791,5,126,0,0,790,792,5,23,0,0,791,790,1,0,0,0,791,792,1,0,0,0,792,
- 794,1,0,0,0,793,795,3,110,55,0,794,793,1,0,0,0,794,795,1,0,0,0,795,796,
- 1,0,0,0,796,798,5,145,0,0,797,789,1,0,0,0,797,798,1,0,0,0,798,799,1,0,
- 0,0,799,800,5,64,0,0,800,801,5,126,0,0,801,802,3,90,45,0,802,803,5,145,
- 0,0,803,878,1,0,0,0,804,805,3,152,76,0,805,807,5,126,0,0,806,808,3,106,
- 53,0,807,806,1,0,0,0,807,808,1,0,0,0,808,809,1,0,0,0,809,810,5,145,0,
- 0,810,819,1,0,0,0,811,813,5,126,0,0,812,814,5,23,0,0,813,812,1,0,0,0,
- 813,814,1,0,0,0,814,816,1,0,0,0,815,817,3,110,55,0,816,815,1,0,0,0,816,
- 817,1,0,0,0,817,818,1,0,0,0,818,820,5,145,0,0,819,811,1,0,0,0,819,820,
- 1,0,0,0,820,821,1,0,0,0,821,822,5,64,0,0,822,823,3,152,76,0,823,878,1,
- 0,0,0,824,830,3,152,76,0,825,827,5,126,0,0,826,828,3,106,53,0,827,826,
- 1,0,0,0,827,828,1,0,0,0,828,829,1,0,0,0,829,831,5,145,0,0,830,825,1,0,
- 0,0,830,831,1,0,0,0,831,832,1,0,0,0,832,834,5,126,0,0,833,835,5,23,0,
- 0,834,833,1,0,0,0,834,835,1,0,0,0,835,837,1,0,0,0,836,838,3,110,55,0,
- 837,836,1,0,0,0,837,838,1,0,0,0,838,839,1,0,0,0,839,840,5,145,0,0,840,
- 878,1,0,0,0,841,878,3,116,58,0,842,878,3,160,80,0,843,878,3,142,71,0,
- 844,845,5,114,0,0,845,878,3,108,54,19,846,847,5,56,0,0,847,878,3,108,
- 54,13,848,849,3,132,66,0,849,850,5,116,0,0,850,852,1,0,0,0,851,848,1,
- 0,0,0,851,852,1,0,0,0,852,853,1,0,0,0,853,878,5,108,0,0,854,855,5,126,
- 0,0,855,856,3,36,18,0,856,857,5,145,0,0,857,878,1,0,0,0,858,859,5,126,
- 0,0,859,860,3,108,54,0,860,861,5,145,0,0,861,878,1,0,0,0,862,863,5,126,
- 0,0,863,864,3,106,53,0,864,865,5,145,0,0,865,878,1,0,0,0,866,868,5,125,
- 0,0,867,869,3,106,53,0,868,867,1,0,0,0,868,869,1,0,0,0,869,870,1,0,0,
- 0,870,878,5,144,0,0,871,873,5,124,0,0,872,874,3,32,16,0,873,872,1,0,0,
- 0,873,874,1,0,0,0,874,875,1,0,0,0,875,878,5,143,0,0,876,878,3,124,62,
- 0,877,728,1,0,0,0,877,748,1,0,0,0,877,755,1,0,0,0,877,757,1,0,0,0,877,
- 761,1,0,0,0,877,772,1,0,0,0,877,774,1,0,0,0,877,782,1,0,0,0,877,804,1,
- 0,0,0,877,824,1,0,0,0,877,841,1,0,0,0,877,842,1,0,0,0,877,843,1,0,0,0,
- 877,844,1,0,0,0,877,846,1,0,0,0,877,851,1,0,0,0,877,854,1,0,0,0,877,858,
- 1,0,0,0,877,862,1,0,0,0,877,866,1,0,0,0,877,871,1,0,0,0,877,876,1,0,0,
- 0,878,983,1,0,0,0,879,883,10,18,0,0,880,884,5,108,0,0,881,884,5,147,0,
- 0,882,884,5,134,0,0,883,880,1,0,0,0,883,881,1,0,0,0,883,882,1,0,0,0,884,
- 885,1,0,0,0,885,982,3,108,54,19,886,890,10,17,0,0,887,891,5,135,0,0,888,
- 891,5,114,0,0,889,891,5,113,0,0,890,887,1,0,0,0,890,888,1,0,0,0,890,889,
- 1,0,0,0,891,892,1,0,0,0,892,982,3,108,54,18,893,918,10,16,0,0,894,919,
- 5,117,0,0,895,919,5,118,0,0,896,919,5,129,0,0,897,919,5,127,0,0,898,919,
- 5,128,0,0,899,919,5,119,0,0,900,919,5,120,0,0,901,903,5,56,0,0,902,901,
- 1,0,0,0,902,903,1,0,0,0,903,904,1,0,0,0,904,906,5,40,0,0,905,907,5,14,
- 0,0,906,905,1,0,0,0,906,907,1,0,0,0,907,919,1,0,0,0,908,910,5,56,0,0,
- 909,908,1,0,0,0,909,910,1,0,0,0,910,911,1,0,0,0,911,919,7,10,0,0,912,
- 919,5,141,0,0,913,919,5,142,0,0,914,919,5,131,0,0,915,919,5,122,0,0,916,
- 919,5,123,0,0,917,919,5,130,0,0,918,894,1,0,0,0,918,895,1,0,0,0,918,896,
- 1,0,0,0,918,897,1,0,0,0,918,898,1,0,0,0,918,899,1,0,0,0,918,900,1,0,0,
- 0,918,902,1,0,0,0,918,909,1,0,0,0,918,912,1,0,0,0,918,913,1,0,0,0,918,
- 914,1,0,0,0,918,915,1,0,0,0,918,916,1,0,0,0,918,917,1,0,0,0,919,920,1,
- 0,0,0,920,982,3,108,54,17,921,922,10,14,0,0,922,923,5,133,0,0,923,982,
- 3,108,54,15,924,925,10,12,0,0,925,926,5,2,0,0,926,982,3,108,54,13,927,
- 928,10,11,0,0,928,929,5,61,0,0,929,982,3,108,54,12,930,932,10,10,0,0,
- 931,933,5,56,0,0,932,931,1,0,0,0,932,933,1,0,0,0,933,934,1,0,0,0,934,
- 935,5,9,0,0,935,936,3,108,54,0,936,937,5,2,0,0,937,938,3,108,54,11,938,
- 982,1,0,0,0,939,940,10,9,0,0,940,941,5,136,0,0,941,942,3,108,54,0,942,
- 943,5,111,0,0,943,944,3,108,54,9,944,982,1,0,0,0,945,946,10,25,0,0,946,
- 947,5,125,0,0,947,948,3,108,54,0,948,949,5,144,0,0,949,982,1,0,0,0,950,
- 951,10,24,0,0,951,952,5,116,0,0,952,982,5,104,0,0,953,954,10,23,0,0,954,
- 955,5,116,0,0,955,982,3,152,76,0,956,957,10,22,0,0,957,958,5,132,0,0,
- 958,959,5,125,0,0,959,960,3,108,54,0,960,961,5,144,0,0,961,982,1,0,0,
- 0,962,963,10,21,0,0,963,964,5,132,0,0,964,982,5,104,0,0,965,966,10,20,
- 0,0,966,967,5,132,0,0,967,982,3,152,76,0,968,969,10,15,0,0,969,971,5,
- 44,0,0,970,972,5,56,0,0,971,970,1,0,0,0,971,972,1,0,0,0,972,973,1,0,0,
- 0,973,982,5,57,0,0,974,979,10,8,0,0,975,976,5,6,0,0,976,980,3,152,76,
- 0,977,978,5,6,0,0,978,980,5,106,0,0,979,975,1,0,0,0,979,977,1,0,0,0,980,
- 982,1,0,0,0,981,879,1,0,0,0,981,886,1,0,0,0,981,893,1,0,0,0,981,921,1,
- 0,0,0,981,924,1,0,0,0,981,927,1,0,0,0,981,930,1,0,0,0,981,939,1,0,0,0,
- 981,945,1,0,0,0,981,950,1,0,0,0,981,953,1,0,0,0,981,956,1,0,0,0,981,962,
- 1,0,0,0,981,965,1,0,0,0,981,968,1,0,0,0,981,974,1,0,0,0,982,985,1,0,0,
- 0,983,981,1,0,0,0,983,984,1,0,0,0,984,109,1,0,0,0,985,983,1,0,0,0,986,
- 991,3,112,56,0,987,988,5,112,0,0,988,990,3,112,56,0,989,987,1,0,0,0,990,
- 993,1,0,0,0,991,989,1,0,0,0,991,992,1,0,0,0,992,995,1,0,0,0,993,991,1,
- 0,0,0,994,996,5,112,0,0,995,994,1,0,0,0,995,996,1,0,0,0,996,111,1,0,0,
- 0,997,1000,3,114,57,0,998,1000,3,108,54,0,999,997,1,0,0,0,999,998,1,0,
- 0,0,1000,113,1,0,0,0,1001,1002,5,126,0,0,1002,1007,3,152,76,0,1003,1004,
- 5,112,0,0,1004,1006,3,152,76,0,1005,1003,1,0,0,0,1006,1009,1,0,0,0,1007,
- 1005,1,0,0,0,1007,1008,1,0,0,0,1008,1011,1,0,0,0,1009,1007,1,0,0,0,1010,
- 1012,5,112,0,0,1011,1010,1,0,0,0,1011,1012,1,0,0,0,1012,1013,1,0,0,0,
- 1013,1014,5,145,0,0,1014,1027,1,0,0,0,1015,1020,3,152,76,0,1016,1017,
- 5,112,0,0,1017,1019,3,152,76,0,1018,1016,1,0,0,0,1019,1022,1,0,0,0,1020,
- 1018,1,0,0,0,1020,1021,1,0,0,0,1021,1024,1,0,0,0,1022,1020,1,0,0,0,1023,
- 1025,5,112,0,0,1024,1023,1,0,0,0,1024,1025,1,0,0,0,1025,1027,1,0,0,0,
- 1026,1001,1,0,0,0,1026,1015,1,0,0,0,1027,1028,1,0,0,0,1028,1029,5,107,
- 0,0,1029,1030,3,108,54,0,1030,115,1,0,0,0,1031,1032,5,128,0,0,1032,1036,
- 3,152,76,0,1033,1035,3,118,59,0,1034,1033,1,0,0,0,1035,1038,1,0,0,0,1036,
- 1034,1,0,0,0,1036,1037,1,0,0,0,1037,1039,1,0,0,0,1038,1036,1,0,0,0,1039,
- 1040,5,147,0,0,1040,1041,5,120,0,0,1041,1060,1,0,0,0,1042,1043,5,128,
- 0,0,1043,1047,3,152,76,0,1044,1046,3,118,59,0,1045,1044,1,0,0,0,1046,
- 1049,1,0,0,0,1047,1045,1,0,0,0,1047,1048,1,0,0,0,1048,1050,1,0,0,0,1049,
- 1047,1,0,0,0,1050,1052,5,120,0,0,1051,1053,3,116,58,0,1052,1051,1,0,0,
- 0,1052,1053,1,0,0,0,1053,1054,1,0,0,0,1054,1055,5,128,0,0,1055,1056,5,
- 147,0,0,1056,1057,3,152,76,0,1057,1058,5,120,0,0,1058,1060,1,0,0,0,1059,
- 1031,1,0,0,0,1059,1042,1,0,0,0,1060,117,1,0,0,0,1061,1062,3,152,76,0,
- 1062,1063,5,118,0,0,1063,1064,3,158,79,0,1064,1073,1,0,0,0,1065,1066,
- 3,152,76,0,1066,1067,5,118,0,0,1067,1068,5,124,0,0,1068,1069,3,108,54,
- 0,1069,1070,5,143,0,0,1070,1073,1,0,0,0,1071,1073,3,152,76,0,1072,1061,
- 1,0,0,0,1072,1065,1,0,0,0,1072,1071,1,0,0,0,1073,119,1,0,0,0,1074,1079,
- 3,122,61,0,1075,1076,5,112,0,0,1076,1078,3,122,61,0,1077,1075,1,0,0,0,
- 1078,1081,1,0,0,0,1079,1077,1,0,0,0,1079,1080,1,0,0,0,1080,1083,1,0,0,
- 0,1081,1079,1,0,0,0,1082,1084,5,112,0,0,1083,1082,1,0,0,0,1083,1084,1,
- 0,0,0,1084,121,1,0,0,0,1085,1086,3,152,76,0,1086,1087,5,6,0,0,1087,1088,
- 5,126,0,0,1088,1089,3,36,18,0,1089,1090,5,145,0,0,1090,1096,1,0,0,0,1091,
- 1092,3,108,54,0,1092,1093,5,6,0,0,1093,1094,3,152,76,0,1094,1096,1,0,
- 0,0,1095,1085,1,0,0,0,1095,1091,1,0,0,0,1096,123,1,0,0,0,1097,1105,3,
- 156,78,0,1098,1099,3,132,66,0,1099,1100,5,116,0,0,1100,1102,1,0,0,0,1101,
- 1098,1,0,0,0,1101,1102,1,0,0,0,1102,1103,1,0,0,0,1103,1105,3,126,63,0,
- 1104,1097,1,0,0,0,1104,1101,1,0,0,0,1105,125,1,0,0,0,1106,1111,3,152,
- 76,0,1107,1108,5,116,0,0,1108,1110,3,152,76,0,1109,1107,1,0,0,0,1110,
- 1113,1,0,0,0,1111,1109,1,0,0,0,1111,1112,1,0,0,0,1112,127,1,0,0,0,1113,
- 1111,1,0,0,0,1114,1115,6,64,-1,0,1115,1124,3,132,66,0,1116,1124,3,130,
- 65,0,1117,1118,5,126,0,0,1118,1119,3,36,18,0,1119,1120,5,145,0,0,1120,
- 1124,1,0,0,0,1121,1124,3,116,58,0,1122,1124,3,156,78,0,1123,1114,1,0,
- 0,0,1123,1116,1,0,0,0,1123,1117,1,0,0,0,1123,1121,1,0,0,0,1123,1122,1,
- 0,0,0,1124,1133,1,0,0,0,1125,1129,10,3,0,0,1126,1130,3,150,75,0,1127,
- 1128,5,6,0,0,1128,1130,3,152,76,0,1129,1126,1,0,0,0,1129,1127,1,0,0,0,
- 1130,1132,1,0,0,0,1131,1125,1,0,0,0,1132,1135,1,0,0,0,1133,1131,1,0,0,
- 0,1133,1134,1,0,0,0,1134,129,1,0,0,0,1135,1133,1,0,0,0,1136,1137,3,152,
- 76,0,1137,1139,5,126,0,0,1138,1140,3,134,67,0,1139,1138,1,0,0,0,1139,
- 1140,1,0,0,0,1140,1141,1,0,0,0,1141,1142,5,145,0,0,1142,131,1,0,0,0,1143,
- 1144,3,136,68,0,1144,1145,5,116,0,0,1145,1147,1,0,0,0,1146,1143,1,0,0,
- 0,1146,1147,1,0,0,0,1147,1148,1,0,0,0,1148,1149,3,152,76,0,1149,133,1,
- 0,0,0,1150,1155,3,108,54,0,1151,1152,5,112,0,0,1152,1154,3,108,54,0,1153,
- 1151,1,0,0,0,1154,1157,1,0,0,0,1155,1153,1,0,0,0,1155,1156,1,0,0,0,1156,
- 1159,1,0,0,0,1157,1155,1,0,0,0,1158,1160,5,112,0,0,1159,1158,1,0,0,0,
- 1159,1160,1,0,0,0,1160,135,1,0,0,0,1161,1162,3,152,76,0,1162,137,1,0,
- 0,0,1163,1172,5,102,0,0,1164,1165,5,116,0,0,1165,1172,7,11,0,0,1166,1167,
- 5,104,0,0,1167,1169,5,116,0,0,1168,1170,7,11,0,0,1169,1168,1,0,0,0,1169,
- 1170,1,0,0,0,1170,1172,1,0,0,0,1171,1163,1,0,0,0,1171,1164,1,0,0,0,1171,
- 1166,1,0,0,0,1172,139,1,0,0,0,1173,1175,7,12,0,0,1174,1173,1,0,0,0,1174,
- 1175,1,0,0,0,1175,1182,1,0,0,0,1176,1183,3,138,69,0,1177,1183,5,103,0,
- 0,1178,1183,5,104,0,0,1179,1183,5,105,0,0,1180,1183,5,41,0,0,1181,1183,
- 5,55,0,0,1182,1176,1,0,0,0,1182,1177,1,0,0,0,1182,1178,1,0,0,0,1182,1179,
- 1,0,0,0,1182,1180,1,0,0,0,1182,1181,1,0,0,0,1183,141,1,0,0,0,1184,1188,
- 3,140,70,0,1185,1188,5,106,0,0,1186,1188,5,57,0,0,1187,1184,1,0,0,0,1187,
- 1185,1,0,0,0,1187,1186,1,0,0,0,1188,143,1,0,0,0,1189,1190,7,13,0,0,1190,
- 145,1,0,0,0,1191,1192,7,14,0,0,1192,147,1,0,0,0,1193,1194,7,15,0,0,1194,
- 149,1,0,0,0,1195,1198,5,101,0,0,1196,1198,3,148,74,0,1197,1195,1,0,0,
- 0,1197,1196,1,0,0,0,1198,151,1,0,0,0,1199,1203,5,101,0,0,1200,1203,3,
- 144,72,0,1201,1203,3,146,73,0,1202,1199,1,0,0,0,1202,1200,1,0,0,0,1202,
- 1201,1,0,0,0,1203,153,1,0,0,0,1204,1205,3,158,79,0,1205,1206,5,118,0,
- 0,1206,1207,3,140,70,0,1207,155,1,0,0,0,1208,1209,5,124,0,0,1209,1210,
- 3,152,76,0,1210,1211,5,143,0,0,1211,157,1,0,0,0,1212,1215,5,106,0,0,1213,
- 1215,3,160,80,0,1214,1212,1,0,0,0,1214,1213,1,0,0,0,1215,159,1,0,0,0,
- 1216,1220,5,138,0,0,1217,1219,3,162,81,0,1218,1217,1,0,0,0,1219,1222,
- 1,0,0,0,1220,1218,1,0,0,0,1220,1221,1,0,0,0,1221,1223,1,0,0,0,1222,1220,
- 1,0,0,0,1223,1224,5,140,0,0,1224,161,1,0,0,0,1225,1226,5,153,0,0,1226,
- 1227,3,108,54,0,1227,1228,5,143,0,0,1228,1231,1,0,0,0,1229,1231,5,152,
- 0,0,1230,1225,1,0,0,0,1230,1229,1,0,0,0,1231,163,1,0,0,0,1232,1236,5,
- 139,0,0,1233,1235,3,166,83,0,1234,1233,1,0,0,0,1235,1238,1,0,0,0,1236,
- 1234,1,0,0,0,1236,1237,1,0,0,0,1237,1239,1,0,0,0,1238,1236,1,0,0,0,1239,
- 1240,5,0,0,1,1240,165,1,0,0,0,1241,1242,5,155,0,0,1242,1243,3,108,54,
- 0,1243,1244,5,143,0,0,1244,1247,1,0,0,0,1245,1247,5,154,0,0,1246,1241,
- 1,0,0,0,1246,1245,1,0,0,0,1247,167,1,0,0,0,160,171,178,187,194,198,209,
- 213,216,225,233,240,244,250,255,261,273,281,295,299,304,314,323,326,330,
- 333,337,340,343,346,349,353,357,360,363,366,370,373,382,388,409,426,443,
- 449,455,466,468,479,482,488,496,502,504,508,513,516,519,523,527,530,532,
- 535,539,543,546,548,550,555,566,572,579,584,588,592,598,600,607,615,618,
- 621,640,654,670,674,685,689,700,704,711,715,722,726,731,740,744,768,785,
- 791,794,797,807,813,816,819,827,830,834,837,851,868,873,877,883,890,902,
- 906,909,918,932,971,979,981,983,991,995,999,1007,1011,1020,1024,1026,
- 1036,1047,1052,1059,1072,1079,1083,1095,1101,1104,1111,1123,1129,1133,
- 1139,1146,1155,1159,1169,1171,1174,1182,1187,1197,1202,1214,1220,1230,
- 1236,1246
+ 7,77,2,78,7,78,2,79,7,79,2,80,7,80,2,81,7,81,2,82,7,82,2,83,7,83,2,84,
+ 7,84,1,0,5,0,172,8,0,10,0,12,0,175,9,0,1,0,1,0,1,1,1,1,3,1,181,8,1,1,
+ 2,1,2,1,3,1,3,1,3,1,3,1,3,3,3,190,8,3,1,4,1,4,1,4,5,4,195,8,4,10,4,12,
+ 4,198,9,4,1,4,3,4,201,8,4,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,3,5,
+ 213,8,5,1,6,1,6,3,6,217,8,6,1,6,3,6,220,8,6,1,7,1,7,1,7,1,7,1,7,1,7,1,
+ 7,3,7,229,8,7,1,8,1,8,1,8,1,8,1,8,1,8,3,8,237,8,8,1,9,1,9,1,9,1,9,1,9,
+ 3,9,244,8,9,1,9,1,9,3,9,248,8,9,1,9,1,9,1,9,1,9,3,9,254,8,9,1,9,1,9,1,
+ 9,3,9,259,8,9,1,10,1,10,1,10,1,10,1,10,1,10,3,10,267,8,10,1,10,1,10,1,
+ 10,1,10,1,10,3,10,274,8,10,1,11,1,11,1,11,1,11,3,11,280,8,11,1,11,1,11,
+ 1,11,1,12,1,12,1,12,1,12,1,12,1,13,1,13,3,13,292,8,13,1,14,1,14,1,15,
+ 1,15,5,15,298,8,15,10,15,12,15,301,9,15,1,15,1,15,1,16,1,16,1,16,1,16,
+ 1,17,1,17,1,17,5,17,312,8,17,10,17,12,17,315,9,17,1,17,3,17,318,8,17,
+ 1,18,1,18,1,18,3,18,323,8,18,1,18,1,18,1,19,1,19,1,19,1,19,5,19,331,8,
+ 19,10,19,12,19,334,9,19,1,20,1,20,1,20,1,20,1,20,1,20,3,20,342,8,20,1,
+ 21,3,21,345,8,21,1,21,1,21,3,21,349,8,21,1,21,3,21,352,8,21,1,21,1,21,
+ 3,21,356,8,21,1,21,3,21,359,8,21,1,21,3,21,362,8,21,1,21,3,21,365,8,21,
+ 1,21,3,21,368,8,21,1,21,1,21,3,21,372,8,21,1,21,1,21,3,21,376,8,21,1,
+ 21,3,21,379,8,21,1,21,3,21,382,8,21,1,21,3,21,385,8,21,1,21,1,21,3,21,
+ 389,8,21,1,21,3,21,392,8,21,1,22,1,22,1,22,1,23,1,23,1,23,1,23,3,23,401,
+ 8,23,1,24,1,24,1,24,1,25,3,25,407,8,25,1,25,1,25,1,25,1,25,1,26,1,26,
+ 1,26,1,26,1,26,1,26,1,26,1,26,1,26,1,26,1,26,1,26,1,26,5,26,426,8,26,
+ 10,26,12,26,429,9,26,1,27,1,27,1,27,1,28,1,28,1,28,1,29,1,29,1,29,1,29,
+ 1,29,1,29,1,29,1,29,3,29,445,8,29,1,30,1,30,1,30,1,31,1,31,1,31,1,31,
+ 1,32,1,32,1,32,1,32,1,33,1,33,1,33,1,33,3,33,462,8,33,1,33,1,33,1,33,
+ 1,33,3,33,468,8,33,1,33,1,33,1,33,1,33,3,33,474,8,33,1,33,1,33,1,33,1,
+ 33,1,33,1,33,1,33,1,33,1,33,3,33,485,8,33,3,33,487,8,33,1,34,1,34,1,34,
+ 1,35,1,35,1,35,1,36,1,36,1,36,3,36,498,8,36,1,36,3,36,501,8,36,1,36,1,
+ 36,1,36,1,36,3,36,507,8,36,1,36,1,36,1,36,1,36,1,36,1,36,3,36,515,8,36,
+ 1,36,1,36,1,36,1,36,5,36,521,8,36,10,36,12,36,524,9,36,1,37,3,37,527,
+ 8,37,1,37,1,37,1,37,3,37,532,8,37,1,37,3,37,535,8,37,1,37,3,37,538,8,
+ 37,1,37,1,37,3,37,542,8,37,1,37,1,37,3,37,546,8,37,1,37,3,37,549,8,37,
+ 3,37,551,8,37,1,37,3,37,554,8,37,1,37,1,37,3,37,558,8,37,1,37,1,37,3,
+ 37,562,8,37,1,37,3,37,565,8,37,3,37,567,8,37,3,37,569,8,37,1,38,1,38,
+ 1,38,3,38,574,8,38,1,39,1,39,1,39,1,39,1,39,1,39,1,39,1,39,1,39,3,39,
+ 585,8,39,1,40,1,40,1,40,1,40,3,40,591,8,40,1,41,1,41,1,41,5,41,596,8,
+ 41,10,41,12,41,599,9,41,1,42,1,42,3,42,603,8,42,1,42,1,42,3,42,607,8,
+ 42,1,42,1,42,3,42,611,8,42,1,43,1,43,1,43,1,43,3,43,617,8,43,3,43,619,
+ 8,43,1,44,1,44,1,44,5,44,624,8,44,10,44,12,44,627,9,44,1,45,1,45,1,45,
+ 1,45,1,46,3,46,634,8,46,1,46,3,46,637,8,46,1,46,3,46,640,8,46,1,47,1,
+ 47,1,47,1,47,1,48,1,48,1,48,1,48,1,49,1,49,1,49,1,50,1,50,1,50,1,50,1,
+ 50,1,50,3,50,659,8,50,1,51,1,51,1,51,1,51,1,51,1,51,1,51,1,51,1,51,1,
+ 51,1,51,1,51,3,51,673,8,51,1,52,1,52,1,52,1,53,1,53,1,53,1,53,1,53,1,
+ 53,1,53,1,53,1,53,5,53,687,8,53,10,53,12,53,690,9,53,1,53,3,53,693,8,
+ 53,1,53,1,53,1,53,1,53,1,53,1,53,1,53,5,53,702,8,53,10,53,12,53,705,9,
+ 53,1,53,3,53,708,8,53,1,53,1,53,1,53,1,53,1,53,1,53,1,53,5,53,717,8,53,
+ 10,53,12,53,720,9,53,1,53,3,53,723,8,53,1,53,1,53,1,53,1,53,1,53,3,53,
+ 730,8,53,1,53,1,53,3,53,734,8,53,1,54,1,54,1,54,5,54,739,8,54,10,54,12,
+ 54,742,9,54,1,54,3,54,745,8,54,1,55,1,55,1,55,3,55,750,8,55,1,55,1,55,
+ 1,55,1,55,1,55,4,55,757,8,55,11,55,12,55,758,1,55,1,55,3,55,763,8,55,
+ 1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,
+ 1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,3,55,787,8,55,1,55,1,55,1,55,
+ 1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,3,55,804,
+ 8,55,1,55,1,55,1,55,1,55,3,55,810,8,55,1,55,3,55,813,8,55,1,55,3,55,816,
+ 8,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,3,55,826,8,55,1,55,1,55,
+ 1,55,1,55,3,55,832,8,55,1,55,3,55,835,8,55,1,55,3,55,838,8,55,1,55,1,
+ 55,1,55,1,55,1,55,1,55,3,55,846,8,55,1,55,3,55,849,8,55,1,55,1,55,3,55,
+ 853,8,55,1,55,3,55,856,8,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,
+ 55,1,55,1,55,1,55,3,55,870,8,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,
+ 55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,3,55,887,8,55,1,55,1,55,1,55,3,
+ 55,892,8,55,1,55,1,55,3,55,896,8,55,1,55,1,55,1,55,1,55,3,55,902,8,55,
+ 1,55,1,55,1,55,1,55,1,55,3,55,909,8,55,1,55,1,55,1,55,1,55,1,55,1,55,
+ 1,55,1,55,1,55,1,55,3,55,921,8,55,1,55,1,55,3,55,925,8,55,1,55,3,55,928,
+ 8,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,3,55,937,8,55,1,55,1,55,1,55,
+ 1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,3,55,951,8,55,1,55,1,55,
+ 1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,
+ 1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,
+ 1,55,1,55,1,55,1,55,1,55,1,55,1,55,3,55,990,8,55,1,55,1,55,1,55,1,55,
+ 1,55,1,55,3,55,998,8,55,5,55,1000,8,55,10,55,12,55,1003,9,55,1,56,1,56,
+ 1,56,5,56,1008,8,56,10,56,12,56,1011,9,56,1,56,3,56,1014,8,56,1,57,1,
+ 57,3,57,1018,8,57,1,58,1,58,1,58,1,58,5,58,1024,8,58,10,58,12,58,1027,
+ 9,58,1,58,3,58,1030,8,58,1,58,1,58,1,58,1,58,1,58,5,58,1037,8,58,10,58,
+ 12,58,1040,9,58,1,58,3,58,1043,8,58,3,58,1045,8,58,1,58,1,58,1,58,1,59,
+ 1,59,1,59,5,59,1053,8,59,10,59,12,59,1056,9,59,1,59,1,59,1,59,1,59,1,
+ 59,1,59,5,59,1064,8,59,10,59,12,59,1067,9,59,1,59,1,59,3,59,1071,8,59,
+ 1,59,1,59,1,59,1,59,1,59,3,59,1078,8,59,1,60,1,60,1,60,1,60,1,60,1,60,
+ 1,60,1,60,1,60,1,60,1,60,3,60,1091,8,60,1,61,1,61,1,61,5,61,1096,8,61,
+ 10,61,12,61,1099,9,61,1,61,3,61,1102,8,61,1,62,1,62,1,62,1,62,1,62,1,
+ 62,1,62,1,62,1,62,1,62,3,62,1114,8,62,1,63,1,63,1,63,1,63,3,63,1120,8,
+ 63,1,63,3,63,1123,8,63,1,64,1,64,1,64,5,64,1128,8,64,10,64,12,64,1131,
+ 9,64,1,65,1,65,1,65,1,65,1,65,1,65,1,65,1,65,1,65,3,65,1142,8,65,1,65,
+ 1,65,1,65,1,65,3,65,1148,8,65,5,65,1150,8,65,10,65,12,65,1153,9,65,1,
+ 66,1,66,1,66,3,66,1158,8,66,1,66,1,66,1,67,1,67,1,67,3,67,1165,8,67,1,
+ 67,1,67,1,68,1,68,1,68,5,68,1172,8,68,10,68,12,68,1175,9,68,1,68,3,68,
+ 1178,8,68,1,69,1,69,1,70,1,70,1,70,1,70,1,70,1,70,3,70,1188,8,70,3,70,
+ 1190,8,70,1,71,3,71,1193,8,71,1,71,1,71,1,71,1,71,1,71,1,71,3,71,1201,
+ 8,71,1,72,1,72,1,72,3,72,1206,8,72,1,73,1,73,1,74,1,74,1,75,1,75,1,76,
+ 1,76,3,76,1216,8,76,1,77,1,77,1,77,3,77,1221,8,77,1,78,1,78,1,78,1,78,
+ 1,79,1,79,1,79,1,79,1,80,1,80,3,80,1233,8,80,1,81,1,81,5,81,1237,8,81,
+ 10,81,12,81,1240,9,81,1,81,1,81,1,82,1,82,1,82,1,82,1,82,3,82,1249,8,
+ 82,1,83,1,83,5,83,1253,8,83,10,83,12,83,1256,9,83,1,83,1,83,1,84,1,84,
+ 1,84,1,84,1,84,3,84,1265,8,84,1,84,0,3,72,110,130,85,0,2,4,6,8,10,12,
+ 14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,
+ 60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,
+ 106,108,110,112,114,116,118,120,122,124,126,128,130,132,134,136,138,140,
+ 142,144,146,148,150,152,154,156,158,160,162,164,166,168,0,16,2,0,17,17,
+ 72,72,2,0,42,42,49,49,3,0,1,1,4,4,8,8,4,0,1,1,3,4,8,8,78,78,2,0,49,49,
+ 71,71,2,0,1,1,4,4,2,0,7,7,21,22,2,0,28,28,47,47,2,0,69,69,74,74,3,0,10,
+ 10,48,48,87,87,2,0,39,39,51,51,1,0,103,104,2,0,114,114,135,135,7,0,20,
+ 20,36,36,53,54,68,68,76,76,93,93,99,99,12,0,1,19,21,28,30,35,37,40,42,
+ 49,51,52,56,56,58,67,69,75,77,92,94,95,97,98,4,0,19,19,28,28,37,37,46,
+ 46,1429,0,173,1,0,0,0,2,180,1,0,0,0,4,182,1,0,0,0,6,184,1,0,0,0,8,191,
+ 1,0,0,0,10,212,1,0,0,0,12,214,1,0,0,0,14,221,1,0,0,0,16,230,1,0,0,0,18,
+ 238,1,0,0,0,20,260,1,0,0,0,22,275,1,0,0,0,24,284,1,0,0,0,26,289,1,0,0,
+ 0,28,293,1,0,0,0,30,295,1,0,0,0,32,304,1,0,0,0,34,308,1,0,0,0,36,322,
+ 1,0,0,0,38,326,1,0,0,0,40,341,1,0,0,0,42,344,1,0,0,0,44,393,1,0,0,0,46,
+ 396,1,0,0,0,48,402,1,0,0,0,50,406,1,0,0,0,52,412,1,0,0,0,54,430,1,0,0,
+ 0,56,433,1,0,0,0,58,436,1,0,0,0,60,446,1,0,0,0,62,449,1,0,0,0,64,453,
+ 1,0,0,0,66,486,1,0,0,0,68,488,1,0,0,0,70,491,1,0,0,0,72,506,1,0,0,0,74,
+ 568,1,0,0,0,76,573,1,0,0,0,78,584,1,0,0,0,80,586,1,0,0,0,82,592,1,0,0,
+ 0,84,600,1,0,0,0,86,618,1,0,0,0,88,620,1,0,0,0,90,628,1,0,0,0,92,633,
+ 1,0,0,0,94,641,1,0,0,0,96,645,1,0,0,0,98,649,1,0,0,0,100,658,1,0,0,0,
+ 102,672,1,0,0,0,104,674,1,0,0,0,106,733,1,0,0,0,108,735,1,0,0,0,110,895,
+ 1,0,0,0,112,1004,1,0,0,0,114,1017,1,0,0,0,116,1044,1,0,0,0,118,1077,1,
+ 0,0,0,120,1090,1,0,0,0,122,1092,1,0,0,0,124,1113,1,0,0,0,126,1122,1,0,
+ 0,0,128,1124,1,0,0,0,130,1141,1,0,0,0,132,1154,1,0,0,0,134,1164,1,0,0,
+ 0,136,1168,1,0,0,0,138,1179,1,0,0,0,140,1189,1,0,0,0,142,1192,1,0,0,0,
+ 144,1205,1,0,0,0,146,1207,1,0,0,0,148,1209,1,0,0,0,150,1211,1,0,0,0,152,
+ 1215,1,0,0,0,154,1220,1,0,0,0,156,1222,1,0,0,0,158,1226,1,0,0,0,160,1232,
+ 1,0,0,0,162,1234,1,0,0,0,164,1248,1,0,0,0,166,1250,1,0,0,0,168,1264,1,
+ 0,0,0,170,172,3,2,1,0,171,170,1,0,0,0,172,175,1,0,0,0,173,171,1,0,0,0,
+ 173,174,1,0,0,0,174,176,1,0,0,0,175,173,1,0,0,0,176,177,5,0,0,1,177,1,
+ 1,0,0,0,178,181,3,6,3,0,179,181,3,10,5,0,180,178,1,0,0,0,180,179,1,0,
+ 0,0,181,3,1,0,0,0,182,183,3,110,55,0,183,5,1,0,0,0,184,185,5,50,0,0,185,
+ 189,3,154,77,0,186,187,5,111,0,0,187,188,5,118,0,0,188,190,3,4,2,0,189,
+ 186,1,0,0,0,189,190,1,0,0,0,190,7,1,0,0,0,191,196,3,154,77,0,192,193,
+ 5,112,0,0,193,195,3,154,77,0,194,192,1,0,0,0,195,198,1,0,0,0,196,194,
+ 1,0,0,0,196,197,1,0,0,0,197,200,1,0,0,0,198,196,1,0,0,0,199,201,5,112,
+ 0,0,200,199,1,0,0,0,200,201,1,0,0,0,201,9,1,0,0,0,202,213,3,12,6,0,203,
+ 213,3,14,7,0,204,213,3,16,8,0,205,213,3,20,10,0,206,213,3,18,9,0,207,
+ 213,3,22,11,0,208,213,3,24,12,0,209,213,3,30,15,0,210,213,3,26,13,0,211,
+ 213,3,28,14,0,212,202,1,0,0,0,212,203,1,0,0,0,212,204,1,0,0,0,212,205,
+ 1,0,0,0,212,206,1,0,0,0,212,207,1,0,0,0,212,208,1,0,0,0,212,209,1,0,0,
+ 0,212,210,1,0,0,0,212,211,1,0,0,0,213,11,1,0,0,0,214,216,5,70,0,0,215,
+ 217,3,4,2,0,216,215,1,0,0,0,216,217,1,0,0,0,217,219,1,0,0,0,218,220,5,
+ 146,0,0,219,218,1,0,0,0,219,220,1,0,0,0,220,13,1,0,0,0,221,222,5,38,0,
+ 0,222,223,5,126,0,0,223,224,3,4,2,0,224,225,5,145,0,0,225,228,3,10,5,
+ 0,226,227,5,24,0,0,227,229,3,10,5,0,228,226,1,0,0,0,228,229,1,0,0,0,229,
+ 15,1,0,0,0,230,231,5,96,0,0,231,232,5,126,0,0,232,233,3,4,2,0,233,234,
+ 5,145,0,0,234,236,3,10,5,0,235,237,5,146,0,0,236,235,1,0,0,0,236,237,
+ 1,0,0,0,237,17,1,0,0,0,238,239,5,31,0,0,239,243,5,126,0,0,240,244,3,6,
+ 3,0,241,244,3,24,12,0,242,244,3,4,2,0,243,240,1,0,0,0,243,241,1,0,0,0,
+ 243,242,1,0,0,0,243,244,1,0,0,0,244,245,1,0,0,0,245,247,5,146,0,0,246,
+ 248,3,4,2,0,247,246,1,0,0,0,247,248,1,0,0,0,248,249,1,0,0,0,249,253,5,
+ 146,0,0,250,254,3,6,3,0,251,254,3,24,12,0,252,254,3,4,2,0,253,250,1,0,
+ 0,0,253,251,1,0,0,0,253,252,1,0,0,0,253,254,1,0,0,0,254,255,1,0,0,0,255,
+ 256,5,145,0,0,256,258,3,10,5,0,257,259,5,146,0,0,258,257,1,0,0,0,258,
+ 259,1,0,0,0,259,19,1,0,0,0,260,261,5,31,0,0,261,262,5,126,0,0,262,263,
+ 5,50,0,0,263,266,3,154,77,0,264,265,5,112,0,0,265,267,3,154,77,0,266,
+ 264,1,0,0,0,266,267,1,0,0,0,267,268,1,0,0,0,268,269,5,40,0,0,269,270,
+ 3,4,2,0,270,271,5,145,0,0,271,273,3,10,5,0,272,274,5,146,0,0,273,272,
+ 1,0,0,0,273,274,1,0,0,0,274,21,1,0,0,0,275,276,5,29,0,0,276,277,3,154,
+ 77,0,277,279,5,126,0,0,278,280,3,8,4,0,279,278,1,0,0,0,279,280,1,0,0,
+ 0,280,281,1,0,0,0,281,282,5,145,0,0,282,283,3,30,15,0,283,23,1,0,0,0,
+ 284,285,3,4,2,0,285,286,5,111,0,0,286,287,5,118,0,0,287,288,3,4,2,0,288,
+ 25,1,0,0,0,289,291,3,4,2,0,290,292,5,146,0,0,291,290,1,0,0,0,291,292,
+ 1,0,0,0,292,27,1,0,0,0,293,294,5,146,0,0,294,29,1,0,0,0,295,299,5,124,
+ 0,0,296,298,3,2,1,0,297,296,1,0,0,0,298,301,1,0,0,0,299,297,1,0,0,0,299,
+ 300,1,0,0,0,300,302,1,0,0,0,301,299,1,0,0,0,302,303,5,143,0,0,303,31,
+ 1,0,0,0,304,305,3,4,2,0,305,306,5,111,0,0,306,307,3,4,2,0,307,33,1,0,
+ 0,0,308,313,3,32,16,0,309,310,5,112,0,0,310,312,3,32,16,0,311,309,1,0,
+ 0,0,312,315,1,0,0,0,313,311,1,0,0,0,313,314,1,0,0,0,314,317,1,0,0,0,315,
+ 313,1,0,0,0,316,318,5,112,0,0,317,316,1,0,0,0,317,318,1,0,0,0,318,35,
+ 1,0,0,0,319,323,3,38,19,0,320,323,3,42,21,0,321,323,3,118,59,0,322,319,
+ 1,0,0,0,322,320,1,0,0,0,322,321,1,0,0,0,323,324,1,0,0,0,324,325,5,0,0,
+ 1,325,37,1,0,0,0,326,332,3,40,20,0,327,328,5,91,0,0,328,329,5,1,0,0,329,
+ 331,3,40,20,0,330,327,1,0,0,0,331,334,1,0,0,0,332,330,1,0,0,0,332,333,
+ 1,0,0,0,333,39,1,0,0,0,334,332,1,0,0,0,335,342,3,42,21,0,336,337,5,126,
+ 0,0,337,338,3,38,19,0,338,339,5,145,0,0,339,342,1,0,0,0,340,342,3,158,
+ 79,0,341,335,1,0,0,0,341,336,1,0,0,0,341,340,1,0,0,0,342,41,1,0,0,0,343,
+ 345,3,44,22,0,344,343,1,0,0,0,344,345,1,0,0,0,345,346,1,0,0,0,346,348,
+ 5,77,0,0,347,349,5,23,0,0,348,347,1,0,0,0,348,349,1,0,0,0,349,351,1,0,
+ 0,0,350,352,3,46,23,0,351,350,1,0,0,0,351,352,1,0,0,0,352,353,1,0,0,0,
+ 353,355,3,108,54,0,354,356,3,48,24,0,355,354,1,0,0,0,355,356,1,0,0,0,
+ 356,358,1,0,0,0,357,359,3,50,25,0,358,357,1,0,0,0,358,359,1,0,0,0,359,
+ 361,1,0,0,0,360,362,3,54,27,0,361,360,1,0,0,0,361,362,1,0,0,0,362,364,
+ 1,0,0,0,363,365,3,56,28,0,364,363,1,0,0,0,364,365,1,0,0,0,365,367,1,0,
+ 0,0,366,368,3,58,29,0,367,366,1,0,0,0,367,368,1,0,0,0,368,371,1,0,0,0,
+ 369,370,5,98,0,0,370,372,7,0,0,0,371,369,1,0,0,0,371,372,1,0,0,0,372,
+ 375,1,0,0,0,373,374,5,98,0,0,374,376,5,86,0,0,375,373,1,0,0,0,375,376,
+ 1,0,0,0,376,378,1,0,0,0,377,379,3,60,30,0,378,377,1,0,0,0,378,379,1,0,
+ 0,0,379,381,1,0,0,0,380,382,3,52,26,0,381,380,1,0,0,0,381,382,1,0,0,0,
+ 382,384,1,0,0,0,383,385,3,62,31,0,384,383,1,0,0,0,384,385,1,0,0,0,385,
+ 388,1,0,0,0,386,389,3,66,33,0,387,389,3,68,34,0,388,386,1,0,0,0,388,387,
+ 1,0,0,0,388,389,1,0,0,0,389,391,1,0,0,0,390,392,3,70,35,0,391,390,1,0,
+ 0,0,391,392,1,0,0,0,392,43,1,0,0,0,393,394,5,98,0,0,394,395,3,122,61,
+ 0,395,45,1,0,0,0,396,397,5,85,0,0,397,400,5,104,0,0,398,399,5,98,0,0,
+ 399,401,5,82,0,0,400,398,1,0,0,0,400,401,1,0,0,0,401,47,1,0,0,0,402,403,
+ 5,32,0,0,403,404,3,72,36,0,404,49,1,0,0,0,405,407,7,1,0,0,406,405,1,0,
+ 0,0,406,407,1,0,0,0,407,408,1,0,0,0,408,409,5,5,0,0,409,410,5,45,0,0,
+ 410,411,3,108,54,0,411,51,1,0,0,0,412,413,5,97,0,0,413,414,3,154,77,0,
+ 414,415,5,6,0,0,415,416,5,126,0,0,416,417,3,92,46,0,417,427,5,145,0,0,
+ 418,419,5,112,0,0,419,420,3,154,77,0,420,421,5,6,0,0,421,422,5,126,0,
+ 0,422,423,3,92,46,0,423,424,5,145,0,0,424,426,1,0,0,0,425,418,1,0,0,0,
+ 426,429,1,0,0,0,427,425,1,0,0,0,427,428,1,0,0,0,428,53,1,0,0,0,429,427,
+ 1,0,0,0,430,431,5,67,0,0,431,432,3,110,55,0,432,55,1,0,0,0,433,434,5,
+ 95,0,0,434,435,3,110,55,0,435,57,1,0,0,0,436,437,5,34,0,0,437,444,5,11,
+ 0,0,438,439,7,0,0,0,439,440,5,126,0,0,440,441,3,108,54,0,441,442,5,145,
+ 0,0,442,445,1,0,0,0,443,445,3,108,54,0,444,438,1,0,0,0,444,443,1,0,0,
+ 0,445,59,1,0,0,0,446,447,5,35,0,0,447,448,3,110,55,0,448,61,1,0,0,0,449,
+ 450,5,62,0,0,450,451,5,11,0,0,451,452,3,82,41,0,452,63,1,0,0,0,453,454,
+ 5,62,0,0,454,455,5,11,0,0,455,456,3,108,54,0,456,65,1,0,0,0,457,458,5,
+ 52,0,0,458,461,3,110,55,0,459,460,5,112,0,0,460,462,3,110,55,0,461,459,
+ 1,0,0,0,461,462,1,0,0,0,462,467,1,0,0,0,463,464,5,98,0,0,464,468,5,82,
+ 0,0,465,466,5,11,0,0,466,468,3,108,54,0,467,463,1,0,0,0,467,465,1,0,0,
+ 0,467,468,1,0,0,0,468,487,1,0,0,0,469,470,5,52,0,0,470,473,3,110,55,0,
+ 471,472,5,98,0,0,472,474,5,82,0,0,473,471,1,0,0,0,473,474,1,0,0,0,474,
+ 475,1,0,0,0,475,476,5,59,0,0,476,477,3,110,55,0,477,487,1,0,0,0,478,479,
+ 5,52,0,0,479,480,3,110,55,0,480,481,5,59,0,0,481,484,3,110,55,0,482,483,
+ 5,11,0,0,483,485,3,108,54,0,484,482,1,0,0,0,484,485,1,0,0,0,485,487,1,
+ 0,0,0,486,457,1,0,0,0,486,469,1,0,0,0,486,478,1,0,0,0,487,67,1,0,0,0,
+ 488,489,5,59,0,0,489,490,3,110,55,0,490,69,1,0,0,0,491,492,5,79,0,0,492,
+ 493,3,88,44,0,493,71,1,0,0,0,494,495,6,36,-1,0,495,497,3,130,65,0,496,
+ 498,5,27,0,0,497,496,1,0,0,0,497,498,1,0,0,0,498,500,1,0,0,0,499,501,
+ 3,80,40,0,500,499,1,0,0,0,500,501,1,0,0,0,501,507,1,0,0,0,502,503,5,126,
+ 0,0,503,504,3,72,36,0,504,505,5,145,0,0,505,507,1,0,0,0,506,494,1,0,0,
+ 0,506,502,1,0,0,0,507,522,1,0,0,0,508,509,10,3,0,0,509,510,3,76,38,0,
+ 510,511,3,72,36,4,511,521,1,0,0,0,512,514,10,4,0,0,513,515,3,74,37,0,
+ 514,513,1,0,0,0,514,515,1,0,0,0,515,516,1,0,0,0,516,517,5,45,0,0,517,
+ 518,3,72,36,0,518,519,3,78,39,0,519,521,1,0,0,0,520,508,1,0,0,0,520,512,
+ 1,0,0,0,521,524,1,0,0,0,522,520,1,0,0,0,522,523,1,0,0,0,523,73,1,0,0,
+ 0,524,522,1,0,0,0,525,527,7,2,0,0,526,525,1,0,0,0,526,527,1,0,0,0,527,
+ 528,1,0,0,0,528,535,5,42,0,0,529,531,5,42,0,0,530,532,7,2,0,0,531,530,
+ 1,0,0,0,531,532,1,0,0,0,532,535,1,0,0,0,533,535,7,2,0,0,534,526,1,0,0,
+ 0,534,529,1,0,0,0,534,533,1,0,0,0,535,569,1,0,0,0,536,538,7,3,0,0,537,
+ 536,1,0,0,0,537,538,1,0,0,0,538,539,1,0,0,0,539,541,7,4,0,0,540,542,5,
+ 63,0,0,541,540,1,0,0,0,541,542,1,0,0,0,542,551,1,0,0,0,543,545,7,4,0,
+ 0,544,546,5,63,0,0,545,544,1,0,0,0,545,546,1,0,0,0,546,548,1,0,0,0,547,
+ 549,7,3,0,0,548,547,1,0,0,0,548,549,1,0,0,0,549,551,1,0,0,0,550,537,1,
+ 0,0,0,550,543,1,0,0,0,551,569,1,0,0,0,552,554,7,5,0,0,553,552,1,0,0,0,
+ 553,554,1,0,0,0,554,555,1,0,0,0,555,557,5,33,0,0,556,558,5,63,0,0,557,
+ 556,1,0,0,0,557,558,1,0,0,0,558,567,1,0,0,0,559,561,5,33,0,0,560,562,
+ 5,63,0,0,561,560,1,0,0,0,561,562,1,0,0,0,562,564,1,0,0,0,563,565,7,5,
+ 0,0,564,563,1,0,0,0,564,565,1,0,0,0,565,567,1,0,0,0,566,553,1,0,0,0,566,
+ 559,1,0,0,0,567,569,1,0,0,0,568,534,1,0,0,0,568,550,1,0,0,0,568,566,1,
+ 0,0,0,569,75,1,0,0,0,570,571,5,16,0,0,571,574,5,45,0,0,572,574,5,112,
+ 0,0,573,570,1,0,0,0,573,572,1,0,0,0,574,77,1,0,0,0,575,576,5,60,0,0,576,
+ 585,3,108,54,0,577,578,5,92,0,0,578,579,5,126,0,0,579,580,3,108,54,0,
+ 580,581,5,145,0,0,581,585,1,0,0,0,582,583,5,92,0,0,583,585,3,108,54,0,
+ 584,575,1,0,0,0,584,577,1,0,0,0,584,582,1,0,0,0,585,79,1,0,0,0,586,587,
+ 5,75,0,0,587,590,3,86,43,0,588,589,5,59,0,0,589,591,3,86,43,0,590,588,
+ 1,0,0,0,590,591,1,0,0,0,591,81,1,0,0,0,592,597,3,84,42,0,593,594,5,112,
+ 0,0,594,596,3,84,42,0,595,593,1,0,0,0,596,599,1,0,0,0,597,595,1,0,0,0,
+ 597,598,1,0,0,0,598,83,1,0,0,0,599,597,1,0,0,0,600,602,3,110,55,0,601,
+ 603,7,6,0,0,602,601,1,0,0,0,602,603,1,0,0,0,603,606,1,0,0,0,604,605,5,
+ 58,0,0,605,607,7,7,0,0,606,604,1,0,0,0,606,607,1,0,0,0,607,610,1,0,0,
+ 0,608,609,5,15,0,0,609,611,5,106,0,0,610,608,1,0,0,0,610,611,1,0,0,0,
+ 611,85,1,0,0,0,612,619,3,158,79,0,613,616,3,142,71,0,614,615,5,147,0,
+ 0,615,617,3,142,71,0,616,614,1,0,0,0,616,617,1,0,0,0,617,619,1,0,0,0,
+ 618,612,1,0,0,0,618,613,1,0,0,0,619,87,1,0,0,0,620,625,3,90,45,0,621,
+ 622,5,112,0,0,622,624,3,90,45,0,623,621,1,0,0,0,624,627,1,0,0,0,625,623,
+ 1,0,0,0,625,626,1,0,0,0,626,89,1,0,0,0,627,625,1,0,0,0,628,629,3,154,
+ 77,0,629,630,5,118,0,0,630,631,3,144,72,0,631,91,1,0,0,0,632,634,3,94,
+ 47,0,633,632,1,0,0,0,633,634,1,0,0,0,634,636,1,0,0,0,635,637,3,96,48,
+ 0,636,635,1,0,0,0,636,637,1,0,0,0,637,639,1,0,0,0,638,640,3,98,49,0,639,
+ 638,1,0,0,0,639,640,1,0,0,0,640,93,1,0,0,0,641,642,5,65,0,0,642,643,5,
+ 11,0,0,643,644,3,108,54,0,644,95,1,0,0,0,645,646,5,62,0,0,646,647,5,11,
+ 0,0,647,648,3,82,41,0,648,97,1,0,0,0,649,650,7,8,0,0,650,651,3,100,50,
+ 0,651,99,1,0,0,0,652,659,3,102,51,0,653,654,5,9,0,0,654,655,3,102,51,
+ 0,655,656,5,2,0,0,656,657,3,102,51,0,657,659,1,0,0,0,658,652,1,0,0,0,
+ 658,653,1,0,0,0,659,101,1,0,0,0,660,661,5,18,0,0,661,673,5,73,0,0,662,
+ 663,5,90,0,0,663,673,5,66,0,0,664,665,5,90,0,0,665,673,5,30,0,0,666,667,
+ 3,142,71,0,667,668,5,66,0,0,668,673,1,0,0,0,669,670,3,142,71,0,670,671,
+ 5,30,0,0,671,673,1,0,0,0,672,660,1,0,0,0,672,662,1,0,0,0,672,664,1,0,
+ 0,0,672,666,1,0,0,0,672,669,1,0,0,0,673,103,1,0,0,0,674,675,3,110,55,
+ 0,675,676,5,0,0,1,676,105,1,0,0,0,677,734,3,154,77,0,678,679,3,154,77,
+ 0,679,680,5,126,0,0,680,681,3,154,77,0,681,688,3,106,53,0,682,683,5,112,
+ 0,0,683,684,3,154,77,0,684,685,3,106,53,0,685,687,1,0,0,0,686,682,1,0,
+ 0,0,687,690,1,0,0,0,688,686,1,0,0,0,688,689,1,0,0,0,689,692,1,0,0,0,690,
+ 688,1,0,0,0,691,693,5,112,0,0,692,691,1,0,0,0,692,693,1,0,0,0,693,694,
+ 1,0,0,0,694,695,5,145,0,0,695,734,1,0,0,0,696,697,3,154,77,0,697,698,
+ 5,126,0,0,698,703,3,156,78,0,699,700,5,112,0,0,700,702,3,156,78,0,701,
+ 699,1,0,0,0,702,705,1,0,0,0,703,701,1,0,0,0,703,704,1,0,0,0,704,707,1,
+ 0,0,0,705,703,1,0,0,0,706,708,5,112,0,0,707,706,1,0,0,0,707,708,1,0,0,
+ 0,708,709,1,0,0,0,709,710,5,145,0,0,710,734,1,0,0,0,711,712,3,154,77,
+ 0,712,713,5,126,0,0,713,718,3,106,53,0,714,715,5,112,0,0,715,717,3,106,
+ 53,0,716,714,1,0,0,0,717,720,1,0,0,0,718,716,1,0,0,0,718,719,1,0,0,0,
+ 719,722,1,0,0,0,720,718,1,0,0,0,721,723,5,112,0,0,722,721,1,0,0,0,722,
+ 723,1,0,0,0,723,724,1,0,0,0,724,725,5,145,0,0,725,734,1,0,0,0,726,727,
+ 3,154,77,0,727,729,5,126,0,0,728,730,3,108,54,0,729,728,1,0,0,0,729,730,
+ 1,0,0,0,730,731,1,0,0,0,731,732,5,145,0,0,732,734,1,0,0,0,733,677,1,0,
+ 0,0,733,678,1,0,0,0,733,696,1,0,0,0,733,711,1,0,0,0,733,726,1,0,0,0,734,
+ 107,1,0,0,0,735,740,3,110,55,0,736,737,5,112,0,0,737,739,3,110,55,0,738,
+ 736,1,0,0,0,739,742,1,0,0,0,740,738,1,0,0,0,740,741,1,0,0,0,741,744,1,
+ 0,0,0,742,740,1,0,0,0,743,745,5,112,0,0,744,743,1,0,0,0,744,745,1,0,0,
+ 0,745,109,1,0,0,0,746,747,6,55,-1,0,747,749,5,12,0,0,748,750,3,110,55,
+ 0,749,748,1,0,0,0,749,750,1,0,0,0,750,756,1,0,0,0,751,752,5,94,0,0,752,
+ 753,3,110,55,0,753,754,5,81,0,0,754,755,3,110,55,0,755,757,1,0,0,0,756,
+ 751,1,0,0,0,757,758,1,0,0,0,758,756,1,0,0,0,758,759,1,0,0,0,759,762,1,
+ 0,0,0,760,761,5,24,0,0,761,763,3,110,55,0,762,760,1,0,0,0,762,763,1,0,
+ 0,0,763,764,1,0,0,0,764,765,5,25,0,0,765,896,1,0,0,0,766,767,5,13,0,0,
+ 767,768,5,126,0,0,768,769,3,110,55,0,769,770,5,6,0,0,770,771,3,106,53,
+ 0,771,772,5,145,0,0,772,896,1,0,0,0,773,774,5,19,0,0,774,896,5,106,0,
+ 0,775,776,5,43,0,0,776,777,3,110,55,0,777,778,3,146,73,0,778,896,1,0,
+ 0,0,779,780,5,80,0,0,780,781,5,126,0,0,781,782,3,110,55,0,782,783,5,32,
+ 0,0,783,786,3,110,55,0,784,785,5,31,0,0,785,787,3,110,55,0,786,784,1,
+ 0,0,0,786,787,1,0,0,0,787,788,1,0,0,0,788,789,5,145,0,0,789,896,1,0,0,
+ 0,790,791,5,83,0,0,791,896,5,106,0,0,792,793,5,88,0,0,793,794,5,126,0,
+ 0,794,795,7,9,0,0,795,796,3,160,80,0,796,797,5,32,0,0,797,798,3,110,55,
+ 0,798,799,5,145,0,0,799,896,1,0,0,0,800,801,3,154,77,0,801,803,5,126,
+ 0,0,802,804,3,108,54,0,803,802,1,0,0,0,803,804,1,0,0,0,804,805,1,0,0,
+ 0,805,806,5,145,0,0,806,815,1,0,0,0,807,809,5,126,0,0,808,810,5,23,0,
+ 0,809,808,1,0,0,0,809,810,1,0,0,0,810,812,1,0,0,0,811,813,3,112,56,0,
+ 812,811,1,0,0,0,812,813,1,0,0,0,813,814,1,0,0,0,814,816,5,145,0,0,815,
+ 807,1,0,0,0,815,816,1,0,0,0,816,817,1,0,0,0,817,818,5,64,0,0,818,819,
+ 5,126,0,0,819,820,3,92,46,0,820,821,5,145,0,0,821,896,1,0,0,0,822,823,
+ 3,154,77,0,823,825,5,126,0,0,824,826,3,108,54,0,825,824,1,0,0,0,825,826,
+ 1,0,0,0,826,827,1,0,0,0,827,828,5,145,0,0,828,837,1,0,0,0,829,831,5,126,
+ 0,0,830,832,5,23,0,0,831,830,1,0,0,0,831,832,1,0,0,0,832,834,1,0,0,0,
+ 833,835,3,112,56,0,834,833,1,0,0,0,834,835,1,0,0,0,835,836,1,0,0,0,836,
+ 838,5,145,0,0,837,829,1,0,0,0,837,838,1,0,0,0,838,839,1,0,0,0,839,840,
+ 5,64,0,0,840,841,3,154,77,0,841,896,1,0,0,0,842,848,3,154,77,0,843,845,
+ 5,126,0,0,844,846,3,108,54,0,845,844,1,0,0,0,845,846,1,0,0,0,846,847,
+ 1,0,0,0,847,849,5,145,0,0,848,843,1,0,0,0,848,849,1,0,0,0,849,850,1,0,
+ 0,0,850,852,5,126,0,0,851,853,5,23,0,0,852,851,1,0,0,0,852,853,1,0,0,
+ 0,853,855,1,0,0,0,854,856,3,112,56,0,855,854,1,0,0,0,855,856,1,0,0,0,
+ 856,857,1,0,0,0,857,858,5,145,0,0,858,896,1,0,0,0,859,896,3,118,59,0,
+ 860,896,3,162,81,0,861,896,3,144,72,0,862,863,5,114,0,0,863,896,3,110,
+ 55,19,864,865,5,56,0,0,865,896,3,110,55,13,866,867,3,134,67,0,867,868,
+ 5,116,0,0,868,870,1,0,0,0,869,866,1,0,0,0,869,870,1,0,0,0,870,871,1,0,
+ 0,0,871,896,5,108,0,0,872,873,5,126,0,0,873,874,3,38,19,0,874,875,5,145,
+ 0,0,875,896,1,0,0,0,876,877,5,126,0,0,877,878,3,110,55,0,878,879,5,145,
+ 0,0,879,896,1,0,0,0,880,881,5,126,0,0,881,882,3,108,54,0,882,883,5,145,
+ 0,0,883,896,1,0,0,0,884,886,5,125,0,0,885,887,3,108,54,0,886,885,1,0,
+ 0,0,886,887,1,0,0,0,887,888,1,0,0,0,888,896,5,144,0,0,889,891,5,124,0,
+ 0,890,892,3,34,17,0,891,890,1,0,0,0,891,892,1,0,0,0,892,893,1,0,0,0,893,
+ 896,5,143,0,0,894,896,3,126,63,0,895,746,1,0,0,0,895,766,1,0,0,0,895,
+ 773,1,0,0,0,895,775,1,0,0,0,895,779,1,0,0,0,895,790,1,0,0,0,895,792,1,
+ 0,0,0,895,800,1,0,0,0,895,822,1,0,0,0,895,842,1,0,0,0,895,859,1,0,0,0,
+ 895,860,1,0,0,0,895,861,1,0,0,0,895,862,1,0,0,0,895,864,1,0,0,0,895,869,
+ 1,0,0,0,895,872,1,0,0,0,895,876,1,0,0,0,895,880,1,0,0,0,895,884,1,0,0,
+ 0,895,889,1,0,0,0,895,894,1,0,0,0,896,1001,1,0,0,0,897,901,10,18,0,0,
+ 898,902,5,108,0,0,899,902,5,147,0,0,900,902,5,134,0,0,901,898,1,0,0,0,
+ 901,899,1,0,0,0,901,900,1,0,0,0,902,903,1,0,0,0,903,1000,3,110,55,19,
+ 904,908,10,17,0,0,905,909,5,135,0,0,906,909,5,114,0,0,907,909,5,113,0,
+ 0,908,905,1,0,0,0,908,906,1,0,0,0,908,907,1,0,0,0,909,910,1,0,0,0,910,
+ 1000,3,110,55,18,911,936,10,16,0,0,912,937,5,117,0,0,913,937,5,118,0,
+ 0,914,937,5,129,0,0,915,937,5,127,0,0,916,937,5,128,0,0,917,937,5,119,
+ 0,0,918,937,5,120,0,0,919,921,5,56,0,0,920,919,1,0,0,0,920,921,1,0,0,
+ 0,921,922,1,0,0,0,922,924,5,40,0,0,923,925,5,14,0,0,924,923,1,0,0,0,924,
+ 925,1,0,0,0,925,937,1,0,0,0,926,928,5,56,0,0,927,926,1,0,0,0,927,928,
+ 1,0,0,0,928,929,1,0,0,0,929,937,7,10,0,0,930,937,5,141,0,0,931,937,5,
+ 142,0,0,932,937,5,131,0,0,933,937,5,122,0,0,934,937,5,123,0,0,935,937,
+ 5,130,0,0,936,912,1,0,0,0,936,913,1,0,0,0,936,914,1,0,0,0,936,915,1,0,
+ 0,0,936,916,1,0,0,0,936,917,1,0,0,0,936,918,1,0,0,0,936,920,1,0,0,0,936,
+ 927,1,0,0,0,936,930,1,0,0,0,936,931,1,0,0,0,936,932,1,0,0,0,936,933,1,
+ 0,0,0,936,934,1,0,0,0,936,935,1,0,0,0,937,938,1,0,0,0,938,1000,3,110,
+ 55,17,939,940,10,14,0,0,940,941,5,133,0,0,941,1000,3,110,55,15,942,943,
+ 10,12,0,0,943,944,5,2,0,0,944,1000,3,110,55,13,945,946,10,11,0,0,946,
+ 947,5,61,0,0,947,1000,3,110,55,12,948,950,10,10,0,0,949,951,5,56,0,0,
+ 950,949,1,0,0,0,950,951,1,0,0,0,951,952,1,0,0,0,952,953,5,9,0,0,953,954,
+ 3,110,55,0,954,955,5,2,0,0,955,956,3,110,55,11,956,1000,1,0,0,0,957,958,
+ 10,9,0,0,958,959,5,136,0,0,959,960,3,110,55,0,960,961,5,111,0,0,961,962,
+ 3,110,55,9,962,1000,1,0,0,0,963,964,10,25,0,0,964,965,5,125,0,0,965,966,
+ 3,110,55,0,966,967,5,144,0,0,967,1000,1,0,0,0,968,969,10,24,0,0,969,970,
+ 5,116,0,0,970,1000,5,104,0,0,971,972,10,23,0,0,972,973,5,116,0,0,973,
+ 1000,3,154,77,0,974,975,10,22,0,0,975,976,5,132,0,0,976,977,5,125,0,0,
+ 977,978,3,110,55,0,978,979,5,144,0,0,979,1000,1,0,0,0,980,981,10,21,0,
+ 0,981,982,5,132,0,0,982,1000,5,104,0,0,983,984,10,20,0,0,984,985,5,132,
+ 0,0,985,1000,3,154,77,0,986,987,10,15,0,0,987,989,5,44,0,0,988,990,5,
+ 56,0,0,989,988,1,0,0,0,989,990,1,0,0,0,990,991,1,0,0,0,991,1000,5,57,
+ 0,0,992,997,10,8,0,0,993,994,5,6,0,0,994,998,3,154,77,0,995,996,5,6,0,
+ 0,996,998,5,106,0,0,997,993,1,0,0,0,997,995,1,0,0,0,998,1000,1,0,0,0,
+ 999,897,1,0,0,0,999,904,1,0,0,0,999,911,1,0,0,0,999,939,1,0,0,0,999,942,
+ 1,0,0,0,999,945,1,0,0,0,999,948,1,0,0,0,999,957,1,0,0,0,999,963,1,0,0,
+ 0,999,968,1,0,0,0,999,971,1,0,0,0,999,974,1,0,0,0,999,980,1,0,0,0,999,
+ 983,1,0,0,0,999,986,1,0,0,0,999,992,1,0,0,0,1000,1003,1,0,0,0,1001,999,
+ 1,0,0,0,1001,1002,1,0,0,0,1002,111,1,0,0,0,1003,1001,1,0,0,0,1004,1009,
+ 3,114,57,0,1005,1006,5,112,0,0,1006,1008,3,114,57,0,1007,1005,1,0,0,0,
+ 1008,1011,1,0,0,0,1009,1007,1,0,0,0,1009,1010,1,0,0,0,1010,1013,1,0,0,
+ 0,1011,1009,1,0,0,0,1012,1014,5,112,0,0,1013,1012,1,0,0,0,1013,1014,1,
+ 0,0,0,1014,113,1,0,0,0,1015,1018,3,116,58,0,1016,1018,3,110,55,0,1017,
+ 1015,1,0,0,0,1017,1016,1,0,0,0,1018,115,1,0,0,0,1019,1020,5,126,0,0,1020,
+ 1025,3,154,77,0,1021,1022,5,112,0,0,1022,1024,3,154,77,0,1023,1021,1,
+ 0,0,0,1024,1027,1,0,0,0,1025,1023,1,0,0,0,1025,1026,1,0,0,0,1026,1029,
+ 1,0,0,0,1027,1025,1,0,0,0,1028,1030,5,112,0,0,1029,1028,1,0,0,0,1029,
+ 1030,1,0,0,0,1030,1031,1,0,0,0,1031,1032,5,145,0,0,1032,1045,1,0,0,0,
+ 1033,1038,3,154,77,0,1034,1035,5,112,0,0,1035,1037,3,154,77,0,1036,1034,
+ 1,0,0,0,1037,1040,1,0,0,0,1038,1036,1,0,0,0,1038,1039,1,0,0,0,1039,1042,
+ 1,0,0,0,1040,1038,1,0,0,0,1041,1043,5,112,0,0,1042,1041,1,0,0,0,1042,
+ 1043,1,0,0,0,1043,1045,1,0,0,0,1044,1019,1,0,0,0,1044,1033,1,0,0,0,1045,
+ 1046,1,0,0,0,1046,1047,5,107,0,0,1047,1048,3,110,55,0,1048,117,1,0,0,
+ 0,1049,1050,5,128,0,0,1050,1054,3,154,77,0,1051,1053,3,120,60,0,1052,
+ 1051,1,0,0,0,1053,1056,1,0,0,0,1054,1052,1,0,0,0,1054,1055,1,0,0,0,1055,
+ 1057,1,0,0,0,1056,1054,1,0,0,0,1057,1058,5,147,0,0,1058,1059,5,120,0,
+ 0,1059,1078,1,0,0,0,1060,1061,5,128,0,0,1061,1065,3,154,77,0,1062,1064,
+ 3,120,60,0,1063,1062,1,0,0,0,1064,1067,1,0,0,0,1065,1063,1,0,0,0,1065,
+ 1066,1,0,0,0,1066,1068,1,0,0,0,1067,1065,1,0,0,0,1068,1070,5,120,0,0,
+ 1069,1071,3,118,59,0,1070,1069,1,0,0,0,1070,1071,1,0,0,0,1071,1072,1,
+ 0,0,0,1072,1073,5,128,0,0,1073,1074,5,147,0,0,1074,1075,3,154,77,0,1075,
+ 1076,5,120,0,0,1076,1078,1,0,0,0,1077,1049,1,0,0,0,1077,1060,1,0,0,0,
+ 1078,119,1,0,0,0,1079,1080,3,154,77,0,1080,1081,5,118,0,0,1081,1082,3,
+ 160,80,0,1082,1091,1,0,0,0,1083,1084,3,154,77,0,1084,1085,5,118,0,0,1085,
+ 1086,5,124,0,0,1086,1087,3,110,55,0,1087,1088,5,143,0,0,1088,1091,1,0,
+ 0,0,1089,1091,3,154,77,0,1090,1079,1,0,0,0,1090,1083,1,0,0,0,1090,1089,
+ 1,0,0,0,1091,121,1,0,0,0,1092,1097,3,124,62,0,1093,1094,5,112,0,0,1094,
+ 1096,3,124,62,0,1095,1093,1,0,0,0,1096,1099,1,0,0,0,1097,1095,1,0,0,0,
+ 1097,1098,1,0,0,0,1098,1101,1,0,0,0,1099,1097,1,0,0,0,1100,1102,5,112,
+ 0,0,1101,1100,1,0,0,0,1101,1102,1,0,0,0,1102,123,1,0,0,0,1103,1104,3,
+ 154,77,0,1104,1105,5,6,0,0,1105,1106,5,126,0,0,1106,1107,3,38,19,0,1107,
+ 1108,5,145,0,0,1108,1114,1,0,0,0,1109,1110,3,110,55,0,1110,1111,5,6,0,
+ 0,1111,1112,3,154,77,0,1112,1114,1,0,0,0,1113,1103,1,0,0,0,1113,1109,
+ 1,0,0,0,1114,125,1,0,0,0,1115,1123,3,158,79,0,1116,1117,3,134,67,0,1117,
+ 1118,5,116,0,0,1118,1120,1,0,0,0,1119,1116,1,0,0,0,1119,1120,1,0,0,0,
+ 1120,1121,1,0,0,0,1121,1123,3,128,64,0,1122,1115,1,0,0,0,1122,1119,1,
+ 0,0,0,1123,127,1,0,0,0,1124,1129,3,154,77,0,1125,1126,5,116,0,0,1126,
+ 1128,3,154,77,0,1127,1125,1,0,0,0,1128,1131,1,0,0,0,1129,1127,1,0,0,0,
+ 1129,1130,1,0,0,0,1130,129,1,0,0,0,1131,1129,1,0,0,0,1132,1133,6,65,-1,
+ 0,1133,1142,3,134,67,0,1134,1142,3,132,66,0,1135,1136,5,126,0,0,1136,
+ 1137,3,38,19,0,1137,1138,5,145,0,0,1138,1142,1,0,0,0,1139,1142,3,118,
+ 59,0,1140,1142,3,158,79,0,1141,1132,1,0,0,0,1141,1134,1,0,0,0,1141,1135,
+ 1,0,0,0,1141,1139,1,0,0,0,1141,1140,1,0,0,0,1142,1151,1,0,0,0,1143,1147,
+ 10,3,0,0,1144,1148,3,152,76,0,1145,1146,5,6,0,0,1146,1148,3,154,77,0,
+ 1147,1144,1,0,0,0,1147,1145,1,0,0,0,1148,1150,1,0,0,0,1149,1143,1,0,0,
+ 0,1150,1153,1,0,0,0,1151,1149,1,0,0,0,1151,1152,1,0,0,0,1152,131,1,0,
+ 0,0,1153,1151,1,0,0,0,1154,1155,3,154,77,0,1155,1157,5,126,0,0,1156,1158,
+ 3,136,68,0,1157,1156,1,0,0,0,1157,1158,1,0,0,0,1158,1159,1,0,0,0,1159,
+ 1160,5,145,0,0,1160,133,1,0,0,0,1161,1162,3,138,69,0,1162,1163,5,116,
+ 0,0,1163,1165,1,0,0,0,1164,1161,1,0,0,0,1164,1165,1,0,0,0,1165,1166,1,
+ 0,0,0,1166,1167,3,154,77,0,1167,135,1,0,0,0,1168,1173,3,110,55,0,1169,
+ 1170,5,112,0,0,1170,1172,3,110,55,0,1171,1169,1,0,0,0,1172,1175,1,0,0,
+ 0,1173,1171,1,0,0,0,1173,1174,1,0,0,0,1174,1177,1,0,0,0,1175,1173,1,0,
+ 0,0,1176,1178,5,112,0,0,1177,1176,1,0,0,0,1177,1178,1,0,0,0,1178,137,
+ 1,0,0,0,1179,1180,3,154,77,0,1180,139,1,0,0,0,1181,1190,5,102,0,0,1182,
+ 1183,5,116,0,0,1183,1190,7,11,0,0,1184,1185,5,104,0,0,1185,1187,5,116,
+ 0,0,1186,1188,7,11,0,0,1187,1186,1,0,0,0,1187,1188,1,0,0,0,1188,1190,
+ 1,0,0,0,1189,1181,1,0,0,0,1189,1182,1,0,0,0,1189,1184,1,0,0,0,1190,141,
+ 1,0,0,0,1191,1193,7,12,0,0,1192,1191,1,0,0,0,1192,1193,1,0,0,0,1193,1200,
+ 1,0,0,0,1194,1201,3,140,70,0,1195,1201,5,103,0,0,1196,1201,5,104,0,0,
+ 1197,1201,5,105,0,0,1198,1201,5,41,0,0,1199,1201,5,55,0,0,1200,1194,1,
+ 0,0,0,1200,1195,1,0,0,0,1200,1196,1,0,0,0,1200,1197,1,0,0,0,1200,1198,
+ 1,0,0,0,1200,1199,1,0,0,0,1201,143,1,0,0,0,1202,1206,3,142,71,0,1203,
+ 1206,5,106,0,0,1204,1206,5,57,0,0,1205,1202,1,0,0,0,1205,1203,1,0,0,0,
+ 1205,1204,1,0,0,0,1206,145,1,0,0,0,1207,1208,7,13,0,0,1208,147,1,0,0,
+ 0,1209,1210,7,14,0,0,1210,149,1,0,0,0,1211,1212,7,15,0,0,1212,151,1,0,
+ 0,0,1213,1216,5,101,0,0,1214,1216,3,150,75,0,1215,1213,1,0,0,0,1215,1214,
+ 1,0,0,0,1216,153,1,0,0,0,1217,1221,5,101,0,0,1218,1221,3,146,73,0,1219,
+ 1221,3,148,74,0,1220,1217,1,0,0,0,1220,1218,1,0,0,0,1220,1219,1,0,0,0,
+ 1221,155,1,0,0,0,1222,1223,3,160,80,0,1223,1224,5,118,0,0,1224,1225,3,
+ 142,71,0,1225,157,1,0,0,0,1226,1227,5,124,0,0,1227,1228,3,154,77,0,1228,
+ 1229,5,143,0,0,1229,159,1,0,0,0,1230,1233,5,106,0,0,1231,1233,3,162,81,
+ 0,1232,1230,1,0,0,0,1232,1231,1,0,0,0,1233,161,1,0,0,0,1234,1238,5,138,
+ 0,0,1235,1237,3,164,82,0,1236,1235,1,0,0,0,1237,1240,1,0,0,0,1238,1236,
+ 1,0,0,0,1238,1239,1,0,0,0,1239,1241,1,0,0,0,1240,1238,1,0,0,0,1241,1242,
+ 5,140,0,0,1242,163,1,0,0,0,1243,1244,5,153,0,0,1244,1245,3,110,55,0,1245,
+ 1246,5,143,0,0,1246,1249,1,0,0,0,1247,1249,5,152,0,0,1248,1243,1,0,0,
+ 0,1248,1247,1,0,0,0,1249,165,1,0,0,0,1250,1254,5,139,0,0,1251,1253,3,
+ 168,84,0,1252,1251,1,0,0,0,1253,1256,1,0,0,0,1254,1252,1,0,0,0,1254,1255,
+ 1,0,0,0,1255,1257,1,0,0,0,1256,1254,1,0,0,0,1257,1258,5,0,0,1,1258,167,
+ 1,0,0,0,1259,1260,5,155,0,0,1260,1261,3,110,55,0,1261,1262,5,143,0,0,
+ 1262,1265,1,0,0,0,1263,1265,5,154,0,0,1264,1259,1,0,0,0,1264,1263,1,0,
+ 0,0,1265,169,1,0,0,0,162,173,180,189,196,200,212,216,219,228,236,243,
+ 247,253,258,266,273,279,291,299,313,317,322,332,341,344,348,351,355,358,
+ 361,364,367,371,375,378,381,384,388,391,400,406,427,444,461,467,473,484,
+ 486,497,500,506,514,520,522,526,531,534,537,541,545,548,550,553,557,561,
+ 564,566,568,573,584,590,597,602,606,610,616,618,625,633,636,639,658,672,
+ 688,692,703,707,718,722,729,733,740,744,749,758,762,786,803,809,812,815,
+ 825,831,834,837,845,848,852,855,869,886,891,895,901,908,920,924,927,936,
+ 950,989,997,999,1001,1009,1013,1017,1025,1029,1038,1042,1044,1054,1065,
+ 1070,1077,1090,1097,1101,1113,1119,1122,1129,1141,1147,1151,1157,1164,
+ 1173,1177,1187,1189,1192,1200,1205,1215,1220,1232,1238,1248,1254,1264
};
staticData->serializedATN = antlr4::atn::SerializedATNView(serializedATNSegment, sizeof(serializedATNSegment) / sizeof(serializedATNSegment[0]));
@@ -671,20 +678,20 @@ HogQLParser::ProgramContext* HogQLParser::program() {
});
try {
enterOuterAlt(_localctx, 1);
- setState(171);
+ setState(173);
_errHandler->sync(this);
_la = _input->LA(1);
while ((((_la & ~ 0x3fULL) == 0) &&
((1ULL << _la) & -2) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) &&
((1ULL << (_la - 64)) & 8076106351341731839) != 0) || ((((_la - 128) & ~ 0x3fULL) == 0) &&
((1ULL << (_la - 128)) & 263297) != 0)) {
- setState(168);
+ setState(170);
declaration();
- setState(173);
+ setState(175);
_errHandler->sync(this);
_la = _input->LA(1);
}
- setState(174);
+ setState(176);
match(HogQLParser::EOF);
}
@@ -736,12 +743,12 @@ HogQLParser::DeclarationContext* HogQLParser::declaration() {
exitRule();
});
try {
- setState(178);
+ setState(180);
_errHandler->sync(this);
switch (_input->LA(1)) {
case HogQLParser::LET: {
enterOuterAlt(_localctx, 1);
- setState(176);
+ setState(178);
varDecl();
break;
}
@@ -861,7 +868,7 @@ HogQLParser::DeclarationContext* HogQLParser::declaration() {
case HogQLParser::QUOTE_SINGLE_TEMPLATE:
case HogQLParser::SEMICOLON: {
enterOuterAlt(_localctx, 2);
- setState(177);
+ setState(179);
statement();
break;
}
@@ -916,7 +923,7 @@ HogQLParser::ExpressionContext* HogQLParser::expression() {
});
try {
enterOuterAlt(_localctx, 1);
- setState(180);
+ setState(182);
columnExpr(0);
}
@@ -982,20 +989,20 @@ HogQLParser::VarDeclContext* HogQLParser::varDecl() {
});
try {
enterOuterAlt(_localctx, 1);
- setState(182);
+ setState(184);
match(HogQLParser::LET);
- setState(183);
+ setState(185);
identifier();
- setState(187);
+ setState(189);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::COLON) {
- setState(184);
+ setState(186);
match(HogQLParser::COLON);
- setState(185);
+ setState(187);
match(HogQLParser::EQ_SINGLE);
- setState(186);
+ setState(188);
expression();
}
@@ -1059,28 +1066,28 @@ HogQLParser::IdentifierListContext* HogQLParser::identifierList() {
try {
size_t alt;
enterOuterAlt(_localctx, 1);
- setState(189);
+ setState(191);
identifier();
- setState(194);
+ setState(196);
_errHandler->sync(this);
alt = getInterpreter()->adaptivePredict(_input, 3, _ctx);
while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) {
if (alt == 1) {
- setState(190);
+ setState(192);
match(HogQLParser::COMMA);
- setState(191);
+ setState(193);
identifier();
}
- setState(196);
+ setState(198);
_errHandler->sync(this);
alt = getInterpreter()->adaptivePredict(_input, 3, _ctx);
}
- setState(198);
+ setState(200);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::COMMA) {
- setState(197);
+ setState(199);
match(HogQLParser::COMMA);
}
@@ -1112,6 +1119,10 @@ HogQLParser::WhileStmtContext* HogQLParser::StatementContext::whileStmt() {
return getRuleContext(0);
}
+HogQLParser::ForInStmtContext* HogQLParser::StatementContext::forInStmt() {
+ return getRuleContext(0);
+}
+
HogQLParser::ForStmtContext* HogQLParser::StatementContext::forStmt() {
return getRuleContext(0);
}
@@ -1161,68 +1172,75 @@ HogQLParser::StatementContext* HogQLParser::statement() {
exitRule();
});
try {
- setState(209);
+ setState(212);
_errHandler->sync(this);
switch (getInterpreter()->adaptivePredict(_input, 5, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
- setState(200);
+ setState(202);
returnStmt();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
- setState(201);
+ setState(203);
ifStmt();
break;
}
case 3: {
enterOuterAlt(_localctx, 3);
- setState(202);
+ setState(204);
whileStmt();
break;
}
case 4: {
enterOuterAlt(_localctx, 4);
- setState(203);
- forStmt();
+ setState(205);
+ forInStmt();
break;
}
case 5: {
enterOuterAlt(_localctx, 5);
- setState(204);
- funcStmt();
+ setState(206);
+ forStmt();
break;
}
case 6: {
enterOuterAlt(_localctx, 6);
- setState(205);
- varAssignment();
+ setState(207);
+ funcStmt();
break;
}
case 7: {
enterOuterAlt(_localctx, 7);
- setState(206);
- block();
+ setState(208);
+ varAssignment();
break;
}
case 8: {
enterOuterAlt(_localctx, 8);
- setState(207);
- exprStmt();
+ setState(209);
+ block();
break;
}
case 9: {
enterOuterAlt(_localctx, 9);
- setState(208);
+ setState(210);
+ exprStmt();
+ break;
+ }
+
+ case 10: {
+ enterOuterAlt(_localctx, 10);
+ setState(211);
emptyStmt();
break;
}
@@ -1285,14 +1303,14 @@ HogQLParser::ReturnStmtContext* HogQLParser::returnStmt() {
});
try {
enterOuterAlt(_localctx, 1);
- setState(211);
+ setState(214);
match(HogQLParser::RETURN);
- setState(213);
+ setState(216);
_errHandler->sync(this);
switch (getInterpreter()->adaptivePredict(_input, 6, _ctx)) {
case 1: {
- setState(212);
+ setState(215);
expression();
break;
}
@@ -1300,12 +1318,12 @@ HogQLParser::ReturnStmtContext* HogQLParser::returnStmt() {
default:
break;
}
- setState(216);
+ setState(219);
_errHandler->sync(this);
switch (getInterpreter()->adaptivePredict(_input, 7, _ctx)) {
case 1: {
- setState(215);
+ setState(218);
match(HogQLParser::SEMICOLON);
break;
}
@@ -1384,24 +1402,24 @@ HogQLParser::IfStmtContext* HogQLParser::ifStmt() {
});
try {
enterOuterAlt(_localctx, 1);
- setState(218);
+ setState(221);
match(HogQLParser::IF);
- setState(219);
+ setState(222);
match(HogQLParser::LPAREN);
- setState(220);
+ setState(223);
expression();
- setState(221);
+ setState(224);
match(HogQLParser::RPAREN);
- setState(222);
- statement();
setState(225);
+ statement();
+ setState(228);
_errHandler->sync(this);
switch (getInterpreter()->adaptivePredict(_input, 8, _ctx)) {
case 1: {
- setState(223);
+ setState(226);
match(HogQLParser::ELSE);
- setState(224);
+ setState(227);
statement();
break;
}
@@ -1476,22 +1494,22 @@ HogQLParser::WhileStmtContext* HogQLParser::whileStmt() {
});
try {
enterOuterAlt(_localctx, 1);
- setState(227);
+ setState(230);
match(HogQLParser::WHILE);
- setState(228);
+ setState(231);
match(HogQLParser::LPAREN);
- setState(229);
+ setState(232);
expression();
- setState(230);
+ setState(233);
match(HogQLParser::RPAREN);
- setState(231);
+ setState(234);
statement();
- setState(233);
+ setState(236);
_errHandler->sync(this);
switch (getInterpreter()->adaptivePredict(_input, 9, _ctx)) {
case 1: {
- setState(232);
+ setState(235);
match(HogQLParser::SEMICOLON);
break;
}
@@ -1591,28 +1609,28 @@ HogQLParser::ForStmtContext* HogQLParser::forStmt() {
});
try {
enterOuterAlt(_localctx, 1);
- setState(235);
+ setState(238);
match(HogQLParser::FOR);
- setState(236);
+ setState(239);
match(HogQLParser::LPAREN);
- setState(240);
+ setState(243);
_errHandler->sync(this);
switch (getInterpreter()->adaptivePredict(_input, 10, _ctx)) {
case 1: {
- setState(237);
+ setState(240);
antlrcpp::downCast(_localctx)->initializerVarDeclr = varDecl();
break;
}
case 2: {
- setState(238);
+ setState(241);
antlrcpp::downCast(_localctx)->initializerVarAssignment = varAssignment();
break;
}
case 3: {
- setState(239);
+ setState(242);
antlrcpp::downCast(_localctx)->initializerExpression = expression();
break;
}
@@ -1620,9 +1638,9 @@ HogQLParser::ForStmtContext* HogQLParser::forStmt() {
default:
break;
}
- setState(242);
+ setState(245);
match(HogQLParser::SEMICOLON);
- setState(244);
+ setState(247);
_errHandler->sync(this);
_la = _input->LA(1);
@@ -1630,29 +1648,29 @@ HogQLParser::ForStmtContext* HogQLParser::forStmt() {
((1ULL << _la) & -1125900443713538) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) &&
((1ULL << (_la - 64)) & 8076106347046764543) != 0) || ((((_la - 128) & ~ 0x3fULL) == 0) &&
((1ULL << (_la - 128)) & 1153) != 0)) {
- setState(243);
+ setState(246);
antlrcpp::downCast(_localctx)->condition = expression();
}
- setState(246);
+ setState(249);
match(HogQLParser::SEMICOLON);
- setState(250);
+ setState(253);
_errHandler->sync(this);
switch (getInterpreter()->adaptivePredict(_input, 12, _ctx)) {
case 1: {
- setState(247);
+ setState(250);
antlrcpp::downCast(_localctx)->incrementVarDeclr = varDecl();
break;
}
case 2: {
- setState(248);
+ setState(251);
antlrcpp::downCast(_localctx)->incrementVarAssignment = varAssignment();
break;
}
case 3: {
- setState(249);
+ setState(252);
antlrcpp::downCast(_localctx)->incrementExpression = expression();
break;
}
@@ -1660,16 +1678,143 @@ HogQLParser::ForStmtContext* HogQLParser::forStmt() {
default:
break;
}
- setState(252);
+ setState(255);
match(HogQLParser::RPAREN);
- setState(253);
+ setState(256);
statement();
- setState(255);
+ setState(258);
_errHandler->sync(this);
switch (getInterpreter()->adaptivePredict(_input, 13, _ctx)) {
case 1: {
- setState(254);
+ setState(257);
+ match(HogQLParser::SEMICOLON);
+ break;
+ }
+
+ default:
+ break;
+ }
+
+ }
+ catch (RecognitionException &e) {
+ _errHandler->reportError(this, e);
+ _localctx->exception = std::current_exception();
+ _errHandler->recover(this, _localctx->exception);
+ }
+
+ return _localctx;
+}
+
+//----------------- ForInStmtContext ------------------------------------------------------------------
+
+HogQLParser::ForInStmtContext::ForInStmtContext(ParserRuleContext *parent, size_t invokingState)
+ : ParserRuleContext(parent, invokingState) {
+}
+
+tree::TerminalNode* HogQLParser::ForInStmtContext::FOR() {
+ return getToken(HogQLParser::FOR, 0);
+}
+
+tree::TerminalNode* HogQLParser::ForInStmtContext::LPAREN() {
+ return getToken(HogQLParser::LPAREN, 0);
+}
+
+tree::TerminalNode* HogQLParser::ForInStmtContext::LET() {
+ return getToken(HogQLParser::LET, 0);
+}
+
+std::vector HogQLParser::ForInStmtContext::identifier() {
+ return getRuleContexts();
+}
+
+HogQLParser::IdentifierContext* HogQLParser::ForInStmtContext::identifier(size_t i) {
+ return getRuleContext(i);
+}
+
+tree::TerminalNode* HogQLParser::ForInStmtContext::IN() {
+ return getToken(HogQLParser::IN, 0);
+}
+
+HogQLParser::ExpressionContext* HogQLParser::ForInStmtContext::expression() {
+ return getRuleContext(0);
+}
+
+tree::TerminalNode* HogQLParser::ForInStmtContext::RPAREN() {
+ return getToken(HogQLParser::RPAREN, 0);
+}
+
+HogQLParser::StatementContext* HogQLParser::ForInStmtContext::statement() {
+ return getRuleContext(0);
+}
+
+tree::TerminalNode* HogQLParser::ForInStmtContext::COMMA() {
+ return getToken(HogQLParser::COMMA, 0);
+}
+
+tree::TerminalNode* HogQLParser::ForInStmtContext::SEMICOLON() {
+ return getToken(HogQLParser::SEMICOLON, 0);
+}
+
+
+size_t HogQLParser::ForInStmtContext::getRuleIndex() const {
+ return HogQLParser::RuleForInStmt;
+}
+
+
+std::any HogQLParser::ForInStmtContext::accept(tree::ParseTreeVisitor *visitor) {
+ if (auto parserVisitor = dynamic_cast(visitor))
+ return parserVisitor->visitForInStmt(this);
+ else
+ return visitor->visitChildren(this);
+}
+
+HogQLParser::ForInStmtContext* HogQLParser::forInStmt() {
+ ForInStmtContext *_localctx = _tracker.createInstance(_ctx, getState());
+ enterRule(_localctx, 20, HogQLParser::RuleForInStmt);
+ size_t _la = 0;
+
+#if __cplusplus > 201703L
+ auto onExit = finally([=, this] {
+#else
+ auto onExit = finally([=] {
+#endif
+ exitRule();
+ });
+ try {
+ enterOuterAlt(_localctx, 1);
+ setState(260);
+ match(HogQLParser::FOR);
+ setState(261);
+ match(HogQLParser::LPAREN);
+ setState(262);
+ match(HogQLParser::LET);
+ setState(263);
+ identifier();
+ setState(266);
+ _errHandler->sync(this);
+
+ _la = _input->LA(1);
+ if (_la == HogQLParser::COMMA) {
+ setState(264);
+ match(HogQLParser::COMMA);
+ setState(265);
+ identifier();
+ }
+ setState(268);
+ match(HogQLParser::IN);
+ setState(269);
+ expression();
+ setState(270);
+ match(HogQLParser::RPAREN);
+ setState(271);
+ statement();
+ setState(273);
+ _errHandler->sync(this);
+
+ switch (getInterpreter()->adaptivePredict(_input, 15, _ctx)) {
+ case 1: {
+ setState(272);
match(HogQLParser::SEMICOLON);
break;
}
@@ -1733,7 +1878,7 @@ std::any HogQLParser::FuncStmtContext::accept(tree::ParseTreeVisitor *visitor) {
HogQLParser::FuncStmtContext* HogQLParser::funcStmt() {
FuncStmtContext *_localctx = _tracker.createInstance(_ctx, getState());
- enterRule(_localctx, 20, HogQLParser::RuleFuncStmt);
+ enterRule(_localctx, 22, HogQLParser::RuleFuncStmt);
size_t _la = 0;
#if __cplusplus > 201703L
@@ -1745,25 +1890,25 @@ HogQLParser::FuncStmtContext* HogQLParser::funcStmt() {
});
try {
enterOuterAlt(_localctx, 1);
- setState(257);
+ setState(275);
match(HogQLParser::FN);
- setState(258);
+ setState(276);
identifier();
- setState(259);
+ setState(277);
match(HogQLParser::LPAREN);
- setState(261);
+ setState(279);
_errHandler->sync(this);
_la = _input->LA(1);
if ((((_la & ~ 0x3fULL) == 0) &&
((1ULL << _la) & -181272084561788930) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) &&
((1ULL << (_la - 64)) & 201863462911) != 0)) {
- setState(260);
+ setState(278);
identifierList();
}
- setState(263);
+ setState(281);
match(HogQLParser::RPAREN);
- setState(264);
+ setState(282);
block();
}
@@ -1813,7 +1958,7 @@ std::any HogQLParser::VarAssignmentContext::accept(tree::ParseTreeVisitor *visit
HogQLParser::VarAssignmentContext* HogQLParser::varAssignment() {
VarAssignmentContext *_localctx = _tracker.createInstance(_ctx, getState());
- enterRule(_localctx, 22, HogQLParser::RuleVarAssignment);
+ enterRule(_localctx, 24, HogQLParser::RuleVarAssignment);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
@@ -1824,13 +1969,13 @@ HogQLParser::VarAssignmentContext* HogQLParser::varAssignment() {
});
try {
enterOuterAlt(_localctx, 1);
- setState(266);
+ setState(284);
expression();
- setState(267);
+ setState(285);
match(HogQLParser::COLON);
- setState(268);
+ setState(286);
match(HogQLParser::EQ_SINGLE);
- setState(269);
+ setState(287);
expression();
}
@@ -1872,7 +2017,7 @@ std::any HogQLParser::ExprStmtContext::accept(tree::ParseTreeVisitor *visitor) {
HogQLParser::ExprStmtContext* HogQLParser::exprStmt() {
ExprStmtContext *_localctx = _tracker.createInstance(_ctx, getState());
- enterRule(_localctx, 24, HogQLParser::RuleExprStmt);
+ enterRule(_localctx, 26, HogQLParser::RuleExprStmt);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
@@ -1883,14 +2028,14 @@ HogQLParser::ExprStmtContext* HogQLParser::exprStmt() {
});
try {
enterOuterAlt(_localctx, 1);
- setState(271);
+ setState(289);
expression();
- setState(273);
+ setState(291);
_errHandler->sync(this);
- switch (getInterpreter()->adaptivePredict(_input, 15, _ctx)) {
+ switch (getInterpreter()->adaptivePredict(_input, 17, _ctx)) {
case 1: {
- setState(272);
+ setState(290);
match(HogQLParser::SEMICOLON);
break;
}
@@ -1934,7 +2079,7 @@ std::any HogQLParser::EmptyStmtContext::accept(tree::ParseTreeVisitor *visitor)
HogQLParser::EmptyStmtContext* HogQLParser::emptyStmt() {
EmptyStmtContext *_localctx = _tracker.createInstance(_ctx, getState());
- enterRule(_localctx, 26, HogQLParser::RuleEmptyStmt);
+ enterRule(_localctx, 28, HogQLParser::RuleEmptyStmt);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
@@ -1945,7 +2090,7 @@ HogQLParser::EmptyStmtContext* HogQLParser::emptyStmt() {
});
try {
enterOuterAlt(_localctx, 1);
- setState(275);
+ setState(293);
match(HogQLParser::SEMICOLON);
}
@@ -1995,7 +2140,7 @@ std::any HogQLParser::BlockContext::accept(tree::ParseTreeVisitor *visitor) {
HogQLParser::BlockContext* HogQLParser::block() {
BlockContext *_localctx = _tracker.createInstance(_ctx, getState());
- enterRule(_localctx, 28, HogQLParser::RuleBlock);
+ enterRule(_localctx, 30, HogQLParser::RuleBlock);
size_t _la = 0;
#if __cplusplus > 201703L
@@ -2007,22 +2152,22 @@ HogQLParser::BlockContext* HogQLParser::block() {
});
try {
enterOuterAlt(_localctx, 1);
- setState(277);
+ setState(295);
match(HogQLParser::LBRACE);
- setState(281);
+ setState(299);
_errHandler->sync(this);
_la = _input->LA(1);
while ((((_la & ~ 0x3fULL) == 0) &&
((1ULL << _la) & -2) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) &&
((1ULL << (_la - 64)) & 8076106351341731839) != 0) || ((((_la - 128) & ~ 0x3fULL) == 0) &&
((1ULL << (_la - 128)) & 263297) != 0)) {
- setState(278);
+ setState(296);
declaration();
- setState(283);
+ setState(301);
_errHandler->sync(this);
_la = _input->LA(1);
}
- setState(284);
+ setState(302);
match(HogQLParser::RBRACE);
}
@@ -2068,7 +2213,7 @@ std::any HogQLParser::KvPairContext::accept(tree::ParseTreeVisitor *visitor) {
HogQLParser::KvPairContext* HogQLParser::kvPair() {
KvPairContext *_localctx = _tracker.createInstance(_ctx, getState());
- enterRule(_localctx, 30, HogQLParser::RuleKvPair);
+ enterRule(_localctx, 32, HogQLParser::RuleKvPair);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
@@ -2079,11 +2224,11 @@ HogQLParser::KvPairContext* HogQLParser::kvPair() {
});
try {
enterOuterAlt(_localctx, 1);
- setState(286);
+ setState(304);
expression();
- setState(287);
+ setState(305);
match(HogQLParser::COLON);
- setState(288);
+ setState(306);
expression();
}
@@ -2133,7 +2278,7 @@ std::any HogQLParser::KvPairListContext::accept(tree::ParseTreeVisitor *visitor)
HogQLParser::KvPairListContext* HogQLParser::kvPairList() {
KvPairListContext *_localctx = _tracker.createInstance(_ctx, getState());
- enterRule(_localctx, 32, HogQLParser::RuleKvPairList);
+ enterRule(_localctx, 34, HogQLParser::RuleKvPairList);
size_t _la = 0;
#if __cplusplus > 201703L
@@ -2146,28 +2291,28 @@ HogQLParser::KvPairListContext* HogQLParser::kvPairList() {
try {
size_t alt;
enterOuterAlt(_localctx, 1);
- setState(290);
+ setState(308);
kvPair();
- setState(295);
+ setState(313);
_errHandler->sync(this);
- alt = getInterpreter()->adaptivePredict(_input, 17, _ctx);
+ alt = getInterpreter()->adaptivePredict(_input, 19, _ctx);
while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) {
if (alt == 1) {
- setState(291);
+ setState(309);
match(HogQLParser::COMMA);
- setState(292);
+ setState(310);
kvPair();
}
- setState(297);
+ setState(315);
_errHandler->sync(this);
- alt = getInterpreter()->adaptivePredict(_input, 17, _ctx);
+ alt = getInterpreter()->adaptivePredict(_input, 19, _ctx);
}
- setState(299);
+ setState(317);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::COMMA) {
- setState(298);
+ setState(316);
match(HogQLParser::COMMA);
}
@@ -2218,7 +2363,7 @@ std::any HogQLParser::SelectContext::accept(tree::ParseTreeVisitor *visitor) {
HogQLParser::SelectContext* HogQLParser::select() {
SelectContext *_localctx = _tracker.createInstance(_ctx, getState());
- enterRule(_localctx, 34, HogQLParser::RuleSelect);
+ enterRule(_localctx, 36, HogQLParser::RuleSelect);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
@@ -2229,23 +2374,23 @@ HogQLParser::SelectContext* HogQLParser::select() {
});
try {
enterOuterAlt(_localctx, 1);
- setState(304);
+ setState(322);
_errHandler->sync(this);
- switch (getInterpreter()->adaptivePredict(_input, 19, _ctx)) {
+ switch (getInterpreter()->adaptivePredict(_input, 21, _ctx)) {
case 1: {
- setState(301);
+ setState(319);
selectUnionStmt();
break;
}
case 2: {
- setState(302);
+ setState(320);
selectStmt();
break;
}
case 3: {
- setState(303);
+ setState(321);
hogqlxTagElement();
break;
}
@@ -2253,7 +2398,7 @@ HogQLParser::SelectContext* HogQLParser::select() {
default:
break;
}
- setState(306);
+ setState(324);
match(HogQLParser::EOF);
}
@@ -2311,7 +2456,7 @@ std::any HogQLParser::SelectUnionStmtContext::accept(tree::ParseTreeVisitor *vis
HogQLParser::SelectUnionStmtContext* HogQLParser::selectUnionStmt() {
SelectUnionStmtContext *_localctx = _tracker.createInstance(_ctx, getState());
- enterRule(_localctx, 36, HogQLParser::RuleSelectUnionStmt);
+ enterRule(_localctx, 38, HogQLParser::RuleSelectUnionStmt);
size_t _la = 0;
#if __cplusplus > 201703L
@@ -2323,19 +2468,19 @@ HogQLParser::SelectUnionStmtContext* HogQLParser::selectUnionStmt() {
});
try {
enterOuterAlt(_localctx, 1);
- setState(308);
+ setState(326);
selectStmtWithParens();
- setState(314);
+ setState(332);
_errHandler->sync(this);
_la = _input->LA(1);
while (_la == HogQLParser::UNION) {
- setState(309);
+ setState(327);
match(HogQLParser::UNION);
- setState(310);
+ setState(328);
match(HogQLParser::ALL);
- setState(311);
+ setState(329);
selectStmtWithParens();
- setState(316);
+ setState(334);
_errHandler->sync(this);
_la = _input->LA(1);
}
@@ -2391,7 +2536,7 @@ std::any HogQLParser::SelectStmtWithParensContext::accept(tree::ParseTreeVisitor
HogQLParser::SelectStmtWithParensContext* HogQLParser::selectStmtWithParens() {
SelectStmtWithParensContext *_localctx = _tracker.createInstance(_ctx, getState());
- enterRule(_localctx, 38, HogQLParser::RuleSelectStmtWithParens);
+ enterRule(_localctx, 40, HogQLParser::RuleSelectStmtWithParens);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
@@ -2401,31 +2546,31 @@ HogQLParser::SelectStmtWithParensContext* HogQLParser::selectStmtWithParens() {
exitRule();
});
try {
- setState(323);
+ setState(341);
_errHandler->sync(this);
switch (_input->LA(1)) {
case HogQLParser::SELECT:
case HogQLParser::WITH: {
enterOuterAlt(_localctx, 1);
- setState(317);
+ setState(335);
selectStmt();
break;
}
case HogQLParser::LPAREN: {
enterOuterAlt(_localctx, 2);
- setState(318);
+ setState(336);
match(HogQLParser::LPAREN);
- setState(319);
+ setState(337);
selectUnionStmt();
- setState(320);
+ setState(338);
match(HogQLParser::RPAREN);
break;
}
case HogQLParser::LBRACE: {
enterOuterAlt(_localctx, 3);
- setState(322);
+ setState(340);
placeholder();
break;
}
@@ -2549,7 +2694,7 @@ std::any HogQLParser::SelectStmtContext::accept(tree::ParseTreeVisitor *visitor)
HogQLParser::SelectStmtContext* HogQLParser::selectStmt() {
SelectStmtContext *_localctx = _tracker.createInstance(_ctx, getState());
- enterRule(_localctx, 40, HogQLParser::RuleSelectStmt);
+ enterRule(_localctx, 42, HogQLParser::RuleSelectStmt);
size_t _la = 0;
#if __cplusplus > 201703L
@@ -2561,22 +2706,22 @@ HogQLParser::SelectStmtContext* HogQLParser::selectStmt() {
});
try {
enterOuterAlt(_localctx, 1);
- setState(326);
+ setState(344);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::WITH) {
- setState(325);
+ setState(343);
antlrcpp::downCast(_localctx)->with = withClause();
}
- setState(328);
+ setState(346);
match(HogQLParser::SELECT);
- setState(330);
+ setState(348);
_errHandler->sync(this);
- switch (getInterpreter()->adaptivePredict(_input, 23, _ctx)) {
+ switch (getInterpreter()->adaptivePredict(_input, 25, _ctx)) {
case 1: {
- setState(329);
+ setState(347);
match(HogQLParser::DISTINCT);
break;
}
@@ -2584,12 +2729,12 @@ HogQLParser::SelectStmtContext* HogQLParser::selectStmt() {
default:
break;
}
- setState(333);
+ setState(351);
_errHandler->sync(this);
- switch (getInterpreter()->adaptivePredict(_input, 24, _ctx)) {
+ switch (getInterpreter()->adaptivePredict(_input, 26, _ctx)) {
case 1: {
- setState(332);
+ setState(350);
topClause();
break;
}
@@ -2597,57 +2742,57 @@ HogQLParser::SelectStmtContext* HogQLParser::selectStmt() {
default:
break;
}
- setState(335);
+ setState(353);
antlrcpp::downCast(_localctx)->columns = columnExprList();
- setState(337);
+ setState(355);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::FROM) {
- setState(336);
+ setState(354);
antlrcpp::downCast(_localctx)->from = fromClause();
}
- setState(340);
+ setState(358);
_errHandler->sync(this);
_la = _input->LA(1);
if ((((_la & ~ 0x3fULL) == 0) &&
((1ULL << _la) & 567347999932448) != 0)) {
- setState(339);
+ setState(357);
arrayJoinClause();
}
- setState(343);
+ setState(361);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::PREWHERE) {
- setState(342);
+ setState(360);
prewhereClause();
}
- setState(346);
+ setState(364);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::WHERE) {
- setState(345);
+ setState(363);
antlrcpp::downCast(_localctx)->where = whereClause();
}
- setState(349);
+ setState(367);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::GROUP) {
- setState(348);
+ setState(366);
groupByClause();
}
- setState(353);
+ setState(371);
_errHandler->sync(this);
- switch (getInterpreter()->adaptivePredict(_input, 30, _ctx)) {
+ switch (getInterpreter()->adaptivePredict(_input, 32, _ctx)) {
case 1: {
- setState(351);
+ setState(369);
match(HogQLParser::WITH);
- setState(352);
+ setState(370);
_la = _input->LA(1);
if (!(_la == HogQLParser::CUBE
@@ -2664,51 +2809,51 @@ HogQLParser::SelectStmtContext* HogQLParser::selectStmt() {
default:
break;
}
- setState(357);
+ setState(375);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::WITH) {
- setState(355);
+ setState(373);
match(HogQLParser::WITH);
- setState(356);
+ setState(374);
match(HogQLParser::TOTALS);
}
- setState(360);
+ setState(378);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::HAVING) {
- setState(359);
+ setState(377);
havingClause();
}
- setState(363);
+ setState(381);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::WINDOW) {
- setState(362);
+ setState(380);
windowClause();
}
- setState(366);
+ setState(384);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::ORDER) {
- setState(365);
+ setState(383);
orderByClause();
}
- setState(370);
+ setState(388);
_errHandler->sync(this);
switch (_input->LA(1)) {
case HogQLParser::LIMIT: {
- setState(368);
+ setState(386);
limitAndOffsetClause();
break;
}
case HogQLParser::OFFSET: {
- setState(369);
+ setState(387);
offsetOnlyClause();
break;
}
@@ -2723,12 +2868,12 @@ HogQLParser::SelectStmtContext* HogQLParser::selectStmt() {
default:
break;
}
- setState(373);
+ setState(391);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::SETTINGS) {
- setState(372);
+ setState(390);
settingsClause();
}
@@ -2771,7 +2916,7 @@ std::any HogQLParser::WithClauseContext::accept(tree::ParseTreeVisitor *visitor)
HogQLParser::WithClauseContext* HogQLParser::withClause() {
WithClauseContext *_localctx = _tracker.createInstance(_ctx, getState());
- enterRule(_localctx, 42, HogQLParser::RuleWithClause);
+ enterRule(_localctx, 44, HogQLParser::RuleWithClause);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
@@ -2782,9 +2927,9 @@ HogQLParser::WithClauseContext* HogQLParser::withClause() {
});
try {
enterOuterAlt(_localctx, 1);
- setState(375);
+ setState(393);
match(HogQLParser::WITH);
- setState(376);
+ setState(394);
withExprList();
}
@@ -2834,7 +2979,7 @@ std::any HogQLParser::TopClauseContext::accept(tree::ParseTreeVisitor *visitor)
HogQLParser::TopClauseContext* HogQLParser::topClause() {
TopClauseContext *_localctx = _tracker.createInstance(_ctx, getState());
- enterRule(_localctx, 44, HogQLParser::RuleTopClause);
+ enterRule(_localctx, 46, HogQLParser::RuleTopClause);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
@@ -2845,18 +2990,18 @@ HogQLParser::TopClauseContext* HogQLParser::topClause() {
});
try {
enterOuterAlt(_localctx, 1);
- setState(378);
+ setState(396);
match(HogQLParser::TOP);
- setState(379);
+ setState(397);
match(HogQLParser::DECIMAL_LITERAL);
- setState(382);
+ setState(400);
_errHandler->sync(this);
- switch (getInterpreter()->adaptivePredict(_input, 37, _ctx)) {
+ switch (getInterpreter()->adaptivePredict(_input, 39, _ctx)) {
case 1: {
- setState(380);
+ setState(398);
match(HogQLParser::WITH);
- setState(381);
+ setState(399);
match(HogQLParser::TIES);
break;
}
@@ -2904,7 +3049,7 @@ std::any HogQLParser::FromClauseContext::accept(tree::ParseTreeVisitor *visitor)
HogQLParser::FromClauseContext* HogQLParser::fromClause() {
FromClauseContext *_localctx = _tracker.createInstance(_ctx, getState());
- enterRule(_localctx, 46, HogQLParser::RuleFromClause);
+ enterRule(_localctx, 48, HogQLParser::RuleFromClause);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
@@ -2915,9 +3060,9 @@ HogQLParser::FromClauseContext* HogQLParser::fromClause() {
});
try {
enterOuterAlt(_localctx, 1);
- setState(384);
+ setState(402);
match(HogQLParser::FROM);
- setState(385);
+ setState(403);
joinExpr(0);
}
@@ -2971,7 +3116,7 @@ std::any HogQLParser::ArrayJoinClauseContext::accept(tree::ParseTreeVisitor *vis
HogQLParser::ArrayJoinClauseContext* HogQLParser::arrayJoinClause() {
ArrayJoinClauseContext *_localctx = _tracker.createInstance(_ctx, getState());
- enterRule(_localctx, 48, HogQLParser::RuleArrayJoinClause);
+ enterRule(_localctx, 50, HogQLParser::RuleArrayJoinClause);
size_t _la = 0;
#if __cplusplus > 201703L
@@ -2983,14 +3128,14 @@ HogQLParser::ArrayJoinClauseContext* HogQLParser::arrayJoinClause() {
});
try {
enterOuterAlt(_localctx, 1);
- setState(388);
+ setState(406);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::INNER
|| _la == HogQLParser::LEFT) {
- setState(387);
+ setState(405);
_la = _input->LA(1);
if (!(_la == HogQLParser::INNER
@@ -3002,11 +3147,11 @@ HogQLParser::ArrayJoinClauseContext* HogQLParser::arrayJoinClause() {
consume();
}
}
- setState(390);
+ setState(408);
match(HogQLParser::ARRAY);
- setState(391);
+ setState(409);
match(HogQLParser::JOIN);
- setState(392);
+ setState(410);
columnExprList();
}
@@ -3092,7 +3237,7 @@ std::any HogQLParser::WindowClauseContext::accept(tree::ParseTreeVisitor *visito
HogQLParser::WindowClauseContext* HogQLParser::windowClause() {
WindowClauseContext *_localctx = _tracker.createInstance(_ctx, getState());
- enterRule(_localctx, 50, HogQLParser::RuleWindowClause);
+ enterRule(_localctx, 52, HogQLParser::RuleWindowClause);
size_t _la = 0;
#if __cplusplus > 201703L
@@ -3104,35 +3249,35 @@ HogQLParser::WindowClauseContext* HogQLParser::windowClause() {
});
try {
enterOuterAlt(_localctx, 1);
- setState(394);
+ setState(412);
match(HogQLParser::WINDOW);
- setState(395);
+ setState(413);
identifier();
- setState(396);
+ setState(414);
match(HogQLParser::AS);
- setState(397);
+ setState(415);
match(HogQLParser::LPAREN);
- setState(398);
+ setState(416);
windowExpr();
- setState(399);
+ setState(417);
match(HogQLParser::RPAREN);
- setState(409);
+ setState(427);
_errHandler->sync(this);
_la = _input->LA(1);
while (_la == HogQLParser::COMMA) {
- setState(400);
+ setState(418);
match(HogQLParser::COMMA);
- setState(401);
+ setState(419);
identifier();
- setState(402);
+ setState(420);
match(HogQLParser::AS);
- setState(403);
+ setState(421);
match(HogQLParser::LPAREN);
- setState(404);
+ setState(422);
windowExpr();
- setState(405);
+ setState(423);
match(HogQLParser::RPAREN);
- setState(411);
+ setState(429);
_errHandler->sync(this);
_la = _input->LA(1);
}
@@ -3176,7 +3321,7 @@ std::any HogQLParser::PrewhereClauseContext::accept(tree::ParseTreeVisitor *visi
HogQLParser::PrewhereClauseContext* HogQLParser::prewhereClause() {
PrewhereClauseContext *_localctx = _tracker.createInstance(_ctx, getState());
- enterRule(_localctx, 52, HogQLParser::RulePrewhereClause);
+ enterRule(_localctx, 54, HogQLParser::RulePrewhereClause);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
@@ -3187,9 +3332,9 @@ HogQLParser::PrewhereClauseContext* HogQLParser::prewhereClause() {
});
try {
enterOuterAlt(_localctx, 1);
- setState(412);
+ setState(430);
match(HogQLParser::PREWHERE);
- setState(413);
+ setState(431);
columnExpr(0);
}
@@ -3231,7 +3376,7 @@ std::any HogQLParser::WhereClauseContext::accept(tree::ParseTreeVisitor *visitor
HogQLParser::WhereClauseContext* HogQLParser::whereClause() {
WhereClauseContext *_localctx = _tracker.createInstance(_ctx, getState());
- enterRule(_localctx, 54, HogQLParser::RuleWhereClause);
+ enterRule(_localctx, 56, HogQLParser::RuleWhereClause);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
@@ -3242,9 +3387,9 @@ HogQLParser::WhereClauseContext* HogQLParser::whereClause() {
});
try {
enterOuterAlt(_localctx, 1);
- setState(415);
+ setState(433);
match(HogQLParser::WHERE);
- setState(416);
+ setState(434);
columnExpr(0);
}
@@ -3306,7 +3451,7 @@ std::any HogQLParser::GroupByClauseContext::accept(tree::ParseTreeVisitor *visit
HogQLParser::GroupByClauseContext* HogQLParser::groupByClause() {
GroupByClauseContext *_localctx = _tracker.createInstance(_ctx, getState());
- enterRule(_localctx, 56, HogQLParser::RuleGroupByClause);
+ enterRule(_localctx, 58, HogQLParser::RuleGroupByClause);
size_t _la = 0;
#if __cplusplus > 201703L
@@ -3318,15 +3463,15 @@ HogQLParser::GroupByClauseContext* HogQLParser::groupByClause() {
});
try {
enterOuterAlt(_localctx, 1);
- setState(418);
+ setState(436);
match(HogQLParser::GROUP);
- setState(419);
+ setState(437);
match(HogQLParser::BY);
- setState(426);
+ setState(444);
_errHandler->sync(this);
- switch (getInterpreter()->adaptivePredict(_input, 40, _ctx)) {
+ switch (getInterpreter()->adaptivePredict(_input, 42, _ctx)) {
case 1: {
- setState(420);
+ setState(438);
_la = _input->LA(1);
if (!(_la == HogQLParser::CUBE
@@ -3337,17 +3482,17 @@ HogQLParser::GroupByClauseContext* HogQLParser::groupByClause() {
_errHandler->reportMatch(this);
consume();
}
- setState(421);
+ setState(439);
match(HogQLParser::LPAREN);
- setState(422);
+ setState(440);
columnExprList();
- setState(423);
+ setState(441);
match(HogQLParser::RPAREN);
break;
}
case 2: {
- setState(425);
+ setState(443);
columnExprList();
break;
}
@@ -3395,7 +3540,7 @@ std::any HogQLParser::HavingClauseContext::accept(tree::ParseTreeVisitor *visito
HogQLParser::HavingClauseContext* HogQLParser::havingClause() {
HavingClauseContext *_localctx = _tracker.createInstance(_ctx, getState());
- enterRule(_localctx, 58, HogQLParser::RuleHavingClause);
+ enterRule(_localctx, 60, HogQLParser::RuleHavingClause);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
@@ -3406,9 +3551,9 @@ HogQLParser::HavingClauseContext* HogQLParser::havingClause() {
});
try {
enterOuterAlt(_localctx, 1);
- setState(428);
+ setState(446);
match(HogQLParser::HAVING);
- setState(429);
+ setState(447);
columnExpr(0);
}
@@ -3454,7 +3599,7 @@ std::any HogQLParser::OrderByClauseContext::accept(tree::ParseTreeVisitor *visit
HogQLParser::OrderByClauseContext* HogQLParser::orderByClause() {
OrderByClauseContext *_localctx = _tracker.createInstance(_ctx, getState());
- enterRule(_localctx, 60, HogQLParser::RuleOrderByClause);
+ enterRule(_localctx, 62, HogQLParser::RuleOrderByClause);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
@@ -3465,11 +3610,11 @@ HogQLParser::OrderByClauseContext* HogQLParser::orderByClause() {
});
try {
enterOuterAlt(_localctx, 1);
- setState(431);
+ setState(449);
match(HogQLParser::ORDER);
- setState(432);
+ setState(450);
match(HogQLParser::BY);
- setState(433);
+ setState(451);
orderExprList();
}
@@ -3515,7 +3660,7 @@ std::any HogQLParser::ProjectionOrderByClauseContext::accept(tree::ParseTreeVisi
HogQLParser::ProjectionOrderByClauseContext* HogQLParser::projectionOrderByClause() {
ProjectionOrderByClauseContext *_localctx = _tracker.createInstance(_ctx, getState());
- enterRule(_localctx, 62, HogQLParser::RuleProjectionOrderByClause);
+ enterRule(_localctx, 64, HogQLParser::RuleProjectionOrderByClause);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
@@ -3526,11 +3671,11 @@ HogQLParser::ProjectionOrderByClauseContext* HogQLParser::projectionOrderByClaus
});
try {
enterOuterAlt(_localctx, 1);
- setState(435);
+ setState(453);
match(HogQLParser::ORDER);
- setState(436);
+ setState(454);
match(HogQLParser::BY);
- setState(437);
+ setState(455);
columnExprList();
}
@@ -3600,7 +3745,7 @@ std::any HogQLParser::LimitAndOffsetClauseContext::accept(tree::ParseTreeVisitor
HogQLParser::LimitAndOffsetClauseContext* HogQLParser::limitAndOffsetClause() {
LimitAndOffsetClauseContext *_localctx = _tracker.createInstance(_ctx, getState());
- enterRule(_localctx, 64, HogQLParser::RuleLimitAndOffsetClause);
+ enterRule(_localctx, 66, HogQLParser::RuleLimitAndOffsetClause);
size_t _la = 0;
#if __cplusplus > 201703L
@@ -3611,40 +3756,40 @@ HogQLParser::LimitAndOffsetClauseContext* HogQLParser::limitAndOffsetClause() {
exitRule();
});
try {
- setState(468);
+ setState(486);
_errHandler->sync(this);
- switch (getInterpreter()->adaptivePredict(_input, 45, _ctx)) {
+ switch (getInterpreter()->adaptivePredict(_input, 47, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
- setState(439);
+ setState(457);
match(HogQLParser::LIMIT);
- setState(440);
+ setState(458);
columnExpr(0);
- setState(443);
+ setState(461);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::COMMA) {
- setState(441);
+ setState(459);
match(HogQLParser::COMMA);
- setState(442);
+ setState(460);
columnExpr(0);
}
- setState(449);
+ setState(467);
_errHandler->sync(this);
switch (_input->LA(1)) {
case HogQLParser::WITH: {
- setState(445);
+ setState(463);
match(HogQLParser::WITH);
- setState(446);
+ setState(464);
match(HogQLParser::TIES);
break;
}
case HogQLParser::BY: {
- setState(447);
+ setState(465);
match(HogQLParser::BY);
- setState(448);
+ setState(466);
columnExprList();
break;
}
@@ -3664,45 +3809,45 @@ HogQLParser::LimitAndOffsetClauseContext* HogQLParser::limitAndOffsetClause() {
case 2: {
enterOuterAlt(_localctx, 2);
- setState(451);
+ setState(469);
match(HogQLParser::LIMIT);
- setState(452);
+ setState(470);
columnExpr(0);
- setState(455);
+ setState(473);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::WITH) {
- setState(453);
+ setState(471);
match(HogQLParser::WITH);
- setState(454);
+ setState(472);
match(HogQLParser::TIES);
}
- setState(457);
+ setState(475);
match(HogQLParser::OFFSET);
- setState(458);
+ setState(476);
columnExpr(0);
break;
}
case 3: {
enterOuterAlt(_localctx, 3);
- setState(460);
+ setState(478);
match(HogQLParser::LIMIT);
- setState(461);
+ setState(479);
columnExpr(0);
- setState(462);
+ setState(480);
match(HogQLParser::OFFSET);
- setState(463);
+ setState(481);
columnExpr(0);
- setState(466);
+ setState(484);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::BY) {
- setState(464);
+ setState(482);
match(HogQLParser::BY);
- setState(465);
+ setState(483);
columnExprList();
}
break;
@@ -3751,7 +3896,7 @@ std::any HogQLParser::OffsetOnlyClauseContext::accept(tree::ParseTreeVisitor *vi
HogQLParser::OffsetOnlyClauseContext* HogQLParser::offsetOnlyClause() {
OffsetOnlyClauseContext *_localctx = _tracker.createInstance(_ctx, getState());
- enterRule(_localctx, 66, HogQLParser::RuleOffsetOnlyClause);
+ enterRule(_localctx, 68, HogQLParser::RuleOffsetOnlyClause);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
@@ -3762,9 +3907,9 @@ HogQLParser::OffsetOnlyClauseContext* HogQLParser::offsetOnlyClause() {
});
try {
enterOuterAlt(_localctx, 1);
- setState(470);
+ setState(488);
match(HogQLParser::OFFSET);
- setState(471);
+ setState(489);
columnExpr(0);
}
@@ -3806,7 +3951,7 @@ std::any HogQLParser::SettingsClauseContext::accept(tree::ParseTreeVisitor *visi
HogQLParser::SettingsClauseContext* HogQLParser::settingsClause() {
SettingsClauseContext *_localctx = _tracker.createInstance(_ctx, getState());
- enterRule(_localctx, 68, HogQLParser::RuleSettingsClause);
+ enterRule(_localctx, 70, HogQLParser::RuleSettingsClause);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
@@ -3817,9 +3962,9 @@ HogQLParser::SettingsClauseContext* HogQLParser::settingsClause() {
});
try {
enterOuterAlt(_localctx, 1);
- setState(473);
+ setState(491);
match(HogQLParser::SETTINGS);
- setState(474);
+ setState(492);
settingExprList();
}
@@ -3958,8 +4103,8 @@ HogQLParser::JoinExprContext* HogQLParser::joinExpr(int precedence) {
HogQLParser::JoinExprContext *_localctx = _tracker.createInstance(_ctx, parentState);
HogQLParser::JoinExprContext *previousContext = _localctx;
(void)previousContext; // Silence compiler, in case the context is not used by generated code.
- size_t startState = 70;
- enterRecursionRule(_localctx, 70, HogQLParser::RuleJoinExpr, precedence);
+ size_t startState = 72;
+ enterRecursionRule(_localctx, 72, HogQLParser::RuleJoinExpr, precedence);
size_t _la = 0;
@@ -3973,22 +4118,22 @@ HogQLParser::JoinExprContext* HogQLParser::joinExpr(int precedence) {
try {
size_t alt;
enterOuterAlt(_localctx, 1);
- setState(488);
+ setState(506);
_errHandler->sync(this);
- switch (getInterpreter()->adaptivePredict(_input, 48, _ctx)) {
+ switch (getInterpreter()->adaptivePredict(_input, 50, _ctx)) {
case 1: {
_localctx = _tracker.createInstance(_localctx);
_ctx = _localctx;
previousContext = _localctx;
- setState(477);
+ setState(495);
tableExpr(0);
- setState(479);
+ setState(497);
_errHandler->sync(this);
- switch (getInterpreter()->adaptivePredict(_input, 46, _ctx)) {
+ switch (getInterpreter()->adaptivePredict(_input, 48, _ctx)) {
case 1: {
- setState(478);
+ setState(496);
match(HogQLParser::FINAL);
break;
}
@@ -3996,12 +4141,12 @@ HogQLParser::JoinExprContext* HogQLParser::joinExpr(int precedence) {
default:
break;
}
- setState(482);
+ setState(500);
_errHandler->sync(this);
- switch (getInterpreter()->adaptivePredict(_input, 47, _ctx)) {
+ switch (getInterpreter()->adaptivePredict(_input, 49, _ctx)) {
case 1: {
- setState(481);
+ setState(499);
sampleClause();
break;
}
@@ -4016,11 +4161,11 @@ HogQLParser::JoinExprContext* HogQLParser::joinExpr(int precedence) {
_localctx = _tracker.createInstance(_localctx);
_ctx = _localctx;
previousContext = _localctx;
- setState(484);
+ setState(502);
match(HogQLParser::LPAREN);
- setState(485);
+ setState(503);
joinExpr(0);
- setState(486);
+ setState(504);
match(HogQLParser::RPAREN);
break;
}
@@ -4029,27 +4174,27 @@ HogQLParser::JoinExprContext* HogQLParser::joinExpr(int precedence) {
break;
}
_ctx->stop = _input->LT(-1);
- setState(504);
+ setState(522);
_errHandler->sync(this);
- alt = getInterpreter()->adaptivePredict(_input, 51, _ctx);
+ alt = getInterpreter()->adaptivePredict(_input, 53, _ctx);
while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) {
if (alt == 1) {
if (!_parseListeners.empty())
triggerExitRuleEvent();
previousContext = _localctx;
- setState(502);
+ setState(520);
_errHandler->sync(this);
- switch (getInterpreter()->adaptivePredict(_input, 50, _ctx)) {
+ switch (getInterpreter()->adaptivePredict(_input, 52, _ctx)) {
case 1: {
auto newContext = _tracker.createInstance(_tracker.createInstance(parentContext, parentState));
_localctx = newContext;
pushNewRecursionContext(newContext, startState, RuleJoinExpr);
- setState(490);
+ setState(508);
if (!(precpred(_ctx, 3))) throw FailedPredicateException(this, "precpred(_ctx, 3)");
- setState(491);
+ setState(509);
joinOpCross();
- setState(492);
+ setState(510);
joinExpr(4);
break;
}
@@ -4058,10 +4203,10 @@ HogQLParser::JoinExprContext* HogQLParser::joinExpr(int precedence) {
auto newContext = _tracker.createInstance(_tracker.createInstance(parentContext, parentState));
_localctx = newContext;
pushNewRecursionContext(newContext, startState, RuleJoinExpr);
- setState(494);
+ setState(512);
if (!(precpred(_ctx, 4))) throw FailedPredicateException(this, "precpred(_ctx, 4)");
- setState(496);
+ setState(514);
_errHandler->sync(this);
_la = _input->LA(1);
@@ -4069,14 +4214,14 @@ HogQLParser::JoinExprContext* HogQLParser::joinExpr(int precedence) {
((1ULL << _la) & 567356589867290) != 0) || _la == HogQLParser::RIGHT
|| _la == HogQLParser::SEMI) {
- setState(495);
+ setState(513);
joinOp();
}
- setState(498);
+ setState(516);
match(HogQLParser::JOIN);
- setState(499);
+ setState(517);
joinExpr(0);
- setState(500);
+ setState(518);
joinConstraintClause();
break;
}
@@ -4085,9 +4230,9 @@ HogQLParser::JoinExprContext* HogQLParser::joinExpr(int precedence) {
break;
}
}
- setState(506);
+ setState(524);
_errHandler->sync(this);
- alt = getInterpreter()->adaptivePredict(_input, 51, _ctx);
+ alt = getInterpreter()->adaptivePredict(_input, 53, _ctx);
}
}
catch (RecognitionException &e) {
@@ -4212,7 +4357,7 @@ std::any HogQLParser::JoinOpLeftRightContext::accept(tree::ParseTreeVisitor *vis
}
HogQLParser::JoinOpContext* HogQLParser::joinOp() {
JoinOpContext *_localctx = _tracker.createInstance(_ctx, getState());
- enterRule(_localctx, 72, HogQLParser::RuleJoinOp);
+ enterRule(_localctx, 74, HogQLParser::RuleJoinOp);
size_t _la = 0;
#if __cplusplus > 201703L
@@ -4223,23 +4368,23 @@ HogQLParser::JoinOpContext* HogQLParser::joinOp() {
exitRule();
});
try {
- setState(550);
+ setState(568);
_errHandler->sync(this);
- switch (getInterpreter()->adaptivePredict(_input, 65, _ctx)) {
+ switch (getInterpreter()->adaptivePredict(_input, 67, _ctx)) {
case 1: {
_localctx = _tracker.createInstance(_localctx);
enterOuterAlt(_localctx, 1);
- setState(516);
+ setState(534);
_errHandler->sync(this);
- switch (getInterpreter()->adaptivePredict(_input, 54, _ctx)) {
+ switch (getInterpreter()->adaptivePredict(_input, 56, _ctx)) {
case 1: {
- setState(508);
+ setState(526);
_errHandler->sync(this);
_la = _input->LA(1);
if ((((_la & ~ 0x3fULL) == 0) &&
((1ULL << _la) & 274) != 0)) {
- setState(507);
+ setState(525);
_la = _input->LA(1);
if (!((((_la & ~ 0x3fULL) == 0) &&
((1ULL << _la) & 274) != 0))) {
@@ -4250,21 +4395,21 @@ HogQLParser::JoinOpContext* HogQLParser::joinOp() {
consume();
}
}
- setState(510);
+ setState(528);
match(HogQLParser::INNER);
break;
}
case 2: {
- setState(511);
+ setState(529);
match(HogQLParser::INNER);
- setState(513);
+ setState(531);
_errHandler->sync(this);
_la = _input->LA(1);
if ((((_la & ~ 0x3fULL) == 0) &&
((1ULL << _la) & 274) != 0)) {
- setState(512);
+ setState(530);
_la = _input->LA(1);
if (!((((_la & ~ 0x3fULL) == 0) &&
((1ULL << _la) & 274) != 0))) {
@@ -4279,7 +4424,7 @@ HogQLParser::JoinOpContext* HogQLParser::joinOp() {
}
case 3: {
- setState(515);
+ setState(533);
_la = _input->LA(1);
if (!((((_la & ~ 0x3fULL) == 0) &&
((1ULL << _la) & 274) != 0))) {
@@ -4301,17 +4446,17 @@ HogQLParser::JoinOpContext* HogQLParser::joinOp() {
case 2: {
_localctx = _tracker.createInstance(_localctx);
enterOuterAlt(_localctx, 2);
- setState(532);
+ setState(550);
_errHandler->sync(this);
- switch (getInterpreter()->adaptivePredict(_input, 59, _ctx)) {
+ switch (getInterpreter()->adaptivePredict(_input, 61, _ctx)) {
case 1: {
- setState(519);
+ setState(537);
_errHandler->sync(this);
_la = _input->LA(1);
if ((((_la & ~ 0x3fULL) == 0) &&
((1ULL << _la) & 282) != 0) || _la == HogQLParser::SEMI) {
- setState(518);
+ setState(536);
_la = _input->LA(1);
if (!((((_la & ~ 0x3fULL) == 0) &&
((1ULL << _la) & 282) != 0) || _la == HogQLParser::SEMI)) {
@@ -4322,7 +4467,7 @@ HogQLParser::JoinOpContext* HogQLParser::joinOp() {
consume();
}
}
- setState(521);
+ setState(539);
_la = _input->LA(1);
if (!(_la == HogQLParser::LEFT
@@ -4333,19 +4478,19 @@ HogQLParser::JoinOpContext* HogQLParser::joinOp() {
_errHandler->reportMatch(this);
consume();
}
- setState(523);
+ setState(541);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::OUTER) {
- setState(522);
+ setState(540);
match(HogQLParser::OUTER);
}
break;
}
case 2: {
- setState(525);
+ setState(543);
_la = _input->LA(1);
if (!(_la == HogQLParser::LEFT
@@ -4356,21 +4501,21 @@ HogQLParser::JoinOpContext* HogQLParser::joinOp() {
_errHandler->reportMatch(this);
consume();
}
- setState(527);
+ setState(545);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::OUTER) {
- setState(526);
+ setState(544);
match(HogQLParser::OUTER);
}
- setState(530);
+ setState(548);
_errHandler->sync(this);
_la = _input->LA(1);
if ((((_la & ~ 0x3fULL) == 0) &&
((1ULL << _la) & 282) != 0) || _la == HogQLParser::SEMI) {
- setState(529);
+ setState(547);
_la = _input->LA(1);
if (!((((_la & ~ 0x3fULL) == 0) &&
((1ULL << _la) & 282) != 0) || _la == HogQLParser::SEMI)) {
@@ -4393,18 +4538,18 @@ HogQLParser::JoinOpContext* HogQLParser::joinOp() {
case 3: {
_localctx = _tracker.createInstance(_localctx);
enterOuterAlt(_localctx, 3);
- setState(548);
+ setState(566);
_errHandler->sync(this);
- switch (getInterpreter()->adaptivePredict(_input, 64, _ctx)) {
+ switch (getInterpreter()->adaptivePredict(_input, 66, _ctx)) {
case 1: {
- setState(535);
+ setState(553);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::ALL
|| _la == HogQLParser::ANY) {
- setState(534);
+ setState(552);
_la = _input->LA(1);
if (!(_la == HogQLParser::ALL
@@ -4416,38 +4561,38 @@ HogQLParser::JoinOpContext* HogQLParser::joinOp() {
consume();
}
}
- setState(537);
+ setState(555);
match(HogQLParser::FULL);
- setState(539);
+ setState(557);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::OUTER) {
- setState(538);
+ setState(556);
match(HogQLParser::OUTER);
}
break;
}
case 2: {
- setState(541);
+ setState(559);
match(HogQLParser::FULL);
- setState(543);
+ setState(561);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::OUTER) {
- setState(542);
+ setState(560);
match(HogQLParser::OUTER);
}
- setState(546);
+ setState(564);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::ALL
|| _la == HogQLParser::ANY) {
- setState(545);
+ setState(563);
_la = _input->LA(1);
if (!(_la == HogQLParser::ALL
@@ -4515,7 +4660,7 @@ std::any HogQLParser::JoinOpCrossContext::accept(tree::ParseTreeVisitor *visitor
HogQLParser::JoinOpCrossContext* HogQLParser::joinOpCross() {
JoinOpCrossContext *_localctx = _tracker.createInstance(_ctx, getState());
- enterRule(_localctx, 74, HogQLParser::RuleJoinOpCross);
+ enterRule(_localctx, 76, HogQLParser::RuleJoinOpCross);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
@@ -4525,21 +4670,21 @@ HogQLParser::JoinOpCrossContext* HogQLParser::joinOpCross() {
exitRule();
});
try {
- setState(555);
+ setState(573);
_errHandler->sync(this);
switch (_input->LA(1)) {
case HogQLParser::CROSS: {
enterOuterAlt(_localctx, 1);
- setState(552);
+ setState(570);
match(HogQLParser::CROSS);
- setState(553);
+ setState(571);
match(HogQLParser::JOIN);
break;
}
case HogQLParser::COMMA: {
enterOuterAlt(_localctx, 2);
- setState(554);
+ setState(572);
match(HogQLParser::COMMA);
break;
}
@@ -4599,7 +4744,7 @@ std::any HogQLParser::JoinConstraintClauseContext::accept(tree::ParseTreeVisitor
HogQLParser::JoinConstraintClauseContext* HogQLParser::joinConstraintClause() {
JoinConstraintClauseContext *_localctx = _tracker.createInstance(_ctx, getState());
- enterRule(_localctx, 76, HogQLParser::RuleJoinConstraintClause);
+ enterRule(_localctx, 78, HogQLParser::RuleJoinConstraintClause);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
@@ -4609,36 +4754,36 @@ HogQLParser::JoinConstraintClauseContext* HogQLParser::joinConstraintClause() {
exitRule();
});
try {
- setState(566);
+ setState(584);
_errHandler->sync(this);
- switch (getInterpreter()->adaptivePredict(_input, 67, _ctx)) {
+ switch (getInterpreter()->adaptivePredict(_input, 69, _ctx)) {
case 1: {
enterOuterAlt(_localctx, 1);
- setState(557);
+ setState(575);
match(HogQLParser::ON);
- setState(558);
+ setState(576);
columnExprList();
break;
}
case 2: {
enterOuterAlt(_localctx, 2);
- setState(559);
+ setState(577);
match(HogQLParser::USING);
- setState(560);
+ setState(578);
match(HogQLParser::LPAREN);
- setState(561);
+ setState(579);
columnExprList();
- setState(562);
+ setState(580);
match(HogQLParser::RPAREN);
break;
}
case 3: {
enterOuterAlt(_localctx, 3);
- setState(564);
+ setState(582);
match(HogQLParser::USING);
- setState(565);
+ setState(583);
columnExprList();
break;
}
@@ -4694,7 +4839,7 @@ std::any HogQLParser::SampleClauseContext::accept(tree::ParseTreeVisitor *visito
HogQLParser::SampleClauseContext* HogQLParser::sampleClause() {
SampleClauseContext *_localctx = _tracker.createInstance(_ctx, getState());
- enterRule(_localctx, 78, HogQLParser::RuleSampleClause);
+ enterRule(_localctx, 80, HogQLParser::RuleSampleClause);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
@@ -4705,18 +4850,18 @@ HogQLParser::SampleClauseContext* HogQLParser::sampleClause() {
});
try {
enterOuterAlt(_localctx, 1);
- setState(568);
+ setState(586);
match(HogQLParser::SAMPLE);
- setState(569);
+ setState(587);
ratioExpr();
- setState(572);
+ setState(590);
_errHandler->sync(this);
- switch (getInterpreter()->adaptivePredict(_input, 68, _ctx)) {
+ switch (getInterpreter()->adaptivePredict(_input, 70, _ctx)) {
case 1: {
- setState(570);
+ setState(588);
match(HogQLParser::OFFSET);
- setState(571);
+ setState(589);
ratioExpr();
break;
}
@@ -4772,7 +4917,7 @@ std::any HogQLParser::OrderExprListContext::accept(tree::ParseTreeVisitor *visit
HogQLParser::OrderExprListContext* HogQLParser::orderExprList() {
OrderExprListContext *_localctx = _tracker.createInstance(_ctx, getState());
- enterRule(_localctx, 80, HogQLParser::RuleOrderExprList);
+ enterRule(_localctx, 82, HogQLParser::RuleOrderExprList);
size_t _la = 0;
#if __cplusplus > 201703L
@@ -4784,17 +4929,17 @@ HogQLParser::OrderExprListContext* HogQLParser::orderExprList() {
});
try {
enterOuterAlt(_localctx, 1);
- setState(574);
+ setState(592);
orderExpr();
- setState(579);
+ setState(597);
_errHandler->sync(this);
_la = _input->LA(1);
while (_la == HogQLParser::COMMA) {
- setState(575);
+ setState(593);
match(HogQLParser::COMMA);
- setState(576);
+ setState(594);
orderExpr();
- setState(581);
+ setState(599);
_errHandler->sync(this);
_la = _input->LA(1);
}
@@ -4866,7 +5011,7 @@ std::any HogQLParser::OrderExprContext::accept(tree::ParseTreeVisitor *visitor)
HogQLParser::OrderExprContext* HogQLParser::orderExpr() {
OrderExprContext *_localctx = _tracker.createInstance(_ctx, getState());
- enterRule(_localctx, 82, HogQLParser::RuleOrderExpr);
+ enterRule(_localctx, 84, HogQLParser::RuleOrderExpr);
size_t _la = 0;
#if __cplusplus > 201703L
@@ -4878,15 +5023,15 @@ HogQLParser::OrderExprContext* HogQLParser::orderExpr() {
});
try {
enterOuterAlt(_localctx, 1);
- setState(582);
+ setState(600);
columnExpr(0);
- setState(584);
+ setState(602);
_errHandler->sync(this);
_la = _input->LA(1);
if ((((_la & ~ 0x3fULL) == 0) &&
((1ULL << _la) & 6291584) != 0)) {
- setState(583);
+ setState(601);
_la = _input->LA(1);
if (!((((_la & ~ 0x3fULL) == 0) &&
((1ULL << _la) & 6291584) != 0))) {
@@ -4897,14 +5042,14 @@ HogQLParser::OrderExprContext* HogQLParser::orderExpr() {
consume();
}
}
- setState(588);
+ setState(606);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::NULLS) {
- setState(586);
+ setState(604);
match(HogQLParser::NULLS);
- setState(587);
+ setState(605);
_la = _input->LA(1);
if (!(_la == HogQLParser::FIRST
@@ -4916,14 +5061,14 @@ HogQLParser::OrderExprContext* HogQLParser::orderExpr() {
consume();
}
}
- setState(592);
+ setState(610);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::COLLATE) {
- setState(590);
+ setState(608);
match(HogQLParser::COLLATE);
- setState(591);
+ setState(609);
match(HogQLParser::STRING_LITERAL);
}
@@ -4974,7 +5119,7 @@ std::any HogQLParser::RatioExprContext::accept(tree::ParseTreeVisitor *visitor)
HogQLParser::RatioExprContext* HogQLParser::ratioExpr() {
RatioExprContext *_localctx = _tracker.createInstance(_ctx, getState());
- enterRule(_localctx, 84, HogQLParser::RuleRatioExpr);
+ enterRule(_localctx, 86, HogQLParser::RuleRatioExpr);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
@@ -4984,12 +5129,12 @@ HogQLParser::RatioExprContext* HogQLParser::ratioExpr() {
exitRule();
});
try {
- setState(600);
+ setState(618);
_errHandler->sync(this);
switch (_input->LA(1)) {
case HogQLParser::LBRACE: {
enterOuterAlt(_localctx, 1);
- setState(594);
+ setState(612);
placeholder();
break;
}
@@ -5004,16 +5149,16 @@ HogQLParser::RatioExprContext* HogQLParser::ratioExpr() {
case HogQLParser::DOT:
case HogQLParser::PLUS: {
enterOuterAlt(_localctx, 2);
- setState(595);
+ setState(613);
numberLiteral();
- setState(598);
+ setState(616);
_errHandler->sync(this);
- switch (getInterpreter()->adaptivePredict(_input, 73, _ctx)) {
+ switch (getInterpreter()->adaptivePredict(_input, 75, _ctx)) {
case 1: {
- setState(596);
+ setState(614);
match(HogQLParser::SLASH);
- setState(597);
+ setState(615);
numberLiteral();
break;
}
@@ -5075,7 +5220,7 @@ std::any HogQLParser::SettingExprListContext::accept(tree::ParseTreeVisitor *vis
HogQLParser::SettingExprListContext* HogQLParser::settingExprList() {
SettingExprListContext *_localctx = _tracker.createInstance(_ctx, getState());
- enterRule(_localctx, 86, HogQLParser::RuleSettingExprList);
+ enterRule(_localctx, 88, HogQLParser::RuleSettingExprList);
size_t _la = 0;
#if __cplusplus > 201703L
@@ -5087,17 +5232,17 @@ HogQLParser::SettingExprListContext* HogQLParser::settingExprList() {
});
try {
enterOuterAlt(_localctx, 1);
- setState(602);
+ setState(620);
settingExpr();
- setState(607);
+ setState(625);
_errHandler->sync(this);
_la = _input->LA(1);
while (_la == HogQLParser::COMMA) {
- setState(603);
+ setState(621);
match(HogQLParser::COMMA);
- setState(604);
+ setState(622);
settingExpr();
- setState(609);
+ setState(627);
_errHandler->sync(this);
_la = _input->LA(1);
}
@@ -5145,7 +5290,7 @@ std::any HogQLParser::SettingExprContext::accept(tree::ParseTreeVisitor *visitor
HogQLParser::SettingExprContext* HogQLParser::settingExpr() {
SettingExprContext *_localctx = _tracker.createInstance(_ctx, getState());
- enterRule(_localctx, 88, HogQLParser::RuleSettingExpr);
+ enterRule(_localctx, 90, HogQLParser::RuleSettingExpr);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
@@ -5156,11 +5301,11 @@ HogQLParser::SettingExprContext* HogQLParser::settingExpr() {
});
try {
enterOuterAlt(_localctx, 1);
- setState(610);
+ setState(628);
identifier();
- setState(611);
+ setState(629);
match(HogQLParser::EQ_SINGLE);
- setState(612);
+ setState(630);
literal();
}
@@ -5206,7 +5351,7 @@ std::any HogQLParser::WindowExprContext::accept(tree::ParseTreeVisitor *visitor)
HogQLParser::WindowExprContext* HogQLParser::windowExpr() {
WindowExprContext *_localctx = _tracker.createInstance(_ctx, getState());
- enterRule(_localctx, 90, HogQLParser::RuleWindowExpr);
+ enterRule(_localctx, 92, HogQLParser::RuleWindowExpr);
size_t _la = 0;
#if __cplusplus > 201703L
@@ -5218,30 +5363,30 @@ HogQLParser::WindowExprContext* HogQLParser::windowExpr() {
});
try {
enterOuterAlt(_localctx, 1);
- setState(615);
+ setState(633);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::PARTITION) {
- setState(614);
+ setState(632);
winPartitionByClause();
}
- setState(618);
+ setState(636);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::ORDER) {
- setState(617);
+ setState(635);
winOrderByClause();
}
- setState(621);
+ setState(639);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::RANGE
|| _la == HogQLParser::ROWS) {
- setState(620);
+ setState(638);
winFrameClause();
}
@@ -5288,7 +5433,7 @@ std::any HogQLParser::WinPartitionByClauseContext::accept(tree::ParseTreeVisitor
HogQLParser::WinPartitionByClauseContext* HogQLParser::winPartitionByClause() {
WinPartitionByClauseContext *_localctx = _tracker.createInstance(_ctx, getState());
- enterRule(_localctx, 92, HogQLParser::RuleWinPartitionByClause);
+ enterRule(_localctx, 94, HogQLParser::RuleWinPartitionByClause);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
@@ -5299,11 +5444,11 @@ HogQLParser::WinPartitionByClauseContext* HogQLParser::winPartitionByClause() {
});
try {
enterOuterAlt(_localctx, 1);
- setState(623);
+ setState(641);
match(HogQLParser::PARTITION);
- setState(624);
+ setState(642);
match(HogQLParser::BY);
- setState(625);
+ setState(643);
columnExprList();
}
@@ -5349,7 +5494,7 @@ std::any HogQLParser::WinOrderByClauseContext::accept(tree::ParseTreeVisitor *vi
HogQLParser::WinOrderByClauseContext* HogQLParser::winOrderByClause() {
WinOrderByClauseContext *_localctx = _tracker.createInstance(_ctx, getState());
- enterRule(_localctx, 94, HogQLParser::RuleWinOrderByClause);
+ enterRule(_localctx, 96, HogQLParser::RuleWinOrderByClause);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
@@ -5360,11 +5505,11 @@ HogQLParser::WinOrderByClauseContext* HogQLParser::winOrderByClause() {
});
try {
enterOuterAlt(_localctx, 1);
- setState(627);
+ setState(645);
match(HogQLParser::ORDER);
- setState(628);
+ setState(646);
match(HogQLParser::BY);
- setState(629);
+ setState(647);
orderExprList();
}
@@ -5410,7 +5555,7 @@ std::any HogQLParser::WinFrameClauseContext::accept(tree::ParseTreeVisitor *visi
HogQLParser::WinFrameClauseContext* HogQLParser::winFrameClause() {
WinFrameClauseContext *_localctx = _tracker.createInstance(_ctx, getState());
- enterRule(_localctx, 96, HogQLParser::RuleWinFrameClause);
+ enterRule(_localctx, 98, HogQLParser::RuleWinFrameClause);
size_t _la = 0;
#if __cplusplus > 201703L
@@ -5422,7 +5567,7 @@ HogQLParser::WinFrameClauseContext* HogQLParser::winFrameClause() {
});
try {
enterOuterAlt(_localctx, 1);
- setState(631);
+ setState(649);
_la = _input->LA(1);
if (!(_la == HogQLParser::RANGE
@@ -5433,7 +5578,7 @@ HogQLParser::WinFrameClauseContext* HogQLParser::winFrameClause() {
_errHandler->reportMatch(this);
consume();
}
- setState(632);
+ setState(650);
winFrameExtend();
}
@@ -5505,7 +5650,7 @@ std::any HogQLParser::FrameBetweenContext::accept(tree::ParseTreeVisitor *visito
}
HogQLParser::WinFrameExtendContext* HogQLParser::winFrameExtend() {
WinFrameExtendContext *_localctx = _tracker.createInstance(_ctx, getState());
- enterRule(_localctx, 98, HogQLParser::RuleWinFrameExtend);
+ enterRule(_localctx, 100, HogQLParser::RuleWinFrameExtend);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
@@ -5515,7 +5660,7 @@ HogQLParser::WinFrameExtendContext* HogQLParser::winFrameExtend() {
exitRule();
});
try {
- setState(640);
+ setState(658);
_errHandler->sync(this);
switch (_input->LA(1)) {
case HogQLParser::CURRENT:
@@ -5531,7 +5676,7 @@ HogQLParser::WinFrameExtendContext* HogQLParser::winFrameExtend() {
case HogQLParser::PLUS: {
_localctx = _tracker.createInstance(_localctx);
enterOuterAlt(_localctx, 1);
- setState(634);
+ setState(652);
winFrameBound();
break;
}
@@ -5539,13 +5684,13 @@ HogQLParser::WinFrameExtendContext* HogQLParser::winFrameExtend() {
case HogQLParser::BETWEEN: {
_localctx = _tracker.createInstance(_localctx);
enterOuterAlt(_localctx, 2);
- setState(635);
+ setState(653);
match(HogQLParser::BETWEEN);
- setState(636);
+ setState(654);
winFrameBound();
- setState(637);
+ setState(655);
match(HogQLParser::AND);
- setState(638);
+ setState(656);
winFrameBound();
break;
}
@@ -5609,7 +5754,7 @@ std::any HogQLParser::WinFrameBoundContext::accept(tree::ParseTreeVisitor *visit
HogQLParser::WinFrameBoundContext* HogQLParser::winFrameBound() {
WinFrameBoundContext *_localctx = _tracker.createInstance(_ctx, getState());
- enterRule(_localctx, 100, HogQLParser::RuleWinFrameBound);
+ enterRule(_localctx, 102, HogQLParser::RuleWinFrameBound);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
@@ -5620,45 +5765,45 @@ HogQLParser::WinFrameBoundContext* HogQLParser::winFrameBound() {
});
try {
enterOuterAlt(_localctx, 1);
- setState(654);
+ setState(672);
_errHandler->sync(this);
- switch (getInterpreter()->adaptivePredict(_input, 80, _ctx)) {
+ switch (getInterpreter()->adaptivePredict(_input, 82, _ctx)) {
case 1: {
- setState(642);
+ setState(660);
match(HogQLParser::CURRENT);
- setState(643);
+ setState(661);
match(HogQLParser::ROW);
break;
}
case 2: {
- setState(644);
+ setState(662);
match(HogQLParser::UNBOUNDED);
- setState(645);
+ setState(663);
match(HogQLParser::PRECEDING);
break;
}
case 3: {
- setState(646);
+ setState(664);
match(HogQLParser::UNBOUNDED);
- setState(647);
+ setState(665);
match(HogQLParser::FOLLOWING);
break;
}
case 4: {
- setState(648);
+ setState(666);
numberLiteral();
- setState(649);
+ setState(667);
match(HogQLParser::PRECEDING);
break;
}
case 5: {
- setState(651);
+ setState(669);
numberLiteral();
- setState(652);
+ setState(670);
match(HogQLParser::FOLLOWING);
break;
}
@@ -5706,7 +5851,7 @@ std::any HogQLParser::ExprContext::accept(tree::ParseTreeVisitor *visitor) {
HogQLParser::ExprContext* HogQLParser::expr() {
ExprContext *_localctx = _tracker.createInstance(_ctx, getState());
- enterRule(_localctx, 102, HogQLParser::RuleExpr);
+ enterRule(_localctx, 104, HogQLParser::RuleExpr);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
@@ -5717,9 +5862,9 @@ HogQLParser::ExprContext* HogQLParser::expr() {
});
try {
enterOuterAlt(_localctx, 1);
- setState(656);
+ setState(674);
columnExpr(0);
- setState(657);
+ setState(675);
match(HogQLParser::EOF);
}
@@ -5912,7 +6057,7 @@ std::any HogQLParser::ColumnTypeExprEnumContext::accept(tree::ParseTreeVisitor *
}
HogQLParser::ColumnTypeExprContext* HogQLParser::columnTypeExpr() {
ColumnTypeExprContext *_localctx = _tracker.createInstance(_ctx, getState());
- enterRule(_localctx, 104, HogQLParser::RuleColumnTypeExpr);
+ enterRule(_localctx, 106, HogQLParser::RuleColumnTypeExpr);
size_t _la = 0;
#if __cplusplus > 201703L
@@ -5924,13 +6069,13 @@ HogQLParser::ColumnTypeExprContext* HogQLParser::columnTypeExpr() {
});
try {
size_t alt;
- setState(715);
+ setState(733);
_errHandler->sync(this);
- switch (getInterpreter()->adaptivePredict(_input, 88, _ctx)) {
+ switch (getInterpreter()->adaptivePredict(_input, 90, _ctx)) {
case 1: {
_localctx = _tracker.createInstance(_localctx);
enterOuterAlt(_localctx, 1);
- setState(659);
+ setState(677);
identifier();
break;
}
@@ -5938,39 +6083,39 @@ HogQLParser::ColumnTypeExprContext* HogQLParser::columnTypeExpr() {
case 2: {
_localctx = _tracker.createInstance(_localctx);
enterOuterAlt(_localctx, 2);
- setState(660);
+ setState(678);
identifier();
- setState(661);
+ setState(679);
match(HogQLParser::LPAREN);
- setState(662);
+ setState(680);
identifier();
- setState(663);
+ setState(681);
columnTypeExpr();
- setState(670);
+ setState(688);
_errHandler->sync(this);
- alt = getInterpreter()->adaptivePredict(_input, 81, _ctx);
+ alt = getInterpreter()->adaptivePredict(_input, 83, _ctx);
while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) {
if (alt == 1) {
- setState(664);
+ setState(682);
match(HogQLParser::COMMA);
- setState(665);
+ setState(683);
identifier();
- setState(666);
+ setState(684);
columnTypeExpr();
}
- setState(672);
+ setState(690);
_errHandler->sync(this);
- alt = getInterpreter()->adaptivePredict(_input, 81, _ctx);
+ alt = getInterpreter()->adaptivePredict(_input, 83, _ctx);
}
- setState(674);
+ setState(692);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::COMMA) {
- setState(673);
+ setState(691);
match(HogQLParser::COMMA);
}
- setState(676);
+ setState(694);
match(HogQLParser::RPAREN);
break;
}
@@ -5978,35 +6123,35 @@ HogQLParser::ColumnTypeExprContext* HogQLParser::columnTypeExpr() {
case 3: {
_localctx = _tracker.createInstance(_localctx);
enterOuterAlt(_localctx, 3);
- setState(678);
+ setState(696);
identifier();
- setState(679);
+ setState(697);
match(HogQLParser::LPAREN);
- setState(680);
+ setState(698);
enumValue();
- setState(685);
+ setState(703);
_errHandler->sync(this);
- alt = getInterpreter()->adaptivePredict(_input, 83, _ctx);
+ alt = getInterpreter()->adaptivePredict(_input, 85, _ctx);
while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) {
if (alt == 1) {
- setState(681);
+ setState(699);
match(HogQLParser::COMMA);
- setState(682);
+ setState(700);
enumValue();
}
- setState(687);
+ setState(705);
_errHandler->sync(this);
- alt = getInterpreter()->adaptivePredict(_input, 83, _ctx);
+ alt = getInterpreter()->adaptivePredict(_input, 85, _ctx);
}
- setState(689);
+ setState(707);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::COMMA) {
- setState(688);
+ setState(706);
match(HogQLParser::COMMA);
}
- setState(691);
+ setState(709);
match(HogQLParser::RPAREN);
break;
}
@@ -6014,35 +6159,35 @@ HogQLParser::ColumnTypeExprContext* HogQLParser::columnTypeExpr() {
case 4: {
_localctx = _tracker.createInstance(_localctx);
enterOuterAlt(_localctx, 4);
- setState(693);
+ setState(711);
identifier();
- setState(694);
+ setState(712);
match(HogQLParser::LPAREN);
- setState(695);
+ setState(713);
columnTypeExpr();
- setState(700);
+ setState(718);
_errHandler->sync(this);
- alt = getInterpreter()->adaptivePredict(_input, 85, _ctx);
+ alt = getInterpreter()->adaptivePredict(_input, 87, _ctx);
while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) {
if (alt == 1) {
- setState(696);
+ setState(714);
match(HogQLParser::COMMA);
- setState(697);
+ setState(715);
columnTypeExpr();
}
- setState(702);
+ setState(720);
_errHandler->sync(this);
- alt = getInterpreter()->adaptivePredict(_input, 85, _ctx);
+ alt = getInterpreter()->adaptivePredict(_input, 87, _ctx);
}
- setState(704);
+ setState(722);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::COMMA) {
- setState(703);
+ setState(721);
match(HogQLParser::COMMA);
}
- setState(706);
+ setState(724);
match(HogQLParser::RPAREN);
break;
}
@@ -6050,11 +6195,11 @@ HogQLParser::ColumnTypeExprContext* HogQLParser::columnTypeExpr() {
case 5: {
_localctx = _tracker.createInstance(_localctx);
enterOuterAlt(_localctx, 5);
- setState(708);
+ setState(726);
identifier();
- setState(709);
+ setState(727);
match(HogQLParser::LPAREN);
- setState(711);
+ setState(729);
_errHandler->sync(this);
_la = _input->LA(1);
@@ -6062,10 +6207,10 @@ HogQLParser::ColumnTypeExprContext* HogQLParser::columnTypeExpr() {
((1ULL << _la) & -1125900443713538) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) &&
((1ULL << (_la - 64)) & 8076106347046764543) != 0) || ((((_la - 128) & ~ 0x3fULL) == 0) &&
((1ULL << (_la - 128)) & 1153) != 0)) {
- setState(710);
+ setState(728);
columnExprList();
}
- setState(713);
+ setState(731);
match(HogQLParser::RPAREN);
break;
}
@@ -6121,7 +6266,7 @@ std::any HogQLParser::ColumnExprListContext::accept(tree::ParseTreeVisitor *visi
HogQLParser::ColumnExprListContext* HogQLParser::columnExprList() {
ColumnExprListContext *_localctx = _tracker.createInstance(_ctx, getState());
- enterRule(_localctx, 106, HogQLParser::RuleColumnExprList);
+ enterRule(_localctx, 108, HogQLParser::RuleColumnExprList);
#if __cplusplus > 201703L
auto onExit = finally([=, this] {
@@ -6133,28 +6278,28 @@ HogQLParser::ColumnExprListContext* HogQLParser::columnExprList() {
try {
size_t alt;
enterOuterAlt(_localctx, 1);
- setState(717);
+ setState(735);
columnExpr(0);
- setState(722);
+ setState(740);
_errHandler->sync(this);
- alt = getInterpreter()->adaptivePredict(_input, 89, _ctx);
+ alt = getInterpreter()->adaptivePredict(_input, 91, _ctx);
while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) {
if (alt == 1) {
- setState(718);
+ setState(736);
match(HogQLParser::COMMA);
- setState(719);
+ setState(737);
columnExpr(0);
}
- setState(724);
+ setState(742);
_errHandler->sync(this);
- alt = getInterpreter()->adaptivePredict(_input, 89, _ctx);
+ alt = getInterpreter()->adaptivePredict(_input, 91, _ctx);
}
- setState(726);
+ setState(744);
_errHandler->sync(this);
- switch (getInterpreter()->adaptivePredict(_input, 90, _ctx)) {
+ switch (getInterpreter()->adaptivePredict(_input, 92, _ctx)) {
case 1: {
- setState(725);
+ setState(743);
match(HogQLParser::COMMA);
break;
}
@@ -7293,8 +7438,8 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) {
HogQLParser::ColumnExprContext *_localctx = _tracker.createInstance(_ctx, parentState);
HogQLParser::ColumnExprContext *previousContext = _localctx;
(void)previousContext; // Silence compiler, in case the context is not used by generated code.
- size_t startState = 108;
- enterRecursionRule(_localctx, 108, HogQLParser::RuleColumnExpr, precedence);
+ size_t startState = 110;
+ enterRecursionRule(_localctx, 110, HogQLParser::RuleColumnExpr, precedence);
size_t _la = 0;
@@ -7308,22 +7453,22 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) {
try {
size_t alt;
enterOuterAlt(_localctx, 1);
- setState(877);
+ setState(895);
_errHandler->sync(this);
- switch (getInterpreter()->adaptivePredict(_input, 110, _ctx)) {
+ switch (getInterpreter()->adaptivePredict(_input, 112, _ctx)) {
case 1: {
_localctx = _tracker.createInstance(_localctx);
_ctx = _localctx;
previousContext = _localctx;
- setState(729);
+ setState(747);
match(HogQLParser::CASE);
- setState(731);
+ setState(749);
_errHandler->sync(this);
- switch (getInterpreter()->adaptivePredict(_input, 91, _ctx)) {
+ switch (getInterpreter()->adaptivePredict(_input, 93, _ctx)) {
case 1: {
- setState(730);
+ setState(748);
antlrcpp::downCast(_localctx)->caseExpr = columnExpr(0);
break;
}
@@ -7331,33 +7476,33 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) {
default:
break;
}
- setState(738);
+ setState(756);
_errHandler->sync(this);
_la = _input->LA(1);
do {
- setState(733);
+ setState(751);
match(HogQLParser::WHEN);
- setState(734);
+ setState(752);
antlrcpp::downCast(_localctx)->whenExpr = columnExpr(0);
- setState(735);
+ setState(753);
match(HogQLParser::THEN);
- setState(736);
+ setState(754);
antlrcpp::downCast(_localctx)->thenExpr = columnExpr(0);
- setState(740);
+ setState(758);
_errHandler->sync(this);
_la = _input->LA(1);
} while (_la == HogQLParser::WHEN);
- setState(744);
+ setState(762);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::ELSE) {
- setState(742);
+ setState(760);
match(HogQLParser::ELSE);
- setState(743);
+ setState(761);
antlrcpp::downCast(_localctx)->elseExpr = columnExpr(0);
}
- setState(746);
+ setState(764);
match(HogQLParser::END);
break;
}
@@ -7366,17 +7511,17 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) {
_localctx = _tracker.createInstance(_localctx);
_ctx = _localctx;
previousContext = _localctx;
- setState(748);
+ setState(766);
match(HogQLParser::CAST);
- setState(749);
+ setState(767);
match(HogQLParser::LPAREN);
- setState(750);
+ setState(768);
columnExpr(0);
- setState(751);
+ setState(769);
match(HogQLParser::AS);
- setState(752);
+ setState(770);
columnTypeExpr();
- setState(753);
+ setState(771);
match(HogQLParser::RPAREN);
break;
}
@@ -7385,9 +7530,9 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) {
_localctx = _tracker.createInstance(_localctx);
_ctx = _localctx;
previousContext = _localctx;
- setState(755);
+ setState(773);
match(HogQLParser::DATE);
- setState(756);
+ setState(774);
match(HogQLParser::STRING_LITERAL);
break;
}
@@ -7396,11 +7541,11 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) {
_localctx = _tracker.createInstance(_localctx);
_ctx = _localctx;
previousContext = _localctx;
- setState(757);
+ setState(775);
match(HogQLParser::INTERVAL);
- setState(758);
+ setState(776);
columnExpr(0);
- setState(759);
+ setState(777);
interval();
break;
}
@@ -7409,27 +7554,27 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) {
_localctx = _tracker.createInstance(_localctx);
_ctx = _localctx;
previousContext = _localctx;
- setState(761);
+ setState(779);
match(HogQLParser::SUBSTRING);
- setState(762);
+ setState(780);
match(HogQLParser::LPAREN);
- setState(763);
+ setState(781);
columnExpr(0);
- setState(764);
+ setState(782);
match(HogQLParser::FROM);
- setState(765);
+ setState(783);
columnExpr(0);
- setState(768);
+ setState(786);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::FOR) {
- setState(766);
+ setState(784);
match(HogQLParser::FOR);
- setState(767);
+ setState(785);
columnExpr(0);
}
- setState(770);
+ setState(788);
match(HogQLParser::RPAREN);
break;
}
@@ -7438,9 +7583,9 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) {
_localctx = _tracker.createInstance(_localctx);
_ctx = _localctx;
previousContext = _localctx;
- setState(772);
+ setState(790);
match(HogQLParser::TIMESTAMP);
- setState(773);
+ setState(791);
match(HogQLParser::STRING_LITERAL);
break;
}
@@ -7449,11 +7594,11 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) {
_localctx = _tracker.createInstance(_localctx);
_ctx = _localctx;
previousContext = _localctx;
- setState(774);
+ setState(792);
match(HogQLParser::TRIM);
- setState(775);
+ setState(793);
match(HogQLParser::LPAREN);
- setState(776);
+ setState(794);
_la = _input->LA(1);
if (!(_la == HogQLParser::BOTH
@@ -7464,13 +7609,13 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) {
_errHandler->reportMatch(this);
consume();
}
- setState(777);
+ setState(795);
string();
- setState(778);
+ setState(796);
match(HogQLParser::FROM);
- setState(779);
+ setState(797);
columnExpr(0);
- setState(780);
+ setState(798);
match(HogQLParser::RPAREN);
break;
}
@@ -7479,12 +7624,12 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) {
_localctx = _tracker.createInstance(_localctx);
_ctx = _localctx;
previousContext = _localctx;
- setState(782);
+ setState(800);
identifier();
- setState(783);
+ setState(801);
match(HogQLParser::LPAREN);
- setState(785);
+ setState(803);
_errHandler->sync(this);
_la = _input->LA(1);
@@ -7492,24 +7637,24 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) {
((1ULL << _la) & -1125900443713538) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) &&
((1ULL << (_la - 64)) & 8076106347046764543) != 0) || ((((_la - 128) & ~ 0x3fULL) == 0) &&
((1ULL << (_la - 128)) & 1153) != 0)) {
- setState(784);
+ setState(802);
columnExprList();
}
- setState(787);
+ setState(805);
match(HogQLParser::RPAREN);
- setState(797);
+ setState(815);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::LPAREN) {
- setState(789);
+ setState(807);
match(HogQLParser::LPAREN);
- setState(791);
+ setState(809);
_errHandler->sync(this);
- switch (getInterpreter()->adaptivePredict(_input, 96, _ctx)) {
+ switch (getInterpreter()->adaptivePredict(_input, 98, _ctx)) {
case 1: {
- setState(790);
+ setState(808);
match(HogQLParser::DISTINCT);
break;
}
@@ -7517,7 +7662,7 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) {
default:
break;
}
- setState(794);
+ setState(812);
_errHandler->sync(this);
_la = _input->LA(1);
@@ -7525,19 +7670,19 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) {
((1ULL << _la) & -1125900443713538) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) &&
((1ULL << (_la - 64)) & 8076106347046764543) != 0) || ((((_la - 128) & ~ 0x3fULL) == 0) &&
((1ULL << (_la - 128)) & 1153) != 0)) {
- setState(793);
+ setState(811);
columnArgList();
}
- setState(796);
+ setState(814);
match(HogQLParser::RPAREN);
}
- setState(799);
+ setState(817);
match(HogQLParser::OVER);
- setState(800);
+ setState(818);
match(HogQLParser::LPAREN);
- setState(801);
+ setState(819);
windowExpr();
- setState(802);
+ setState(820);
match(HogQLParser::RPAREN);
break;
}
@@ -7546,12 +7691,12 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) {
_localctx = _tracker.createInstance(_localctx);
_ctx = _localctx;
previousContext = _localctx;
- setState(804);
+ setState(822);
identifier();
- setState(805);
+ setState(823);
match(HogQLParser::LPAREN);
- setState(807);
+ setState(825);
_errHandler->sync(this);
_la = _input->LA(1);
@@ -7559,24 +7704,24 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) {
((1ULL << _la) & -1125900443713538) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) &&
((1ULL << (_la - 64)) & 8076106347046764543) != 0) || ((((_la - 128) & ~ 0x3fULL) == 0) &&
((1ULL << (_la - 128)) & 1153) != 0)) {
- setState(806);
+ setState(824);
columnExprList();
}
- setState(809);
+ setState(827);
match(HogQLParser::RPAREN);
- setState(819);
+ setState(837);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::LPAREN) {
- setState(811);
+ setState(829);
match(HogQLParser::LPAREN);
- setState(813);
+ setState(831);
_errHandler->sync(this);
- switch (getInterpreter()->adaptivePredict(_input, 100, _ctx)) {
+ switch (getInterpreter()->adaptivePredict(_input, 102, _ctx)) {
case 1: {
- setState(812);
+ setState(830);
match(HogQLParser::DISTINCT);
break;
}
@@ -7584,7 +7729,7 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) {
default:
break;
}
- setState(816);
+ setState(834);
_errHandler->sync(this);
_la = _input->LA(1);
@@ -7592,15 +7737,15 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) {
((1ULL << _la) & -1125900443713538) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) &&
((1ULL << (_la - 64)) & 8076106347046764543) != 0) || ((((_la - 128) & ~ 0x3fULL) == 0) &&
((1ULL << (_la - 128)) & 1153) != 0)) {
- setState(815);
+ setState(833);
columnArgList();
}
- setState(818);
+ setState(836);
match(HogQLParser::RPAREN);
}
- setState(821);
+ setState(839);
match(HogQLParser::OVER);
- setState(822);
+ setState(840);
identifier();
break;
}
@@ -7609,16 +7754,16 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) {
_localctx = _tracker.createInstance(_localctx);
_ctx = _localctx;
previousContext = _localctx;
- setState(824);
+ setState(842);
identifier();
- setState(830);
+ setState(848);
_errHandler->sync(this);
- switch (getInterpreter()->adaptivePredict(_input, 104, _ctx)) {
+ switch (getInterpreter()->adaptivePredict(_input, 106, _ctx)) {
case 1: {
- setState(825);
+ setState(843);
match(HogQLParser::LPAREN);
- setState(827);
+ setState(845);
_errHandler->sync(this);
_la = _input->LA(1);
@@ -7626,10 +7771,10 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) {
((1ULL << _la) & -1125900443713538) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) &&
((1ULL << (_la - 64)) & 8076106347046764543) != 0) || ((((_la - 128) & ~ 0x3fULL) == 0) &&
((1ULL << (_la - 128)) & 1153) != 0)) {
- setState(826);
+ setState(844);
columnExprList();
}
- setState(829);
+ setState(847);
match(HogQLParser::RPAREN);
break;
}
@@ -7637,14 +7782,14 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) {
default:
break;
}
- setState(832);
+ setState(850);
match(HogQLParser::LPAREN);
- setState(834);
+ setState(852);
_errHandler->sync(this);
- switch (getInterpreter()->adaptivePredict(_input, 105, _ctx)) {
+ switch (getInterpreter()->adaptivePredict(_input, 107, _ctx)) {
case 1: {
- setState(833);
+ setState(851);
match(HogQLParser::DISTINCT);
break;
}
@@ -7652,7 +7797,7 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) {
default:
break;
}
- setState(837);
+ setState(855);
_errHandler->sync(this);
_la = _input->LA(1);
@@ -7660,10 +7805,10 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) {
((1ULL << _la) & -1125900443713538) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) &&
((1ULL << (_la - 64)) & 8076106347046764543) != 0) || ((((_la - 128) & ~ 0x3fULL) == 0) &&
((1ULL << (_la - 128)) & 1153) != 0)) {
- setState(836);
+ setState(854);
columnArgList();
}
- setState(839);
+ setState(857);
match(HogQLParser::RPAREN);
break;
}
@@ -7672,7 +7817,7 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) {
_localctx = _tracker.createInstance(_localctx);
_ctx = _localctx;
previousContext = _localctx;
- setState(841);
+ setState(859);
hogqlxTagElement();
break;
}
@@ -7681,7 +7826,7 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) {
_localctx = _tracker.createInstance(_localctx);
_ctx = _localctx;
previousContext = _localctx;
- setState(842);
+ setState(860);
templateString();
break;
}
@@ -7690,7 +7835,7 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) {
_localctx = _tracker.createInstance(_localctx);
_ctx = _localctx;
previousContext = _localctx;
- setState(843);
+ setState(861);
literal();
break;
}
@@ -7699,9 +7844,9 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) {
_localctx = _tracker.createInstance(_localctx);
_ctx = _localctx;
previousContext = _localctx;
- setState(844);
+ setState(862);
match(HogQLParser::DASH);
- setState(845);
+ setState(863);
columnExpr(19);
break;
}
@@ -7710,9 +7855,9 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) {
_localctx = _tracker.createInstance(_localctx);
_ctx = _localctx;
previousContext = _localctx;
- setState(846);
+ setState(864);
match(HogQLParser::NOT);
- setState(847);
+ setState(865);
columnExpr(13);
break;
}
@@ -7721,19 +7866,19 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) {
_localctx = _tracker.createInstance(_localctx);
_ctx = _localctx;
previousContext = _localctx;
- setState(851);
+ setState(869);
_errHandler->sync(this);
_la = _input->LA(1);
if ((((_la & ~ 0x3fULL) == 0) &&
((1ULL << _la) & -181272084561788930) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) &&
((1ULL << (_la - 64)) & 201863462911) != 0)) {
- setState(848);
+ setState(866);
tableIdentifier();
- setState(849);
+ setState(867);
match(HogQLParser::DOT);
}
- setState(853);
+ setState(871);
match(HogQLParser::ASTERISK);
break;
}
@@ -7742,11 +7887,11 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) {
_localctx = _tracker.createInstance(_localctx);
_ctx = _localctx;
previousContext = _localctx;
- setState(854);
+ setState(872);
match(HogQLParser::LPAREN);
- setState(855);
+ setState(873);
selectUnionStmt();
- setState(856);
+ setState(874);
match(HogQLParser::RPAREN);
break;
}
@@ -7755,11 +7900,11 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) {
_localctx = _tracker.createInstance(_localctx);
_ctx = _localctx;
previousContext = _localctx;
- setState(858);
+ setState(876);
match(HogQLParser::LPAREN);
- setState(859);
+ setState(877);
columnExpr(0);
- setState(860);
+ setState(878);
match(HogQLParser::RPAREN);
break;
}
@@ -7768,11 +7913,11 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) {
_localctx = _tracker.createInstance(_localctx);
_ctx = _localctx;
previousContext = _localctx;
- setState(862);
+ setState(880);
match(HogQLParser::LPAREN);
- setState(863);
+ setState(881);
columnExprList();
- setState(864);
+ setState(882);
match(HogQLParser::RPAREN);
break;
}
@@ -7781,9 +7926,9 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) {
_localctx = _tracker.createInstance(_localctx);
_ctx = _localctx;
previousContext = _localctx;
- setState(866);
+ setState(884);
match(HogQLParser::LBRACKET);
- setState(868);
+ setState(886);
_errHandler->sync(this);
_la = _input->LA(1);
@@ -7791,10 +7936,10 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) {
((1ULL << _la) & -1125900443713538) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) &&
((1ULL << (_la - 64)) & 8076106347046764543) != 0) || ((((_la - 128) & ~ 0x3fULL) == 0) &&
((1ULL << (_la - 128)) & 1153) != 0)) {
- setState(867);
+ setState(885);
columnExprList();
}
- setState(870);
+ setState(888);
match(HogQLParser::RBRACKET);
break;
}
@@ -7803,9 +7948,9 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) {
_localctx = _tracker.createInstance(_localctx);
_ctx = _localctx;
previousContext = _localctx;
- setState(871);
+ setState(889);
match(HogQLParser::LBRACE);
- setState(873);
+ setState(891);
_errHandler->sync(this);
_la = _input->LA(1);
@@ -7813,10 +7958,10 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) {
((1ULL << _la) & -1125900443713538) != 0) || ((((_la - 64) & ~ 0x3fULL) == 0) &&
((1ULL << (_la - 64)) & 8076106347046764543) != 0) || ((((_la - 128) & ~ 0x3fULL) == 0) &&
((1ULL << (_la - 128)) & 1153) != 0)) {
- setState(872);
+ setState(890);
kvPairList();
}
- setState(875);
+ setState(893);
match(HogQLParser::RBRACE);
break;
}
@@ -7825,7 +7970,7 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) {
_localctx = _tracker.createInstance(_localctx);
_ctx = _localctx;
previousContext = _localctx;
- setState(876);
+ setState(894);
columnIdentifier();
break;
}
@@ -7834,42 +7979,42 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) {
break;
}
_ctx->stop = _input->LT(-1);
- setState(983);
+ setState(1001);
_errHandler->sync(this);
- alt = getInterpreter()->adaptivePredict(_input, 121, _ctx);
+ alt = getInterpreter()->adaptivePredict(_input, 123, _ctx);
while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) {
if (alt == 1) {
if (!_parseListeners.empty())
triggerExitRuleEvent();
previousContext = _localctx;
- setState(981);
+ setState(999);
_errHandler->sync(this);
- switch (getInterpreter()->adaptivePredict(_input, 120, _ctx)) {
+ switch (getInterpreter()->adaptivePredict(_input, 122, _ctx)) {
case 1: {
auto newContext = _tracker.createInstance(_tracker.createInstance(parentContext, parentState));
_localctx = newContext;
newContext->left = previousContext;
pushNewRecursionContext(newContext, startState, RuleColumnExpr);
- setState(879);
+ setState(897);
if (!(precpred(_ctx, 18))) throw FailedPredicateException(this, "precpred(_ctx, 18)");
- setState(883);
+ setState(901);
_errHandler->sync(this);
switch (_input->LA(1)) {
case HogQLParser::ASTERISK: {
- setState(880);
+ setState(898);
antlrcpp::downCast(_localctx)->operator_ = match(HogQLParser::ASTERISK);
break;
}
case HogQLParser::SLASH: {
- setState(881);
+ setState(899);
antlrcpp::downCast(_localctx)->operator_ = match(HogQLParser::SLASH);
break;
}
case HogQLParser::PERCENT: {
- setState(882);
+ setState(900);
antlrcpp::downCast(_localctx)->operator_ = match(HogQLParser::PERCENT);
break;
}
@@ -7877,7 +8022,7 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) {
default:
throw NoViableAltException(this);
}
- setState(885);
+ setState(903);
antlrcpp::downCast(_localctx)->right = columnExpr(19);
break;
}
@@ -7887,26 +8032,26 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) {
_localctx = newContext;
newContext->left = previousContext;
pushNewRecursionContext(newContext, startState, RuleColumnExpr);
- setState(886);
+ setState(904);
if (!(precpred(_ctx, 17))) throw FailedPredicateException(this, "precpred(_ctx, 17)");
- setState(890);
+ setState(908);
_errHandler->sync(this);
switch (_input->LA(1)) {
case HogQLParser::PLUS: {
- setState(887);
+ setState(905);
antlrcpp::downCast(_localctx)->operator_ = match(HogQLParser::PLUS);
break;
}
case HogQLParser::DASH: {
- setState(888);
+ setState(906);
antlrcpp::downCast(_localctx)->operator_ = match(HogQLParser::DASH);
break;
}
case HogQLParser::CONCAT: {
- setState(889);
+ setState(907);
antlrcpp::downCast(_localctx)->operator_ = match(HogQLParser::CONCAT);
break;
}
@@ -7914,7 +8059,7 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) {
default:
throw NoViableAltException(this);
}
- setState(892);
+ setState(910);
antlrcpp::downCast(_localctx)->right = columnExpr(18);
break;
}
@@ -7924,71 +8069,71 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) {
_localctx = newContext;
newContext->left = previousContext;
pushNewRecursionContext(newContext, startState, RuleColumnExpr);
- setState(893);
+ setState(911);
if (!(precpred(_ctx, 16))) throw FailedPredicateException(this, "precpred(_ctx, 16)");
- setState(918);
+ setState(936);
_errHandler->sync(this);
- switch (getInterpreter()->adaptivePredict(_input, 116, _ctx)) {
+ switch (getInterpreter()->adaptivePredict(_input, 118, _ctx)) {
case 1: {
- setState(894);
+ setState(912);
antlrcpp::downCast(_localctx)->operator_ = match(HogQLParser::EQ_DOUBLE);
break;
}
case 2: {
- setState(895);
+ setState(913);
antlrcpp::downCast(_localctx)->operator_ = match(HogQLParser::EQ_SINGLE);
break;
}
case 3: {
- setState(896);
+ setState(914);
antlrcpp::downCast(_localctx)->operator_ = match(HogQLParser::NOT_EQ);
break;
}
case 4: {
- setState(897);
+ setState(915);
antlrcpp::downCast(_localctx)->operator_ = match(HogQLParser::LT_EQ);
break;
}
case 5: {
- setState(898);
+ setState(916);
antlrcpp::downCast(_localctx)->operator_ = match(HogQLParser::LT);
break;
}
case 6: {
- setState(899);
+ setState(917);
antlrcpp::downCast(_localctx)->operator_ = match(HogQLParser::GT_EQ);
break;
}
case 7: {
- setState(900);
+ setState(918);
antlrcpp::downCast(_localctx)->operator_ = match(HogQLParser::GT);
break;
}
case 8: {
- setState(902);
+ setState(920);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::NOT) {
- setState(901);
+ setState(919);
antlrcpp::downCast(_localctx)->operator_ = match(HogQLParser::NOT);
}
- setState(904);
+ setState(922);
match(HogQLParser::IN);
- setState(906);
+ setState(924);
_errHandler->sync(this);
- switch (getInterpreter()->adaptivePredict(_input, 114, _ctx)) {
+ switch (getInterpreter()->adaptivePredict(_input, 116, _ctx)) {
case 1: {
- setState(905);
+ setState(923);
match(HogQLParser::COHORT);
break;
}
@@ -8000,15 +8145,15 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) {
}
case 9: {
- setState(909);
+ setState(927);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::NOT) {
- setState(908);
+ setState(926);
antlrcpp::downCast(_localctx)->operator_ = match(HogQLParser::NOT);
}
- setState(911);
+ setState(929);
_la = _input->LA(1);
if (!(_la == HogQLParser::ILIKE
@@ -8023,37 +8168,37 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) {
}
case 10: {
- setState(912);
+ setState(930);
antlrcpp::downCast(_localctx)->operator_ = match(HogQLParser::REGEX_SINGLE);
break;
}
case 11: {
- setState(913);
+ setState(931);
antlrcpp::downCast(_localctx)->operator_ = match(HogQLParser::REGEX_DOUBLE);
break;
}
case 12: {
- setState(914);
+ setState(932);
antlrcpp::downCast(_localctx)->operator_ = match(HogQLParser::NOT_REGEX);
break;
}
case 13: {
- setState(915);
+ setState(933);
antlrcpp::downCast(_localctx)->operator_ = match(HogQLParser::IREGEX_SINGLE);
break;
}
case 14: {
- setState(916);
+ setState(934);
antlrcpp::downCast(_localctx)->operator_ = match(HogQLParser::IREGEX_DOUBLE);
break;
}
case 15: {
- setState(917);
+ setState(935);
antlrcpp::downCast(_localctx)->operator_ = match(HogQLParser::NOT_IREGEX);
break;
}
@@ -8061,7 +8206,7 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) {
default:
break;
}
- setState(920);
+ setState(938);
antlrcpp::downCast(_localctx)->right = columnExpr(17);
break;
}
@@ -8070,12 +8215,12 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) {
auto newContext = _tracker.createInstance(_tracker.createInstance(parentContext, parentState));
_localctx = newContext;
pushNewRecursionContext(newContext, startState, RuleColumnExpr);
- setState(921);
+ setState(939);
if (!(precpred(_ctx, 14))) throw FailedPredicateException(this, "precpred(_ctx, 14)");
- setState(922);
+ setState(940);
match(HogQLParser::NULLISH);
- setState(923);
+ setState(941);
columnExpr(15);
break;
}
@@ -8084,12 +8229,12 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) {
auto newContext = _tracker.createInstance(_tracker.createInstance(parentContext, parentState));
_localctx = newContext;
pushNewRecursionContext(newContext, startState, RuleColumnExpr);
- setState(924);
+ setState(942);
if (!(precpred(_ctx, 12))) throw FailedPredicateException(this, "precpred(_ctx, 12)");
- setState(925);
+ setState(943);
match(HogQLParser::AND);
- setState(926);
+ setState(944);
columnExpr(13);
break;
}
@@ -8098,12 +8243,12 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) {
auto newContext = _tracker.createInstance(_tracker.createInstance(parentContext, parentState));
_localctx = newContext;
pushNewRecursionContext(newContext, startState, RuleColumnExpr);
- setState(927);
+ setState(945);
if (!(precpred(_ctx, 11))) throw FailedPredicateException(this, "precpred(_ctx, 11)");
- setState(928);
+ setState(946);
match(HogQLParser::OR);
- setState(929);
+ setState(947);
columnExpr(12);
break;
}
@@ -8112,24 +8257,24 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) {
auto newContext = _tracker.createInstance(_tracker.createInstance(parentContext, parentState));
_localctx = newContext;
pushNewRecursionContext(newContext, startState, RuleColumnExpr);
- setState(930);
+ setState(948);
if (!(precpred(_ctx, 10))) throw FailedPredicateException(this, "precpred(_ctx, 10)");
- setState(932);
+ setState(950);
_errHandler->sync(this);
_la = _input->LA(1);
if (_la == HogQLParser::NOT) {
- setState(931);
+ setState(949);
match(HogQLParser::NOT);
}
- setState(934);
+ setState(952);
match(HogQLParser::BETWEEN);
- setState(935);
+ setState(953);
columnExpr(0);
- setState(936);
+ setState(954);
match(HogQLParser::AND);
- setState(937);
+ setState(955);
columnExpr(11);
break;
}
@@ -8138,16 +8283,16 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) {
auto newContext = _tracker.createInstance(_tracker.createInstance(parentContext, parentState));
_localctx = newContext;
pushNewRecursionContext(newContext, startState, RuleColumnExpr);
- setState(939);
+ setState(957);
if (!(precpred(_ctx, 9))) throw FailedPredicateException(this, "precpred(_ctx, 9)");
- setState(940);
+ setState(958);
match(HogQLParser::QUERY);
- setState(941);
+ setState(959);
columnExpr(0);
- setState(942);
+ setState(960);
match(HogQLParser::COLON);
- setState(943);
+ setState(961);
columnExpr(9);
break;
}
@@ -8156,14 +8301,14 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) {
auto newContext = _tracker.createInstance(_tracker.createInstance(parentContext, parentState));
_localctx = newContext;
pushNewRecursionContext(newContext, startState, RuleColumnExpr);
- setState(945);
+ setState(963);
if (!(precpred(_ctx, 25))) throw FailedPredicateException(this, "precpred(_ctx, 25)");
- setState(946);
+ setState(964);
match(HogQLParser::LBRACKET);
- setState(947);
+ setState(965);
columnExpr(0);
- setState(948);
+ setState(966);
match(HogQLParser::RBRACKET);
break;
}
@@ -8172,12 +8317,12 @@ HogQLParser::ColumnExprContext* HogQLParser::columnExpr(int precedence) {
auto newContext = _tracker.createInstance(_tracker.createInstance