Skip to content

Commit

Permalink
Update query snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Oct 12, 2024
1 parent e1669d9 commit 2f63510
Showing 1 changed file with 250 additions and 0 deletions.
250 changes: 250 additions & 0 deletions posthog/api/test/__snapshots__/test_person.ambr
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_ */
Expand Down Expand Up @@ -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_ */
Expand Down

0 comments on commit 2f63510

Please sign in to comment.