Skip to content

Commit ea4ee60

Browse files
authored
Merge pull request #57 from keboola/jirka-exasol-default-length-for-numeric
KBC-2782 numeric default length has decimal part
2 parents 10cd4d4 + f913638 commit ea4ee60

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/Definition/Exasol.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class Exasol extends Common
5757
public const TYPE_REAL = 'REAL'; // REAL = DOUBLE PRECISION
5858

5959
// default lengths for different kinds of types. Used max values
60-
public const MAX_DECIMAL_LENGTH = '36,36'; // max is 36.36, default 18,0
60+
public const MAX_DECIMAL_LENGTH = '36,18'; // max is 36 digits, lets split them, default 18,0
6161
public const MAX_CHAR_LENGTH = 2000;
6262
public const MAX_VARCHAR_LENGTH = 2_000_000;
6363
public const MAX_GEOMETRY_LENGTH = 4_294_967_295; // max value

tests/ExasolDatatypeTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,11 +135,11 @@ public function testSqlDefinition(string $type, array $options, string $expected
135135
public function expectedSqlDefinitions(): array
136136
{
137137
return [
138-
'DECIMAL' => ['DECIMAL', [], 'DECIMAL (36,36)'],
139-
'DEC' => ['DEC', [], 'DEC (36,36)'],
138+
'DECIMAL' => ['DECIMAL', [], 'DECIMAL (36,18)'],
139+
'DEC' => ['DEC', [], 'DEC (36,18)'],
140140
'NUMBER' => ['NUMBER', [], 'DOUBLE PRECISION'],
141141
'NUMBER WITH LENGTH' => ['NUMBER', ['length' => '20,20'], 'NUMBER (20,20)'],
142-
'NUMERIC' => ['NUMERIC', [], 'NUMERIC (36,36)'],
142+
'NUMERIC' => ['NUMERIC', [], 'NUMERIC (36,18)'],
143143

144144
'CHAR' => ['CHAR', [], 'CHAR (2000)'],
145145
'NCHAR' => ['NCHAR', [], 'NCHAR (2000)'],

0 commit comments

Comments
 (0)