datacontract/datacontract-cli

Breaking method is not working with bigint columns

teoria opened this issue · 7 comments

When you compare 2 contracts with bigint and long column must be equal.


datacontract breaking  contract_v1.yaml contract_v2_glue.yml

1 breaking changes: 1 error, 0 warning
error   [field_type_updated] at contract_v2_glue.yml
        in my_table.fields.my_column.type
            changed from `bigint` to `long`

@teoria I don't think that AWS Glue supports long data type. I've only seen bigint data type in their UI once tried to create a table:
image

image

@roykoand when i use the glue importer the code cast bigint to long
then when i call breaking the cli identify the type update.
the breaking method need ignore bigint->long or the import need keep bigint type

@teoria yes, I agree. Data contract should keep bigint data type. This line is a culprit:

if sql_type.startswith("long") or sql_type.startswith("bigint"):

or breaking ignore the bigint->long
@jochenchrist what do you think ?

lets change the importer to keep bigint

fixed with #351.

Will be part of release v0.10.12