PostHog/posthog

Bug: In Cohorts, the 'set' operator filters in null values for person properties

Open

#29,916 创建于 2025年3月13日

在 GitHub 查看
 (4 评论) (0 反应) (0 负责人)Python (988 fork)batch import
bugfeature/cohortsgood first issueteam/feature-flags

仓库指标

Star
 (16,704 star)
PR 合并指标
 (平均合并 17小时 29分钟) (30 天内合并 995 个 PR)

描述

Bug description

In Cohorts, 'set' operator filters in null values for person properties.

Expected outcome

  • 'set' should filter out null values
  • 'not set' should include null values

Using Have the property vs Does not have the property doesn't solve this because we want to filter out users who have the property but with a null value.

In filters, 'not set' filters in 'null while 'set' filters it out. This means there's an inconsistency with how we handle this in Cohorts.

How to reproduce

  1. Create a cohort and filter by having a person property that you know some users have null for and select 'set'
  2. notice the list of users includes users with 'null'

You can test with this cohort: https://us.posthog.com/project/53137/cohorts/122367

Additional context

From: https://posthoghelp.zendesk.com/agent/tickets/27021

Debug info

null

贡献者指南