Repository navigation
feat: support geospatial results on the kernel path #535
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
base: main
Are you sure you want to change the base?
Changes from all commits
e34d9a7
1387f9f
edbb161
5cd6a5d
b823e0f
4e74df3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| 4278294a0392cf138c170b071b855b03e29efe79 | ||
| b7e9310b27be16a6c42490e58c4b5c4a525320bc |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -257,6 +257,47 @@ describe('KernelOperationBackend — M0 datatype round-trip via napi → ArrowRe | |
| expect(row.s).to.deep.equal({ a: 1, b: 'hi' }); | ||
| }); | ||
|
|
||
| it('surfaces geospatial string and binary values in idiomatic JS shapes', async () => { | ||
| const wkb = new Uint8Array([ | ||
| 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 0x00, 0x40, | ||
| ]); | ||
| const geoType = new Struct([ | ||
| new Field('srid', new Int32(), false), | ||
| new Field( | ||
| 'wkb', | ||
| new Binary(), | ||
| false, | ||
| new Map([ | ||
| ['geometry', 'true'], | ||
| ['srid', '-1'], | ||
| ]), | ||
| ), | ||
| ]); | ||
| const schema = new Schema([ | ||
| withTypeName(new Field('geom_text', new Utf8(), true), 'GEOMETRY'), | ||
| withTypeName(new Field('geom_binary', geoType, true), 'GEOMETRY'), | ||
| ]); | ||
| const stub = new StatementStub(ipcSchemaOnly(schema), [ | ||
| ipcFromColumns(schema, { | ||
| geom_text: ['SRID=4326;POINT(1 2)', null], | ||
| geom_binary: [{ srid: 4326, wkb }, null], | ||
| }), | ||
| ]); | ||
| const backend = new KernelOperationBackend({ | ||
| statement: stub, | ||
| context: new ClientContextStub(), | ||
| }); | ||
|
|
||
| const rows = (await backend.fetchChunk({ limit: 100 })) as Array<Record<string, unknown>>; | ||
| expect(rows[0].geom_text).to.equal('SRID=4326;POINT(1 2)'); | ||
| expect(rows[0].geom_binary).to.deep.equal({ | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could we add an explicit |
||
| srid: 4326, | ||
| wkb: Buffer.from(wkb), | ||
| }); | ||
| expect(rows[1]).to.deep.equal({ geom_text: null, geom_binary: null }); | ||
| }); | ||
|
|
||
| it('streams multiple batches and reports hasMore correctly', async () => { | ||
| const schema = new Schema([withTypeName(new Field('x', new Int32(), true), 'INT')]); | ||
| const schemaIpc = ipcSchemaOnly(schema); | ||
|
|
||
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.
Could we clarify whether these transitive-dependency pins are intended to protect this repository’s CI install or users who install the published
@databricks/sqlpackage? npm only appliesoverridesfrom the installing project’s root package.json, so downstream projects do not inherit this package’s overrides or lockfile. If this is CI-only hardening, could the changelog say so; if it is intended as a downstream fix, what install-visible constraint ensures patched versions?