Skip to content

Commit

Permalink
Merge pull request #136 from malloydata/maden/update-malloy
Browse files Browse the repository at this point in the history
Update malloy version.
  • Loading branch information
gmaden authored Aug 28, 2024
2 parents abe7d21 + 31520eb commit fffa842
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 13 deletions.
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

0 comments on commit fffa842

Please sign in to comment.