fakesnow 0.5.0__tar.gz → 0.5.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {fakesnow-0.5.0/fakesnow.egg-info → fakesnow-0.5.1}/PKG-INFO +1 -1
- {fakesnow-0.5.0 → fakesnow-0.5.1}/fakesnow/fakes.py +1 -1
- {fakesnow-0.5.0 → fakesnow-0.5.1/fakesnow.egg-info}/PKG-INFO +1 -1
- {fakesnow-0.5.0 → fakesnow-0.5.1}/pyproject.toml +1 -1
- {fakesnow-0.5.0 → fakesnow-0.5.1}/tests/test_fakes.py +14 -0
- {fakesnow-0.5.0 → fakesnow-0.5.1}/LICENSE +0 -0
- {fakesnow-0.5.0 → fakesnow-0.5.1}/MANIFEST.in +0 -0
- {fakesnow-0.5.0 → fakesnow-0.5.1}/README.md +0 -0
- {fakesnow-0.5.0 → fakesnow-0.5.1}/fakesnow/__init__.py +0 -0
- {fakesnow-0.5.0 → fakesnow-0.5.1}/fakesnow/checks.py +0 -0
- {fakesnow-0.5.0 → fakesnow-0.5.1}/fakesnow/expr.py +0 -0
- {fakesnow-0.5.0 → fakesnow-0.5.1}/fakesnow/fixtures.py +0 -0
- {fakesnow-0.5.0 → fakesnow-0.5.1}/fakesnow/info_schema.py +0 -0
- {fakesnow-0.5.0 → fakesnow-0.5.1}/fakesnow/py.typed +0 -0
- {fakesnow-0.5.0 → fakesnow-0.5.1}/fakesnow/transforms.py +0 -0
- {fakesnow-0.5.0 → fakesnow-0.5.1}/fakesnow.egg-info/SOURCES.txt +0 -0
- {fakesnow-0.5.0 → fakesnow-0.5.1}/fakesnow.egg-info/dependency_links.txt +0 -0
- {fakesnow-0.5.0 → fakesnow-0.5.1}/fakesnow.egg-info/requires.txt +0 -0
- {fakesnow-0.5.0 → fakesnow-0.5.1}/fakesnow.egg-info/top_level.txt +0 -0
- {fakesnow-0.5.0 → fakesnow-0.5.1}/setup.cfg +0 -0
- {fakesnow-0.5.0 → fakesnow-0.5.1}/setup.py +0 -0
- {fakesnow-0.5.0 → fakesnow-0.5.1}/tests/test_checks.py +0 -0
- {fakesnow-0.5.0 → fakesnow-0.5.1}/tests/test_expr.py +0 -0
- {fakesnow-0.5.0 → fakesnow-0.5.1}/tests/test_patch.py +0 -0
- {fakesnow-0.5.0 → fakesnow-0.5.1}/tests/test_transforms.py +0 -0
@@ -276,7 +276,7 @@ class FakeSnowflakeCursor:
|
|
276
276
|
def as_result_metadata(column_name: str, column_type: str, _: str) -> ResultMetadata:
|
277
277
|
# see https://docs.snowflake.com/en/user-guide/python-connector-api.html#type-codes
|
278
278
|
# and https://arrow.apache.org/docs/python/api/datatypes.html#type-checking
|
279
|
-
if column_type
|
279
|
+
if column_type in {"BIGINT", "INTEGER"}:
|
280
280
|
return ResultMetadata(
|
281
281
|
name=column_name, type_code=0, display_size=None, internal_size=None, precision=38, scale=0, is_nullable=True # noqa: E501
|
282
282
|
)
|
@@ -234,6 +234,20 @@ def test_describe(cur: snowflake.connector.cursor.SnowflakeCursor):
|
|
234
234
|
assert cur.description == expected_metadata
|
235
235
|
|
236
236
|
|
237
|
+
def test_describe_info_schema(cur: snowflake.connector.cursor.SnowflakeCursor):
|
238
|
+
# tests we can handle the column types returned from the info schema, which are created by duckdb
|
239
|
+
# and so don't go through our transforms
|
240
|
+
cur.execute("select column_name, ordinal_position from information_schema.columns")
|
241
|
+
# fmt: off
|
242
|
+
expected_metadata = [
|
243
|
+
ResultMetadata(name='column_name', type_code=2, display_size=None, internal_size=16777216, precision=None, scale=None, is_nullable=True),
|
244
|
+
ResultMetadata(name='ordinal_position', type_code=0, display_size=None, internal_size=None, precision=38, scale=0, is_nullable=True)
|
245
|
+
]
|
246
|
+
# fmt: on
|
247
|
+
|
248
|
+
assert cur.description == expected_metadata
|
249
|
+
|
250
|
+
|
237
251
|
def test_executemany(cur: snowflake.connector.cursor.SnowflakeCursor):
|
238
252
|
cur.execute("create table customers (ID int, FIRST_NAME varchar, LAST_NAME varchar)")
|
239
253
|
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|