Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CT-1169 add parsing of precision&scale to SNFLK #127

Merged
merged 10 commits into from
Feb 15, 2024
10 changes: 5 additions & 5 deletions packages/php-datatypes/tests/SnowflakeDatatypeTest.php
Original file line number Diff line number Diff line change
@@ -384,7 +384,7 @@ public function testGetTypeByBasetype(): void
}

/**
* @param array $expectedArray
* @param array<string, mixed> $expectedArray
* @dataProvider arrayFromLengthProvider
*/
public function testArrayFromLength(string $type, ?string $length, array $expectedArray): void
@@ -398,22 +398,22 @@ public function arrayFromLengthProvider(): Generator
yield 'simple' => [
'VARCHAR',
'10',
['character_maximum' => '10']
['character_maximum' => '10'],
];
yield 'decimal' => [
'NUMERIC',
'38,2',
['numeric_precision' => 38, 'numeric_scale' => 2]
['numeric_precision' => 38, 'numeric_scale' => 2],
];
yield 'with zero scale' => [
'NUMERIC',
'38,0',
['numeric_precision' => 38, 'numeric_scale' => 0]
['numeric_precision' => 38, 'numeric_scale' => 0],
];
yield 'with null length' => [
'NUMERIC',
null,
[]
[],
];
}
}