Skip to content

Commit bc27a8e

Browse files
authored
Merge branch 'main' into singlestoredb
2 parents 9c0ba5c + 7c8fcf7 commit bc27a8e

File tree

3 files changed

+39
-14
lines changed

3 files changed

+39
-14
lines changed

compose.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ services:
109109
- mssql
110110

111111
hive-metastore-db:
112-
image: postgres:17.6-alpine
112+
image: postgres:18.0-alpine
113113
environment:
114114
POSTGRES_USER: admin
115115
POSTGRES_PASSWORD: admin
@@ -188,7 +188,7 @@ services:
188188
test:
189189
- CMD-SHELL
190190
- trino --output-format null --execute 'show schemas in hive; show schemas in memory'
191-
image: trinodb/trino:476
191+
image: trinodb/trino:477
192192
ports:
193193
- 8080:8080
194194
networks:
@@ -199,7 +199,7 @@ services:
199199
- $PWD/docker/trino/jvm.config:/etc/trino/jvm.config:ro
200200

201201
druid-postgres:
202-
image: postgres:17.6-alpine
202+
image: postgres:18.0-alpine
203203
container_name: druid-postgres
204204
environment:
205205
POSTGRES_PASSWORD: FoolishPassword

ibis/backends/tests/test_client.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1732,9 +1732,7 @@ def test_cross_database_join(con_create_database, monkeypatch):
17321732
@pytest.mark.notimpl(["clickhouse"], reason="create table isn't implemented")
17331733
@pytest.mark.notyet(["flink"], raises=AttributeError, reason="no _safe_raw_sql method")
17341734
@pytest.mark.notyet(["polars"], reason="Doesn't support insert")
1735-
@pytest.mark.notimpl(
1736-
["impala", "trino"], reason="Default constraints are not supported"
1737-
)
1735+
@pytest.mark.notimpl(["impala"], reason="Default constraints are not supported")
17381736
@pytest.mark.notimpl(
17391737
["databricks"],
17401738
reason="Default constraints ARE supported, "

ibis/expr/types/generic.py

Lines changed: 35 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,9 +1166,17 @@ def collect(
11661166
).to_expr()
11671167

11681168
def identical_to(self, other: Value, /) -> ir.BooleanValue:
1169-
"""Return whether this expression is identical to other.
1169+
"""Like `==`, but always returns non-NULL, even when comparing NULLs.
11701170
1171-
Corresponds to `IS NOT DISTINCT FROM` in SQL.
1171+
With regular equality, `NULL == <anything>` is always `NULL`,
1172+
even for `NULL == NULL`.
1173+
1174+
In contrast, `identical_to` treats `NULL` as a singleton value, so that
1175+
1176+
- `NULL.identical_to(NULL)` is `True`.
1177+
- `NULL.identical_to(<non-null>)` is `False`.
1178+
1179+
This corresponds to `IS NOT DISTINCT FROM` in SQL.
11721180
11731181
Parameters
11741182
----------
@@ -1184,12 +1192,31 @@ def identical_to(self, other: Value, /) -> ir.BooleanValue:
11841192
--------
11851193
>>> import ibis
11861194
>>> ibis.options.interactive = True
1187-
>>> one = ibis.literal(1)
1188-
>>> two = ibis.literal(2)
1189-
>>> two.identical_to(one + one)
1190-
┌──────┐
1191-
│ True │
1192-
└──────┘
1195+
>>> t = ibis.memtable(
1196+
... [
1197+
... (1, 1),
1198+
... (1, 2),
1199+
... (1, None),
1200+
... (None, None),
1201+
... ],
1202+
... schema={"a": "int64", "b": "int64"},
1203+
... )
1204+
>>> t.mutate(
1205+
... eq=_.a == _.b,
1206+
... neq=_.a != _.b,
1207+
... identical=_.a.identical_to(_.b),
1208+
... not_identical=~_.a.identical_to(_.b),
1209+
... )
1210+
┏━━━━━━━┳━━━━━━━┳━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
1211+
┃ a ┃ b ┃ eq ┃ neq ┃ identical ┃ not_identical ┃
1212+
┡━━━━━━━╇━━━━━━━╇━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
1213+
│ int64 │ int64 │ boolean │ boolean │ boolean │ boolean │
1214+
├───────┼───────┼─────────┼─────────┼───────────┼───────────────┤
1215+
│ 1 │ 1 │ True │ False │ True │ False │
1216+
│ 1 │ 2 │ False │ True │ False │ True │
1217+
│ 1 │ NULL │ NULL │ NULL │ False │ True │
1218+
│ NULL │ NULL │ NULL │ NULL │ True │ False │
1219+
└───────┴───────┴─────────┴─────────┴───────────┴───────────────┘
11931220
"""
11941221
try:
11951222
return ops.IdenticalTo(self, other).to_expr()

0 commit comments

Comments
 (0)