Skip to content

Commit

Permalink
Support new agate Integer type and test with empty seed (#936)
Browse files Browse the repository at this point in the history
* Support new agate Integer type and test with empty seed

* add changie, remove branch reference
  • Loading branch information
gshank authored Nov 7, 2023
1 parent dffea96 commit 0f39bd1
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .changes/unreleased/Fixes-20231107-134141.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Fixes
body: Support new agate Integer type and empty seed test
time: 2023-11-07T13:41:41.033441-05:00
custom:
Author: gshank
Issue: "935"
4 changes: 4 additions & 0 deletions dbt/adapters/spark/impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ def convert_number_type(cls, agate_table: agate.Table, col_idx: int) -> str:
decimals = agate_table.aggregate(agate.MaxPrecision(col_idx))
return "double" if decimals else "bigint"

@classmethod
def convert_integer_type(cls, agate_table: agate.Table, col_idx: int) -> str:
return "bigint"

@classmethod
def convert_date_type(cls, agate_table: agate.Table, col_idx: int) -> str:
return "date"
Expand Down
5 changes: 5 additions & 0 deletions tests/functional/adapter/test_simple_seed.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from dbt.tests.adapter.simple_seed.test_seed import BaseTestEmptySeed


class TestBigQueryEmptySeed(BaseTestEmptySeed):
pass

0 comments on commit 0f39bd1

Please sign in to comment.