How to pass flags to re_search for Postgres #9057
-
I am trying to write a query that will use a regular expression to filter data. I am using a postgres backend. Here is an example: con = ibis.postgres.connect()
x = con.table("x")
ibis.to_sql(
x
.filter([x.body.re_search('kubernetes')])
.limit(10)
)
SELECT
t0.ticket_id,
t0.body
FROM x AS t0
WHERE
t0.body ~ 'kubernetes'
LIMIT 10 This mostly works! It performs the regex search as expected. However, I would like to add flags, such as the I dug into the code and have a few findings:
regexp_like('Hello World', 'world') false
regexp_like('Hello World', 'world', 'i') true Is there a clean way to pass flags with ibis? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
We don't expose this in any of our regular expression APIs. It's probably worth exploring how these flags are exposed and whether it makes sense for Ibis to expose them. |
Beta Was this translation helpful? Give feedback.
We don't expose this in any of our regular expression APIs. It's probably worth exploring how these flags are exposed and whether it makes sense for Ibis to expose them.