Skip to content

Commit

Permalink
Merge branch 'main' into crs-access-modifiers-2
Browse files Browse the repository at this point in the history
  • Loading branch information
christopherswenson committed Dec 12, 2024
2 parents 6704824 + 94f98d0 commit 70da6d2
Show file tree
Hide file tree
Showing 130 changed files with 3,447 additions and 1,624 deletions.
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"useNx": false,
"version": "0.0.218",
"version": "0.0.222",
"command": {
"version": {
"allowBranch": "main"
Expand Down
78 changes: 34 additions & 44 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/malloy-db-bigquery/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@malloydata/db-bigquery",
"version": "0.0.218",
"version": "0.0.222",
"license": "MIT",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand All @@ -25,7 +25,7 @@
"@google-cloud/bigquery": "^7.3.0",
"@google-cloud/common": "^5.0.1",
"@google-cloud/paginator": "^5.0.0",
"@malloydata/malloy": "^0.0.218",
"@malloydata/malloy": "^0.0.222",
"gaxios": "^4.2.0"
}
}
11 changes: 2 additions & 9 deletions packages/malloy-db-bigquery/src/bigquery_connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import {ResourceStream} from '@google-cloud/paginator';
import * as googleCommon from '@google-cloud/common';
import {GaxiosError} from 'gaxios';
import {
arrayEachFields,
mkArrayDef,
Connection,
ConnectionConfig,
Malloy,
Expand Down Expand Up @@ -520,14 +520,7 @@ export class BigQueryConnection
// Malloy treats repeated values as an array of scalars.
const malloyType = this.dialect.sqlTypeToMalloyType(type);
if (malloyType) {
const arrayField: StructDef = {
...structShared,
type: 'array',
elementTypeDef: malloyType,
join: 'many',
fields: arrayEachFields(malloyType),
};
structDef.fields.push(arrayField);
structDef.fields.push(mkArrayDef(malloyType, name, this.dialectName));
}
} else if (isRecord) {
const ifRepeatedRecord: StructDef = {
Expand Down
4 changes: 2 additions & 2 deletions packages/malloy-db-duckdb/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@malloydata/db-duckdb",
"version": "0.0.218",
"version": "0.0.222",
"license": "MIT",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
Expand Down Expand Up @@ -41,7 +41,7 @@
},
"dependencies": {
"@duckdb/duckdb-wasm": "1.29.0",
"@malloydata/malloy": "^0.0.218",
"@malloydata/malloy": "^0.0.222",
"@motherduck/wasm-client": "^0.6.6",
"apache-arrow": "^17.0.0",
"duckdb": "1.1.1",
Expand Down
13 changes: 4 additions & 9 deletions packages/malloy-db-duckdb/src/duckdb.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

import {DuckDBCommon} from './duckdb_common';
import {DuckDBConnection} from './duckdb_connection';
import {arrayEachFields, SQLSourceDef, StructDef} from '@malloydata/malloy';
import {SQLSourceDef, StructDef, mkArrayDef} from '@malloydata/malloy';
import {describeIfDatabaseAvailable} from '@malloydata/malloy/test';

const [describe] = describeIfDatabaseAvailable(['duckdb']);
Expand Down Expand Up @@ -132,14 +132,9 @@ describe('DuckDBConnection', () => {
it('parses arrays', () => {
const structDef = makeStructDef();
connection.fillStructDefFromTypeMap(structDef, {test: ARRAY_SCHEMA});
expect(structDef.fields[0]).toEqual({
name: 'test',
type: 'array',
elementTypeDef: intTyp,
join: 'many',
dialect: 'duckdb',
fields: arrayEachFields({type: 'number', numberType: 'integer'}),
});
expect(structDef.fields[0]).toEqual(
mkArrayDef({type: 'number', numberType: 'integer'}, 'test', 'duckdb')
);
});

it('parses inline', () => {
Expand Down
Loading

0 comments on commit 70da6d2

Please sign in to comment.