Skip to content

Commit

Permalink
source-oracle-flashback: add testcase for the broken task
Browse files Browse the repository at this point in the history
  • Loading branch information
mdibaiee committed Dec 17, 2024
1 parent 235a06a commit 2fc6ece
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,12 @@ properties:
default: ~
format: number
title: Num
NUM104:
anyOf:
- type: number
- type: "null"
default: ~
title: Num104
NUM15:
anyOf:
- type: integer
Expand Down
2 changes: 1 addition & 1 deletion source-oracle-flashback/source_oracle_flashback/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ def build_table(
field_type: type[int | str | datetime | float | Decimal]
field_schema_extra: dict | None = None

if col.data_type == col.Type.NUMBER and col.data_scale == 0 :
if col.data_type == col.Type.NUMBER and col.data_scale == 0:
# data_precision: 0 defaults to precision 38
if col.data_precision > 18 or col.data_precision == 0:
field_type = Decimal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ CREATE TABLE flow_test.test_all_types(
num NUMBER (38, 9),
num19 NUMBER (19, 0),
num15 NUMBER (15, 0),
num104 NUMBER (10, 4),
small_int SMALLINT,
integ INTEGER,
double_precision DOUBLE PRECISION,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ INSERT INTO flow_test.test_all_types(
num,
num19,
num15,
num104,
small_int,
integ,
double_precision,
Expand All @@ -33,6 +34,7 @@ INSERT INTO flow_test.test_all_types(
123456789.123456789,
1234567891234567891,
123456789123456,
123456.3456,
123456789,
18446744073709551615,
123456789.123456789,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"INTERVAL_DAY": "+01 02:03:04.567000",
"INTERVAL_YEAR": "+1234-05",
"NUM": "123456789.123456789",
"NUM104": 123456.3456,
"NUM15": 123456789123456,
"NUM19": "1234567891234567891",
"NVCHAR2": "nvarchar2 value with unicode characters \u2764\ufe0f \ud83d\udd25\ufe0f",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,18 @@
"format": "number",
"title": "Num"
},
"NUM104": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Num104"
},
"NUM15": {
"anyOf": [
{
Expand Down

0 comments on commit 2fc6ece

Please sign in to comment.