Skip to content
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

Update malloy version. #136

Merged
merged 6 commits into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/malloy/data/bigquery/bq_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def _to_inner_struct_def(self, name, mode):
},
"structRelationship": {
"type": "nested",
"field": name,
"fieldName": name,
"isArray": False
} if mode == "REPEATED" else {
"type": "inline"
Expand All @@ -167,7 +167,7 @@ def _map_schema(self, schema):
elif metadata.field_type in self.TYPE_MAP:
field |= self.TYPE_MAP[metadata.field_type]
else:
field["type"] = "unsupported"
field["type"] = "sql native"
field["rawType"] = metadata.field_type.lower()
fields.append(field)

Expand All @@ -191,7 +191,7 @@ def _map_sql_block_schema(self, schema):
elif schema_field["type"] in self.TYPE_MAP:
field |= self.TYPE_MAP[schema_field["type"]]
else:
field["type"] = "unsupported"
field["type"] = "sql native"
field["rawType"] = schema_field["type"].lower()
fields.append(field)

Expand Down
4 changes: 2 additions & 2 deletions src/malloy/data/duckdb/duckdb_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def _map_fields(self, schema):
},
"structRelationship": {
"type": "nested" if is_array else "inline",
"field": name,
"fieldName": name,
"isArray": False,
},
"fields": self._map_fields(sub_schema),
Expand All @@ -205,7 +205,7 @@ def _map_fields(self, schema):
},
"structRelationship": {
"type": "nested",
"field": name,
"fieldName": name,
"isArray": True,
},
"fields": [{
Expand Down
12 changes: 8 additions & 4 deletions src/malloy/utils/third_party_licenses.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@
'grpcio-tools': {
METADATA_LICENSE_FILE: 'LICENSE'
},
'jinja2': {
METADATA_LICENSE_FILE: 'LICENSE.txt'
},
'jaraco-classes': {
METADATA_NAME: 'jaraco.classes'
},
Expand Down Expand Up @@ -115,6 +118,9 @@
'markdown-it-py': {
METADATA_LICENSE_FILE: 'LICENSE'
},
'markupsafe': {
METADATA_LICENSE_FILE: 'LICENSE.txt'
},
'more-itertools': {
METADATA_LICENSE_FILE: 'LICENSE'
},
Expand Down Expand Up @@ -167,10 +173,8 @@
METADATA_NAME: 'typing_extensions'
},
'uri-template': {
METADATA_URL:
'https://gitlab.linss.com/open-source/python/uri-template/-',
METADATA_LICENSE_FILE:
'LICENSE'
METADATA_URL: 'https://github.com/plinss/uri-template',
METADATA_LICENSE_FILE: 'LICENSE'
},
'webencodings': {
METADATA_LICENSE_FILE: 'LICENSE'
Expand Down
6 changes: 3 additions & 3 deletions tests/malloy/test_runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,10 @@ async def test_returns_sql(service_manager):
[sql, connection] = await rt.get_sql(query=query_by_state)
assert (sql == """
SELECT\x20
airports."state" as "state",
base."state" as "state",
COUNT(1) as "airport_count"
FROM 'data/airports.parquet' as airports
WHERE airports."state" IS NOT NULL
FROM 'data/airports.parquet' as base
WHERE base."state" IS NOT NULL
GROUP BY 1
ORDER BY 2 desc NULLS LAST
""".lstrip())
Expand Down
Loading