Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/php-datatypes/src/Definition/Snowflake.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ class Snowflake extends Common
self::TYPE_GEOMETRY,
self::TYPE_VECTOR,
];
public const MAX_VARCHAR_LENGTH = 16777216;
public const DEFAULT_VARCHAR_LENGTH = 16777216;
public const MAX_VARCHAR_LENGTH = 134217728;
public const MAX_VARBINARY_LENGTH = 8388608;

/**
Expand Down
6 changes: 3 additions & 3 deletions packages/php-datatypes/tests/SnowflakeDatatypeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -216,10 +216,10 @@ public function testValidCharacterLengths(): void
new Snowflake('STRING');
new Snowflake('STRING', ['length' => '']);
new Snowflake('STRING', ['length' => '1']);
new Snowflake('STRING', ['length' => '16777216']);
new Snowflake('STRING', ['length' => '134217728']);
new Snowflake('STRING', [
'length' => [
'character_maximum' => '16777216',
'character_maximum' => '134217728',
],
]);
new Snowflake('STRING', [
Expand Down Expand Up @@ -444,7 +444,7 @@ public function invalidCharacterLengths(): array
return [
['a'],
['0'],
['16777217'],
['134217729'],
['-1'],
];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ private static function createNvarcharColumn(string $columnName): SnowflakeColum
new Snowflake(
Snowflake::TYPE_VARCHAR,
[
'length' => (string) Snowflake::MAX_VARCHAR_LENGTH,
'length' => (string) Snowflake::DEFAULT_VARCHAR_LENGTH,
'nullable' => true, // set all columns to be nullable
],
),
Expand Down