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 Aug 8, 2024
1 parent a98b8cf commit f63fa8a
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 51 deletions.
18 changes: 9 additions & 9 deletions posthog/api/test/__snapshots__/test_insight.ambr
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
AND event IN ['user did things', 'user signed up']
AND toTimeZone(timestamp, 'UTC') >= toDateTime('2012-01-08 00:00:00', 'UTC')
AND toTimeZone(timestamp, 'UTC') <= toDateTime('2012-01-15 23:59:59', 'UTC')
AND (and(ifNull(less(accurateCastOrNull(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(properties, 'int_value'), ''), 'null'), '^"|"$', ''), 'Int64'), 10), 0), 1))
AND (and(ifNull(less(accurateCastOrNull(has(events.properties_group_custom, 'int_value') ? events.properties_group_custom['int_value'] : null, 'Int64'), 10), 0), 1))
GROUP BY value
ORDER BY count DESC, value DESC
LIMIT 26
Expand Down Expand Up @@ -107,7 +107,7 @@
AND event IN ['user did things', 'user signed up']
AND toTimeZone(timestamp, 'UTC') >= toDateTime('2012-01-08 00:00:00', 'UTC')
AND toTimeZone(timestamp, 'UTC') <= toDateTime('2012-01-15 23:59:59', 'UTC')
AND (and(ifNull(less(accurateCastOrNull(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(properties, 'int_value'), ''), 'null'), '^"|"$', ''), 'Int64'), 10), 0), 1))
AND (and(ifNull(less(accurateCastOrNull(has(events.properties_group_custom, 'int_value') ? events.properties_group_custom['int_value'] : null, 'Int64'), 10), 0), 1))
AND (step_0 = 1
OR step_1 = 1) )))
WHERE step_0 = 1 ))
Expand Down Expand Up @@ -182,7 +182,7 @@
AND event IN ['user did things', 'user signed up']
AND toTimeZone(timestamp, 'UTC') >= toDateTime('2012-01-08 00:00:00', 'UTC')
AND toTimeZone(timestamp, 'UTC') <= toDateTime('2012-01-15 23:59:59', 'UTC')
AND ((and(ifNull(less(accurateCastOrNull(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(properties, 'int_value'), ''), 'null'), '^"|"$', ''), 'Int64'), 10), 0), 1))
AND ((and(ifNull(less(accurateCastOrNull(has(events.properties_group_custom, 'int_value') ? events.properties_group_custom['int_value'] : null, 'Int64'), 10), 0), 1))
AND (ifNull(like(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(person_properties, 'fish'), ''), 'null'), '^"|"$', ''), '%fish%'), 0)))
AND (step_0 = 1
OR step_1 = 1) ))
Expand Down Expand Up @@ -227,11 +227,11 @@
pdi.person_id as person_id,
person.person_props as person_props,
if(event = 'user signed up'
AND (and(ifNull(less(accurateCastOrNull(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(properties, 'int_value'), ''), 'null'), '^"|"$', ''), 'Int64'), 10), 0), 1)
AND (and(ifNull(less(accurateCastOrNull(has(events.properties_group_custom, 'int_value') ? events.properties_group_custom['int_value'] : null, 'Int64'), 10), 0), 1)
AND ifNull(like(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(person_properties, 'fish'), ''), 'null'), '^"|"$', ''), '%fish%'), 0)), 1, 0) as step_0,
if(step_0 = 1, timestamp, null) as latest_0,
if(event = 'user did things'
AND (and(ifNull(less(accurateCastOrNull(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(properties, 'int_value'), ''), 'null'), '^"|"$', ''), 'Int64'), 10), 0), 1)
AND (and(ifNull(less(accurateCastOrNull(has(events.properties_group_custom, 'int_value') ? events.properties_group_custom['int_value'] : null, 'Int64'), 10), 0), 1)
AND ifNull(like(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(person_properties, 'fish'), ''), 'null'), '^"|"$', ''), '%fish%'), 0)), 1, 0) as step_1,
if(step_1 = 1, timestamp, null) as latest_1
FROM events e
Expand Down Expand Up @@ -271,7 +271,7 @@
# name: TestInsight.test_insight_trend_hogql_breakdown
'''
/* user_id:0 request:_snapshot_ */
SELECT if(ifNull(less(accurateCastOrNull(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(properties, 'int_value'), ''), 'null'), '^"|"$', ''), 'Int64'), 10), 0), 'le%ss', 'more') AS value,
SELECT if(ifNull(less(accurateCastOrNull(has(events.properties_group_custom, 'int_value') ? events.properties_group_custom['int_value'] : null, 'Int64'), 10), 0), 'le%ss', 'more') AS value,
count(*) as count
FROM events e
WHERE team_id = 2
Expand Down Expand Up @@ -313,7 +313,7 @@
day_start
UNION ALL SELECT count(*) as total,
toStartOfDay(toTimeZone(toDateTime(timestamp, 'UTC'), 'UTC')) as day_start,
transform(ifNull(nullIf(if(ifNull(less(accurateCastOrNull(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(properties, 'int_value'), ''), 'null'), '^"|"$', ''), 'Int64'), 10), 0), 'le%ss', 'more'), ''), '$$_posthog_breakdown_null_$$'), (['more', 'le%ss']), (['more', 'le%ss']), '$$_posthog_breakdown_other_$$') as breakdown_value
transform(ifNull(nullIf(if(ifNull(less(accurateCastOrNull(has(events.properties_group_custom, 'int_value') ? events.properties_group_custom['int_value'] : null, 'Int64'), 10), 0), 'le%ss', 'more'), ''), '$$_posthog_breakdown_null_$$'), (['more', 'le%ss']), (['more', 'le%ss']), '$$_posthog_breakdown_other_$$') as breakdown_value
FROM events e
WHERE e.team_id = 2
AND event = '$pageview'
Expand Down Expand Up @@ -458,7 +458,7 @@
AND event = '$pageview'
AND toTimeZone(timestamp, 'UTC') >= toDateTime(toStartOfDay(toDateTime('2012-01-08 00:00:00', 'UTC')), 'UTC')
AND toTimeZone(timestamp, 'UTC') <= toDateTime('2012-01-15 23:59:59', 'UTC')
AND ((and(ifNull(greater(accurateCastOrNull(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(properties, 'int_value'), ''), 'null'), '^"|"$', ''), 'Int64'), 10), 0), 1))
AND ((and(ifNull(greater(accurateCastOrNull(has(events.properties_group_custom, 'int_value') ? events.properties_group_custom['int_value'] : null, 'Int64'), 10), 0), 1))
AND (ifNull(like(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(person_properties, 'fish'), ''), 'null'), '^"|"$', ''), '%fish%'), 0)))
GROUP BY date)
GROUP BY day_start
Expand Down Expand Up @@ -582,7 +582,7 @@
AND event = '$pageview'
AND toTimeZone(timestamp, 'UTC') >= toDateTime(toStartOfDay(toDateTime('2012-01-08 00:00:00', 'UTC')), 'UTC')
AND toTimeZone(timestamp, 'UTC') <= toDateTime('2012-01-15 23:59:59', 'UTC')
AND (and(ifNull(less(accurateCastOrNull(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(properties, 'int_value'), ''), 'null'), '^"|"$', ''), 'Int64'), 10), 0), 1)
AND (and(ifNull(less(accurateCastOrNull(has(events.properties_group_custom, 'int_value') ? events.properties_group_custom['int_value'] : null, 'Int64'), 10), 0), 1)
AND ifNull(like(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(person_properties, 'fish'), ''), 'null'), '^"|"$', ''), '%fish%'), 0))
GROUP BY date)
GROUP BY day_start
Expand Down
Loading

0 comments on commit f63fa8a

Please sign in to comment.