Skip to content

Commit

Permalink
Support new agate Integer type and test with empty seed
Browse files Browse the repository at this point in the history
  • Loading branch information
gshank committed Nov 7, 2023
1 parent dffea96 commit 761f47e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
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
4 changes: 2 additions & 2 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# install latest changes in dbt-core
# TODO: how to automate switching from develop to version branches?
git+https://github.com/dbt-labs/dbt-core.git#egg=dbt-core&subdirectory=core
git+https://github.com/dbt-labs/dbt-core.git#egg=dbt-tests-adapter&subdirectory=tests/adapter
git+https://github.com/dbt-labs/dbt-core.git@8895-agate_integer_conversion#egg=dbt-core&subdirectory=core
git+https://github.com/dbt-labs/dbt-core.git@8895-agate_integer_conversion#egg=dbt-tests-adapter&subdirectory=tests/adapter

# if version 1.x or greater -> pin to major version
# if version 0.x -> pin to minor
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 761f47e

Please sign in to comment.