Skip to content

Commit ebcdaba

Browse files
lohanidamodarclaude
andcommitted
fix(tests): expect UnsupportedException for Nullable(Array)
ClickHouse does not support Nullable(Array(...)) — the schema compiler already throws an UnsupportedException with a message directing callers to use an empty array as the missing-value sentinel. The previous test asserted compiled SQL that the compiler refuses to emit. Mirror the sibling testArrayRejectsLowCardinalityWrap pattern. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent eb095cf commit ebcdaba

1 file changed

Lines changed: 4 additions & 9 deletions

File tree

tests/Query/Schema/ClickHouseTest.php

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1326,19 +1326,14 @@ public function testCreateTableArrayUnsignedInteger(): void
13261326
);
13271327
}
13281328

1329-
public function testCreateTableArrayNullable(): void
1329+
public function testArrayRejectsNullableWrap(): void
13301330
{
1331+
$this->expectException(UnsupportedException::class);
1332+
13311333
$schema = new Schema();
1332-
$result = $schema->table('events')
1333-
->bigInteger('id')->primary()
1334+
$schema->table('events')
13341335
->array('tags', ColumnType::String)->nullable()
13351336
->create();
1336-
$this->assertBindingCount($result);
1337-
1338-
$this->assertSame(
1339-
'CREATE TABLE `events` (`id` Int64, `tags` Nullable(Array(String))) ENGINE = MergeTree() ORDER BY (`id`)',
1340-
$result->query,
1341-
);
13421337
}
13431338

13441339
public function testArrayRejectsLowCardinalityWrap(): void

0 commit comments

Comments
 (0)