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

feat(spanner): add support for float32 #2020

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
5de854b
feat(spanner): add support for float32
alkatrivedi Mar 8, 2024
348e965
refactor: codec.ts
alkatrivedi Mar 12, 2024
a1d57a6
refactor: codec.ts
alkatrivedi Mar 12, 2024
794f384
refactor: add sample to fetch float32 value from table
alkatrivedi Mar 12, 2024
a854b46
feat: add support for float32
alkatrivedi Mar 14, 2024
0289e31
fix: lint errors
alkatrivedi Mar 14, 2024
0adae71
fix: presubmit errors
alkatrivedi Mar 14, 2024
b3d0fff
fix: presubmit errors
alkatrivedi Mar 14, 2024
d8b584d
fix: presubmit errors
alkatrivedi Mar 14, 2024
cfe2dfc
fix: presubmit errors
alkatrivedi Mar 14, 2024
b96f8a9
fix: lint errors
alkatrivedi Mar 15, 2024
736f7d9
chore: add system-test for float32
alkatrivedi Mar 18, 2024
8679cf5
refactor: skip the integration test for float32
alkatrivedi Mar 18, 2024
fdf3ec8
fix: presubmit error
alkatrivedi Mar 18, 2024
59ce148
refactor: remove sample for float32 query
alkatrivedi Mar 18, 2024
e774e98
chore: add system tests for float32
alkatrivedi Mar 18, 2024
bae30ed
refactor tests
alkatrivedi Mar 19, 2024
fa068b3
fix: presubmit error
alkatrivedi Mar 19, 2024
94ece6a
fix: presubmit error
alkatrivedi Mar 19, 2024
59e4bb6
fix: presubmit error
alkatrivedi Mar 19, 2024
9fa5ab4
fix: presubmit error
alkatrivedi Mar 19, 2024
22d33f7
fix: presubmit error
alkatrivedi Mar 19, 2024
27740b0
Merge branch 'googleapis:main' into spanner-float32-support
alkatrivedi Mar 20, 2024
667dea9
refactor: system test for float32
alkatrivedi Mar 25, 2024
fe957b4
refactor: system test
alkatrivedi Mar 25, 2024
4a98236
refactor: system test
alkatrivedi Mar 25, 2024
b546880
fix: presubmit errors
alkatrivedi Mar 25, 2024
a9052d7
refactor: system-test
alkatrivedi Mar 25, 2024
dccaa32
skip float32 test
alkatrivedi Mar 25, 2024
69ffa96
skip float32 test
alkatrivedi Mar 25, 2024
a0e7cf1
fix: presubmit error
alkatrivedi Mar 25, 2024
a890603
chore: add test cases for float32 tests
alkatrivedi Mar 26, 2024
620c8c4
fix: lint errors
alkatrivedi Mar 26, 2024
8992dd9
fix: presubmit error
alkatrivedi Mar 26, 2024
03a7360
refactor: add comments
alkatrivedi Mar 26, 2024
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
Prev Previous commit
Next Next commit
fix: presubmit errors
  • Loading branch information
alkatrivedi committed Mar 15, 2024
commit cfe2dfc9a18287915df46caf1b1ae27dc7dac311
1 change: 1 addition & 0 deletions src/codec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import {common as p} from 'protobufjs';
import {google as spannerClient} from '../protos/protos';
import {GoogleError} from 'google-gax';
import { Spanner } from '.';

Check failure on line 24 in src/codec.ts

View workflow job for this annotation

GitHub Actions / lint

Replace `·Spanner·` with `Spanner`

Check warning on line 24 in src/codec.ts

View workflow job for this annotation

GitHub Actions / lint

'Spanner' is defined but never used

// eslint-disable-next-line @typescript-eslint/no-explicit-any
export type Value = any;
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1681,7 +1681,7 @@ class Spanner extends GrpcService {
* @example
* ```
* const {Spanner} = require('@google-cloud/spanner');
* const float = Spanner.float(10);
* const float = Spanner.float32(10);
* ```
*/
static float32(value): Float32 {
Expand Down
6 changes: 3 additions & 3 deletions test/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -500,15 +500,15 @@ describe('Spanner', () => {
const value = {};
const customValue = {};

fakeCodec.Float = class {
fakeCodec.Float32 = class {
constructor(value_) {
assert.strictEqual(value_, value);
return customValue;
}
};

const float = Spanner.float32(value);
assert.strictEqual(float, customValue);
const float32 = Spanner.float32(value);
assert.strictEqual(float32, customValue);
});
});

Expand Down
Loading