New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Comment/description support, bug fixes and better test coverage #138
Merged
Merged
Changes from 1 commit
Commits
Show all changes
159 commits
Select commit
Hold shift + click to select a range
0fc64fa
Fixed a dependency problem that caysed test failures in Python 3.6.
jimfulton bfdda68
Started implementing SqlAlchemy dialect-compliance tests
jimfulton 41cb2dd
Handle parameters in in
jimfulton 631c060
fixed regex to allow multi-character parameter names.
jimfulton aa85cb9
Fixed rendering of string literals.
jimfulton c7da257
Provide default values for primary keys and other fixes...
jimfulton 3916239
Narrowed skips and license comment diagnosed reasons for skipped fail…
jimfulton 46b30b4
use Google license
jimfulton 36a0033
Fixed like (% and _) escapes.
jimfulton d079fbe
Handle BIGNUMERIC
jimfulton 7e60691
Skip tests that want to stpre floats as numeric.
jimfulton 4a1bafd
skip tests for offsets without limits. BigQuery doesn't allow that.
jimfulton e07b1f0
BIGNUMERIC lets us handle many significant digits.test_many_significa…
jimfulton 656af06
Skip LongNameBlowoutTest because it requires features (indexes, prima…
jimfulton a085db6
We have to rewrite these tests, because of forcing use_labels=True
jimfulton 681ea47
BigQuery returns deleted and updated rows, which SQLAlchemy doesn't e…
jimfulton cde5bf8
Fixed a dependency problem that caysed test failures in Python 3.6.
jimfulton 76cf078
Provide a bigquery mock based on sqlite
jimfulton ee46a1e
Don't force labels in select.
jimfulton 62432a3
merge riversnake-fix-78
jimfulton a54b946
No need to work around forced labels anymore.
jimfulton 1320f32
Updated sqlite-bases mock
jimfulton 4f098fd
Added test that types are injected into parameter placeholders.
jimfulton 2c76342
Oops, need to call super even when there are where clauses.
jimfulton 68f9043
When SQLAlchemy thinks it knows a parameter type, include it in the p…
jimfulton be1e215
Don't skip some numeric tests and skip some CTE tests
jimfulton 39f1955
Can't coerce datetime to date.
jimfulton 9e266f2
reenable some tests now that we pass type infor to bigquery
jimfulton fa84c95
Enable error on warnings -- a test depends on it.
jimfulton b01d2ce
Added table and column comment support.
jimfulton dc91449
get_schema_names should return all of the schema names.
jimfulton 3743abe
Retrieval of view definitions.
jimfulton dcc7e45
handle dateish literals.
jimfulton 163d031
BigQuery doesn't want schema names in column names.
jimfulton c47a83d
Allow mutating table descriptions/comments.
jimfulton 9444c20
skip tests that depend on BigQuery keeping track of column details.
jimfulton 30c8ed7
Handle TIMESTAMP literals.
jimfulton 0ef4909
Fixed some broken TIMESTAMP tests.
jimfulton 99629cf
enabled more tests.
jimfulton 5e6e48d
remove extra lines.
jimfulton 83feb1e
blacken
jimfulton 896a082
added missing test for api.py
jimfulton 497cc90
Ignore flake8 complaint about * import.
jimfulton 7e5399a
lint and minor cleanup
jimfulton e48dd58
Removed unused variable.
jimfulton 395a2d4
Get to 100% coverage in test_parse_url
jimfulton 07af7ef
Don't need because we can't test temp tables
jimfulton ea99108
requirements.py -- It's used by compliance testing.
jimfulton 7039f05
Added Binary literal handling, and ...
jimfulton 0f2d315
Updated fauxdb to correct for some sqlite differences.
jimfulton 9db1e3b
Fixed santy check
jimfulton 50e3448
blackened
jimfulton f449c5e
Added a test that exercises type handling for all the types.
jimfulton d000075
Added table reference tests
jimfulton 190136e
test get_view_definition
jimfulton acdd4d2
removed a private function that's never called.
jimfulton 3e73a0a
table and view list tests
jimfulton 4c6d72d
Moar unit tests and coverage
jimfulton 349269f
use latest bg release, because we depend on changes there.
jimfulton 717dd77
removed breakpoint that shouldn't have been checked in.
jimfulton 7ba7813
Bypass google authentication.
jimfulton c22565e
Test JSON deserialization.
jimfulton dc246ae
Test getting project id from authentication.
jimfulton b914ee3
removed some unneeded code.
jimfulton a7e49e9
Simplify string and binary literal processors to not expect None.
jimfulton 53883d5
Tested comment support
jimfulton 5b1e77e
Cleaned up comment handling.
jimfulton beaf0b6
generalized options handling.
jimfulton 8236d5b
test dialect-options handling.
jimfulton 8e41b4d
constraints are ignored.
jimfulton e9c5175
Better binary-literal hack
jimfulton 7835d2c
added tests for BIGNUMERIC.
jimfulton dda37eb
Major rework using pickle to overcome type differences.
jimfulton b774f79
Added array support
jimfulton 7a31d12
blacken
jimfulton 78be3cf
replaced an unreachable branch with an assert.
jimfulton 297e532
lint
jimfulton 0adebe1
Enable generation of random primary keys when running compliance tests.
jimfulton 21121e9
Run the select a couple of ways and assert result.
jimfulton b942a61
Only generate random primary keys when running compliance tests.
jimfulton 4aeb0db
addd fetchall, needed by a test.
jimfulton a8add9e
Port compliance tests
jimfulton 04aaee4
record when array size is set.
jimfulton 0e081a0
Added a tiny metadata convenience.
jimfulton 6fe196e
Added arraysize tests.
jimfulton 67733fd
exercise labels
jimfulton 725c5d5
Make sure label names are legal identifiers
jimfulton cb56463
test disable quoting
jimfulton 58c3d55
simplifed a test.
jimfulton d8e464a
Test forcing quote (even though quotes are forced anyway)
jimfulton fabd4c6
Be more careful about doubled %s.
jimfulton 5cf4009
ported test for %%s
jimfulton 33642ff
Added IN tests.
jimfulton 401ad3b
handle UNNEST
jimfulton 2313f54
"inlined" some helper attrs
jimfulton 7e57563
moved setup_table to central location
jimfulton 534a819
ported a test that deals with bind params with indeterminate types
jimfulton 32f6b95
leverage setup_table
jimfulton c762a9c
added a test based on sqlalchemy.testing.suite.test_select.LikeFuncti…
jimfulton 492530b
leverage setup_table
jimfulton 15ba275
Added test for labels in group by
jimfulton a65bd1a
Added a test for compiling a single column.
jimfulton ab873aa
Trying to compile a nameless column gives a meaningful error.
jimfulton b1224c3
Get 100% coverage of fauxdbi
jimfulton ba21553
Simplified quote decision.
jimfulton 445832e
Specify proto 4 when pickling, to get predictable behavior across Pyt…
jimfulton 2ef50bd
Some tests require sqlalchemy 1.3
jimfulton 5cd127a
require 100% test coverage.
jimfulton ed81f2c
need newer sqlalchemy and google-auth
jimfulton 28e4f40
need sqlalchemy 1.2 because comments.
jimfulton 9616813
blacken/lint
jimfulton 0b1e85e
Added code to cleanup schemas at start to avoid spurious errors.
jimfulton 00d61f4
added copyright
jimfulton c58f5f1
added copyright
jimfulton 7e826e1
fixed copyright
jimfulton b469f3f
Updated the compliance setup
jimfulton c021366
added copyright
jimfulton 5af39be
added copyright
jimfulton a2e92a3
added copyright
jimfulton e85558b
added copyright
jimfulton c683b52
added copyright
jimfulton b7bc62b
blacken
jimfulton 69c1d40
merge master
jimfulton 62d8df2
Make operational errors more informative.
jimfulton b2ac135
Fixed better debugging support.
jimfulton e5e9786
lint first
jimfulton 7625e61
Don't use upsert to update comments.
jimfulton 410b9ac
Older sqlite don't have true and false.
jimfulton 0b8e3f0
Ignore test debugging info added to deal with sqlite3 differences.
jimfulton fa303d7
blacken
jimfulton 87f2846
Added minimal requirement for google-api-core to be consistent with s…
jimfulton dc28277
Make the google-auth requirement consistent with the Python 3.6 test …
jimfulton 159fd18
chore(revert): revert preventing normalization (#132)
dandhlee 05528af
Explain why we add where clauses in delete statements that lack them
jimfulton 2db2dd4
Added a missing _ and explained \d+s in a regex
jimfulton 8ea13de
Fixed: didn't properly handle expansion of single-item arrays.
jimfulton ae03721
Added test for expansion of single-element arrays
jimfulton 486873b
Avoid having to use an `_` to ignore a re group we don't care about.
jimfulton a897d60
Added some comments for the tricky _get_field method.
jimfulton 6e4d5d6
Commented the pickle-protocol 4 prefixes we're looking for.
jimfulton 708f5db
explain use of pickle.
jimfulton eeaae87
typo
jimfulton ce6181f
BigQuery 2.15 wants google-api-core >= 1.23.0
jimfulton 877106b
blacken
jimfulton ddd3399
don't need to call out the project in the test config.
jimfulton e063e3e
Try sleeping between tests to see if we can avoid some weird failures.
jimfulton 7530acf
some minimal docs on the dialect tests.
jimfulton 4d99090
Update tests/sqlalchemy_dialect_compliance/README.rst
jimfulton 6b2a6b6
Update tests/sqlalchemy_dialect_compliance/README.rst
jimfulton bc40df2
simplify by getting rid of unnecessary and broken overrriding.
jimfulton ec4961c
merge upstream
jimfulton 16e302d
Try sleeping longer to avoid races between tests.
jimfulton 1e11ce2
make sure we wait for the drops at the beginning of the session.
jimfulton ff35acf
rerun on table not found
jimfulton b4c3c23
Try simpler regex
jimfulton 18ebe26
Try different error
jimfulton fbbd563
don't sleep between tests.
jimfulton a103ae8
blacken
jimfulton 5809a9c
removed unused import
jimfulton File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I understood correctly,
custom
, by design, can never containname
,type
, ornotnull
keys?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Design? You give me so much credit! ;) You may be right. I can imagine overriding type, especially when dealing with arrays and structs, although I may be able to automate that using naming patterns. (e.g. array_int_ or somesuch).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You probably know better. :)
If we want to use overriding, the code needs to be changed to avoid errors (duplicate keyword arguments), otherwise we can leave it as is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed the overriding. If we need it later, we can add it then.