-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e1669d9
commit 2f63510
Showing
1 changed file
with
250 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,129 @@ | ||
# serializer version: 1 | ||
# name: TestPerson.test_filter_person_email | ||
''' | ||
/* user_id:0 request:_snapshot_ */ | ||
SELECT id | ||
FROM person | ||
WHERE team_id = 2 | ||
GROUP BY id | ||
HAVING max(is_deleted) = 0 | ||
AND argMax(person.created_at, version) < now() + INTERVAL 1 DAY | ||
AND has(['[email protected]'], replaceRegexpAll(JSONExtractRaw(properties, 'email'), '^"|"$', '')) | ||
ORDER BY argMax(person.created_at, version) DESC, id DESC | ||
LIMIT 100 SETTINGS optimize_aggregation_in_order = 1 | ||
''' | ||
# --- | ||
# name: TestPerson.test_filter_person_email_materialized | ||
''' | ||
/* user_id:0 request:_snapshot_ */ | ||
SELECT id | ||
FROM person | ||
WHERE team_id = 2 | ||
GROUP BY id | ||
HAVING max(is_deleted) = 0 | ||
AND argMax(person.created_at, version) < now() + INTERVAL 1 DAY | ||
AND has(['[email protected]'], "pmat_email") | ||
ORDER BY argMax(person.created_at, version) DESC, id DESC | ||
LIMIT 100 SETTINGS optimize_aggregation_in_order = 1 | ||
''' | ||
# --- | ||
# name: TestPerson.test_filter_person_list | ||
''' | ||
/* user_id:0 request:_snapshot_ */ | ||
SELECT id | ||
FROM person | ||
WHERE team_id = 2 | ||
GROUP BY id | ||
HAVING max(is_deleted) = 0 | ||
AND argMax(person.created_at, version) < now() + INTERVAL 1 DAY | ||
AND id IN | ||
(SELECT person_id | ||
FROM | ||
(SELECT distinct_id, | ||
argMax(person_id, version) as person_id | ||
FROM person_distinct_id2 | ||
WHERE team_id = 2 | ||
GROUP BY distinct_id | ||
HAVING argMax(is_deleted, version) = 0) | ||
where distinct_id = 'distinct_id' ) | ||
ORDER BY argMax(person.created_at, version) DESC, id DESC | ||
LIMIT 100 SETTINGS optimize_aggregation_in_order = 1 | ||
''' | ||
# --- | ||
# name: TestPerson.test_filter_person_list.1 | ||
''' | ||
/* user_id:0 request:_snapshot_ */ | ||
SELECT id | ||
FROM person | ||
WHERE team_id = 2 | ||
GROUP BY id | ||
HAVING max(is_deleted) = 0 | ||
AND argMax(person.created_at, version) < now() + INTERVAL 1 DAY | ||
AND id IN | ||
(SELECT person_id | ||
FROM | ||
(SELECT distinct_id, | ||
argMax(person_id, version) as person_id | ||
FROM person_distinct_id2 | ||
WHERE team_id = 2 | ||
GROUP BY distinct_id | ||
HAVING argMax(is_deleted, version) = 0) | ||
where distinct_id = 'another_one' ) | ||
ORDER BY argMax(person.created_at, version) DESC, id DESC | ||
LIMIT 100 SETTINGS optimize_aggregation_in_order = 1 | ||
''' | ||
# --- | ||
# name: TestPerson.test_filter_person_list.2 | ||
''' | ||
/* user_id:0 request:_snapshot_ */ | ||
SELECT id | ||
FROM person | ||
WHERE team_id = 2 | ||
GROUP BY id | ||
HAVING max(is_deleted) = 0 | ||
AND argMax(person.created_at, version) < now() + INTERVAL 1 DAY | ||
AND has(['[email protected]'], replaceRegexpAll(JSONExtractRaw(properties, 'email'), '^"|"$', '')) | ||
ORDER BY argMax(person.created_at, version) DESC, id DESC | ||
LIMIT 100 SETTINGS optimize_aggregation_in_order = 1 | ||
''' | ||
# --- | ||
# name: TestPerson.test_filter_person_list.3 | ||
''' | ||
/* user_id:0 request:_snapshot_ */ | ||
SELECT id | ||
FROM person | ||
WHERE team_id = 2 | ||
GROUP BY id | ||
HAVING max(is_deleted) = 0 | ||
AND argMax(person.created_at, version) < now() + INTERVAL 1 DAY | ||
AND has(['inexistent'], replaceRegexpAll(JSONExtractRaw(properties, 'email'), '^"|"$', '')) | ||
ORDER BY argMax(person.created_at, version) DESC, id DESC | ||
LIMIT 100 SETTINGS optimize_aggregation_in_order = 1 | ||
''' | ||
# --- | ||
# name: TestPerson.test_filter_person_list.4 | ||
''' | ||
/* user_id:0 request:_snapshot_ */ | ||
SELECT id | ||
FROM person | ||
WHERE team_id = 2 | ||
GROUP BY id | ||
HAVING max(is_deleted) = 0 | ||
AND argMax(person.created_at, version) < now() + INTERVAL 1 DAY | ||
AND id IN | ||
(SELECT person_id | ||
FROM | ||
(SELECT distinct_id, | ||
argMax(person_id, version) as person_id | ||
FROM person_distinct_id2 | ||
WHERE team_id = 2 | ||
GROUP BY distinct_id | ||
HAVING argMax(is_deleted, version) = 0) | ||
where distinct_id = 'inexistent' ) | ||
ORDER BY argMax(person.created_at, version) DESC, id DESC | ||
LIMIT 100 SETTINGS optimize_aggregation_in_order = 1 | ||
''' | ||
# --- | ||
# name: TestPerson.test_filter_person_prop | ||
''' | ||
/* user_id:0 request:_snapshot_ */ | ||
|
@@ -406,6 +531,131 @@ | |
LIMIT 100 SETTINGS optimize_aggregation_in_order = 1 | ||
''' | ||
# --- | ||
# name: TestPersonFromClickhouse.test_filter_person_email | ||
''' | ||
/* user_id:0 request:_snapshot_ */ | ||
SELECT id | ||
FROM person | ||
WHERE team_id = 2 | ||
GROUP BY id | ||
HAVING max(is_deleted) = 0 | ||
AND argMax(person.created_at, version) < now() + INTERVAL 1 DAY | ||
AND has(['[email protected]'], replaceRegexpAll(JSONExtractRaw(properties, 'email'), '^"|"$', '')) | ||
ORDER BY argMax(person.created_at, version) DESC, id DESC | ||
LIMIT 100 SETTINGS optimize_aggregation_in_order = 1 | ||
''' | ||
# --- | ||
# name: TestPersonFromClickhouse.test_filter_person_email_materialized | ||
''' | ||
/* user_id:0 request:_snapshot_ */ | ||
SELECT id | ||
FROM person | ||
WHERE team_id = 2 | ||
GROUP BY id | ||
HAVING max(is_deleted) = 0 | ||
AND argMax(person.created_at, version) < now() + INTERVAL 1 DAY | ||
AND has(['[email protected]'], "pmat_email") | ||
ORDER BY argMax(person.created_at, version) DESC, id DESC | ||
LIMIT 100 SETTINGS optimize_aggregation_in_order = 1 | ||
''' | ||
# --- | ||
# name: TestPersonFromClickhouse.test_filter_person_list | ||
''' | ||
/* user_id:0 request:_snapshot_ */ | ||
SELECT id | ||
FROM person | ||
WHERE team_id = 2 | ||
GROUP BY id | ||
HAVING max(is_deleted) = 0 | ||
AND argMax(person.created_at, version) < now() + INTERVAL 1 DAY | ||
AND id IN | ||
(SELECT person_id | ||
FROM | ||
(SELECT distinct_id, | ||
argMax(person_id, version) as person_id | ||
FROM person_distinct_id2 | ||
WHERE team_id = 2 | ||
GROUP BY distinct_id | ||
HAVING argMax(is_deleted, version) = 0) | ||
where distinct_id = 'distinct_id' ) | ||
ORDER BY argMax(person.created_at, version) DESC, id DESC | ||
LIMIT 100 SETTINGS optimize_aggregation_in_order = 1 | ||
''' | ||
# --- | ||
# name: TestPersonFromClickhouse.test_filter_person_list.1 | ||
''' | ||
/* user_id:0 request:_snapshot_ */ | ||
SELECT id | ||
FROM person | ||
WHERE team_id = 2 | ||
GROUP BY id | ||
HAVING max(is_deleted) = 0 | ||
AND argMax(person.created_at, version) < now() + INTERVAL 1 DAY | ||
AND id IN | ||
(SELECT person_id | ||
FROM | ||
(SELECT distinct_id, | ||
argMax(person_id, version) as person_id | ||
FROM person_distinct_id2 | ||
WHERE team_id = 2 | ||
GROUP BY distinct_id | ||
HAVING argMax(is_deleted, version) = 0) | ||
where distinct_id = 'another_one' ) | ||
ORDER BY argMax(person.created_at, version) DESC, id DESC | ||
LIMIT 100 SETTINGS optimize_aggregation_in_order = 1 | ||
''' | ||
# --- | ||
# name: TestPersonFromClickhouse.test_filter_person_list.2 | ||
''' | ||
/* user_id:0 request:_snapshot_ */ | ||
SELECT id | ||
FROM person | ||
WHERE team_id = 2 | ||
GROUP BY id | ||
HAVING max(is_deleted) = 0 | ||
AND argMax(person.created_at, version) < now() + INTERVAL 1 DAY | ||
AND has(['[email protected]'], replaceRegexpAll(JSONExtractRaw(properties, 'email'), '^"|"$', '')) | ||
ORDER BY argMax(person.created_at, version) DESC, id DESC | ||
LIMIT 100 SETTINGS optimize_aggregation_in_order = 1 | ||
''' | ||
# --- | ||
# name: TestPersonFromClickhouse.test_filter_person_list.3 | ||
''' | ||
/* user_id:0 request:_snapshot_ */ | ||
SELECT id | ||
FROM person | ||
WHERE team_id = 2 | ||
GROUP BY id | ||
HAVING max(is_deleted) = 0 | ||
AND argMax(person.created_at, version) < now() + INTERVAL 1 DAY | ||
AND has(['inexistent'], replaceRegexpAll(JSONExtractRaw(properties, 'email'), '^"|"$', '')) | ||
ORDER BY argMax(person.created_at, version) DESC, id DESC | ||
LIMIT 100 SETTINGS optimize_aggregation_in_order = 1 | ||
''' | ||
# --- | ||
# name: TestPersonFromClickhouse.test_filter_person_list.4 | ||
''' | ||
/* user_id:0 request:_snapshot_ */ | ||
SELECT id | ||
FROM person | ||
WHERE team_id = 2 | ||
GROUP BY id | ||
HAVING max(is_deleted) = 0 | ||
AND argMax(person.created_at, version) < now() + INTERVAL 1 DAY | ||
AND id IN | ||
(SELECT person_id | ||
FROM | ||
(SELECT distinct_id, | ||
argMax(person_id, version) as person_id | ||
FROM person_distinct_id2 | ||
WHERE team_id = 2 | ||
GROUP BY distinct_id | ||
HAVING argMax(is_deleted, version) = 0) | ||
where distinct_id = 'inexistent' ) | ||
ORDER BY argMax(person.created_at, version) DESC, id DESC | ||
LIMIT 100 SETTINGS optimize_aggregation_in_order = 1 | ||
''' | ||
# --- | ||
# name: TestPersonFromClickhouse.test_filter_person_prop | ||
''' | ||
/* user_id:0 request:_snapshot_ */ | ||
|