Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
fd3975c
Revert "feat: Add high precision TIMESTAMP values for queries (#7147)"
danieljbruce Mar 31, 2026
f31ccc7
Revert "feat: support high precision timestamp strings on getRows cal…
danieljbruce Mar 31, 2026
5544e36
skip a test
danieljbruce Mar 31, 2026
1bbd192
Remove the High Precision Query System tests
danieljbruce Mar 31, 2026
c588794
Source code changes for timestamp precision flag
danieljbruce Apr 1, 2026
73c4ed5
Add tests back
danieljbruce Apr 1, 2026
ab16690
Add test file back in
danieljbruce Apr 1, 2026
2410d66
Modify tests to only run for high precision or not
danieljbruce Apr 1, 2026
bdba4dd
listParams add
danieljbruce Apr 1, 2026
ca0a51c
remove listParams
danieljbruce Apr 1, 2026
a1eb4d2
skip tests if picosecond support is not turned on
danieljbruce Apr 1, 2026
a959b3a
remove only
danieljbruce Apr 1, 2026
f5b7e31
Don’t create separate code paths when not needed
danieljbruce Apr 2, 2026
61db403
extend the default options
danieljbruce Apr 2, 2026
01ab527
Skip the before hook if picosecond support not on
danieljbruce Apr 2, 2026
67a4822
Add documentation back in for methods
danieljbruce Apr 2, 2026
757dfdc
Remove the if block since release is done
danieljbruce Apr 2, 2026
cbeeacc
Eliminate redundant feature flag check.
danieljbruce Apr 2, 2026
83cfcd8
Add qs back in
danieljbruce Apr 2, 2026
403093a
Add commands to test for picoseconds in system t
danieljbruce Apr 2, 2026
83125de
Revert "Remove the if block since release is done"
danieljbruce Apr 7, 2026
4919e9f
Eliminate environment variable for parsing check
danieljbruce Apr 7, 2026
901313b
Always use try block
danieljbruce Apr 7, 2026
4fb5ce2
Change type to GetRowsOptions
danieljbruce Apr 7, 2026
ceaf6c9
Remove exception
danieljbruce Apr 7, 2026
c58058b
Some typescript simplifications
danieljbruce Apr 7, 2026
17593f5
Eliminate default options branching
danieljbruce Apr 7, 2026
8d6420b
Change defaults for current requests
danieljbruce Apr 7, 2026
800a818
Don’t need extra import
danieljbruce Apr 7, 2026
dc3588f
Don’t gate with picosecond flag
danieljbruce Apr 7, 2026
bd43464
Just add an extra test file
danieljbruce Apr 8, 2026
781266f
test(bigquery): parameterize system tests for picosecond support
google-labs-jules[bot] Apr 7, 2026
ee5a084
test(bigquery): add high precision timestamp wrapper system test
google-labs-jules[bot] Apr 8, 2026
9e7b452
linting change and copyright year
danieljbruce Apr 8, 2026
8707c19
Correct package.json errors
danieljbruce Apr 8, 2026
33022c9
This file is not working well with test runner
danieljbruce Apr 8, 2026
e003fa2
Run the timestamp output format tests as well
danieljbruce Apr 8, 2026
0d67c7e
Add a wrapper
danieljbruce Apr 8, 2026
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
31 changes: 18 additions & 13 deletions handwritten/bigquery/src/bigquery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1101,10 +1101,12 @@ export class BigQuery extends Service {
}),
};
} else if ((providedType as string).toUpperCase() === 'TIMESTAMP(12)') {
return {
type: 'TIMESTAMP',
timestampPrecision: '12',
};
if (process.env.BIGQUERY_PICOSECOND_SUPPORT === 'true') {
return {
type: 'TIMESTAMP',
timestampPrecision: '12',
};
}
}

providedType = (providedType as string).toUpperCase();
Expand Down Expand Up @@ -2263,7 +2265,6 @@ export class BigQuery extends Service {
the callback. Instead, pass the error to the callback the user provides
so that the user can see the error.
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const listParams = {
'formatOptions.timestampOutputFormat':
queryReq.formatOptions?.timestampOutputFormat,
Expand Down Expand Up @@ -2367,11 +2368,18 @@ export class BigQuery extends Service {
const hasAnyFormatOpts =
options['formatOptions.timestampOutputFormat'] !== undefined ||
options['formatOptions.useInt64Timestamp'] !== undefined;
const defaultOpts = hasAnyFormatOpts
let defaultOpts: bigquery.IDataFormatOptions = hasAnyFormatOpts
? {}
: {
timestampOutputFormat: 'ISO8601_STRING',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is the most important part that should handle the feature flag. If BIGQUERY_PICOSECOND_SUPPORT is enabled, we should use timestampOutputFormat: 'ISO8601_STRING', if not, use useInt64Timestamp:true. We can still allow customers to pass the timestampOutputFormat, even if is allowlisted now. But in the future they can use it just fine without a new release. Later we can remove the feature flag and just default to use it too.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay. It looks like we can just change.

formatOptions = {
        useInt64Timestamp: true,
      };

to

formatOptions = extend(
      {
        useInt64Timestamp: true,
      }, {
        timestampOutputFormat: options['formatOptions.timestampOutputFormat'],
        useInt64Timestamp: options['formatOptions.useInt64Timestamp'],
      }
);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think some logic still needs to be shared for both cases. Only the default value should change based on the feature flag.

This code snippets makes it clear that the default should be useInt64Timestamp: true currently, and with the feature flag enabled, should be timestampOutputFormat: 'ISO8601_STRING'. And customers can still provide both opts.

const hasAnyFormatOpts =
  options['formatOptions.timestampOutputFormat'] !== undefined ||
  options['formatOptions.useInt64Timestamp'] !== undefined;
let defaultOpts = hasAnyFormatOpts
  ? {}
  : {
      useInt64Timestamp: true,
    };
let formatOptions;
if (process.env.BIGQUERY_PICOSECOND_SUPPORT === 'true') {
  defaultOpts = hasAnyFormatOpts
    ? {}
    : {
        timestampOutputFormat: 'ISO8601_STRING',
      };  
}
formatOptions = extend(defaultOpts, {
  timestampOutputFormat: options['formatOptions.timestampOutputFormat'],
  useInt64Timestamp: options['formatOptions.useInt64Timestamp'],
});

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright. I made this change here and the default request change for getRows. It changes the current defaults that are being used, but it still seems to work okay.

useInt64Timestamp: true,
};
if (process.env.BIGQUERY_PICOSECOND_SUPPORT === 'true') {
defaultOpts = hasAnyFormatOpts
? {}
: {
timestampOutputFormat: 'ISO8601_STRING',
};
}
const formatOptions = extend(defaultOpts, {
timestampOutputFormat: options['formatOptions.timestampOutputFormat'],
useInt64Timestamp: options['formatOptions.useInt64Timestamp'],
Expand Down Expand Up @@ -2585,12 +2593,9 @@ function convertSchemaFieldValue(
2023-01-01T12:00:00.123456789123Z
*/
const listParams = options.listParams;
const timestampOutputFormat = listParams
? listParams['formatOptions.timestampOutputFormat']
: undefined;
const useInt64Timestamp = listParams
? listParams['formatOptions.useInt64Timestamp']
: undefined;
const timestampOutputFormat =
listParams?.['formatOptions.timestampOutputFormat'];
const useInt64Timestamp = listParams?.['formatOptions.useInt64Timestamp'];
if (timestampOutputFormat === 'ISO8601_STRING') {
// value is ISO string, create BigQueryTimestamp wrapping the string
value = BigQuery.timestamp(value);
Expand Down
16 changes: 12 additions & 4 deletions handwritten/bigquery/src/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ import {JobMetadata, JobOptions} from './job';
import bigquery from './types';
import {IntegerTypeCastOptions} from './bigquery';
import {RowQueue} from './rowQueue';
import IDataFormatOptions = bigquery.IDataFormatOptions;

// This is supposed to be a @google-cloud/storage `File` type. The storage npm
// module includes these types, but is current installed as a devDependency.
Expand Down Expand Up @@ -1894,15 +1893,24 @@ class Table extends ServiceObject {
}
callback!(null, rows, nextQuery, resp);
};
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as https://github.com/googleapis/google-cloud-node/pull/7946/changes#r3029295761, this is the core part that needs to handle the feature flag.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. For the old version this will now extend the options instead of just setting useInt64Timestamp to true.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

similar to https://github.com/googleapis/google-cloud-node/pull/7946/changes#r3046889774, code should be along these lines:

let qs: GetRowsOptions;
const hasAnyFormatOpts =
  options['formatOptions.timestampOutputFormat'] !== undefined ||
  options['formatOptions.useInt64Timestamp'] !== undefined;
let defaultOpts = hasAnyFormatOpts
    ? {} 
    : {
      'formatOptions.useInt64Timestamp': true,
     };
if (process.env.BIGQUERY_PICOSECOND_SUPPORT === 'true') {
  defaultOpts = hasAnyFormatOpts
    ? {}
    : {
        'formatOptions.timestampOutputFormat': 'ISO8601_STRING',
      };
} 
qs = extend(defaultOpts, options);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay. Made this change. Seems fine.


const hasAnyFormatOpts =
options['formatOptions.timestampOutputFormat'] !== undefined ||
options['formatOptions.useInt64Timestamp'] !== undefined;
const defaultOpts = hasAnyFormatOpts
let defaultOpts: GetRowsOptions = hasAnyFormatOpts
? {}
: {
'formatOptions.timestampOutputFormat': 'ISO8601_STRING',
'formatOptions.useInt64Timestamp': true,
};
const qs = extend(defaultOpts, options);
if (process.env.BIGQUERY_PICOSECOND_SUPPORT === 'true') {
defaultOpts = hasAnyFormatOpts
? {}
: {
'formatOptions.timestampOutputFormat': 'ISO8601_STRING',
};
}
const qs: GetRowsOptions = extend(defaultOpts, options);

this.request(
{
uri: '/data',
Expand Down
60 changes: 41 additions & 19 deletions handwritten/bigquery/system-test/bigquery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1042,25 +1042,27 @@ describe('BigQuery', () => {
});

it('should create a table with timestampPrecision', async () => {
const table = dataset.table(generateName('timestamp-precision-table'));
const schema = {
fields: [
{
name: 'ts_field',
type: 'TIMESTAMP',
timestampPrecision: 12,
},
],
};
try {
await table.create({schema});
const [metadata] = await table.getMetadata();
assert.deepStrictEqual(
metadata.schema.fields[0].timestampPrecision,
'12',
);
} catch (e) {
assert.ifError(e);
if (process.env.BIGQUERY_PICOSECOND_SUPPORT === 'true') {
const table = dataset.table(generateName('timestamp-precision-table'));
const schema = {
fields: [
{
name: 'ts_field',
type: 'TIMESTAMP',
timestampPrecision: 12,
},
],
};
try {
await table.create({schema});
const [metadata] = await table.getMetadata();
assert.deepStrictEqual(
metadata.schema.fields[0].timestampPrecision,
'12',
);
} catch (e) {
assert.ifError(e);
}
}
});

Expand Down Expand Up @@ -1562,6 +1564,11 @@ describe('BigQuery', () => {

testCases.forEach(testCase => {
it(`should handle ${testCase.name}`, async () => {
if (process.env.BIGQUERY_PICOSECOND_SUPPORT !== 'true') {
// These tests are only important when the high precision
// timestamp support is turned on.
return;
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than disabling the tests, we should instead test the feature flag behavior.

We should be able to stub the environment variable behavior in tests like this:

beforeEach(() => {
  process.env.BIGQUERY_PICOSECOND_SUPPORT = 'true'
});

afterEach(() => {
   // Clean up to prevent leak
   delete process.env.BIGQUERY_PICOSECOND_SUPPORT;
});

Copy link
Copy Markdown
Contributor Author

@danieljbruce danieljbruce Apr 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of doing this I modified package.json to have the line "system-test": "npm run system-test:pico && npm run system-test:standard", with lines:

"system-test:pico": "BIGQUERY_PICOSECOND_SUPPORT=true mocha build/system-test --timeout 600000",
"system-test:standard": "mocha build/system-test --timeout 600000",

so that running system-test script would run all the relevant tests with and without the feature flag even outside of the new tests.

The trouble with just enabling the feature flag with these tests is that I think the other team is running these tests with a non-allowlisted project. With a non-allowlisted project and the feature flag turned on these tests will fail and they should fail because they are making high precision timestamp requests to a service that doesn't support it yet. I don't want to create a failing test red herring that will confuse developers who are running this test suite on a non-allowlisted project.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

which other teams are running these tests ? I think they should have access into the allowlisted project, it was always like that in the BigQuery SDK team. Adding those branches on running all tests makes our CI more complex and I'm not seeing the added value.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm with @pearigee recommendation and would add more that I think we should run this whole test suite with and without the flag.

We can have a runTestsWithFlags method that does something like this (this is a pseudo code, I haven't tried to run it)

function runTestsWithFlags(testCase: string, flags: []string, body: () => {}) {
   flags.forEach( flag => { 
       describe(`With {flag}=true`, () => {
            beforeEach(() => {
              process.env[flag]= 'true'
            });
            
            afterEach(() => {
               // Clean up to prevent leak
               delete process.env[flag];
            });

            body();
       });
       
       describe(`With {flag}=false`, () => {
           beforeEach(() => {
              process.env[flag]= 'false'
            });
            
            afterEach(() => {
               // Clean up to prevent leak
               delete process.env[flag];
            });

           body();
       });
    }
}
const featureFlags = ['BIGQUERY_PICOSECOND_SUPPORT'];
runTestsWithFlags('BigQuery', featureFlags, () => { 
    /* current test suite */
})

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll get to this one next.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright. I added a high_precision_timestamp.ts file which runs all the other tests again with the BIGQUERY_PICOSECOND_SUPPORT environment variable set to true thereby accomplishing our goal. That way we don't have to change package.json.

I didn't want to use the approach of wrapping bigquery.ts in a loop that runs the tests twice because it would create a massive diff in this PR due to the extra indent.

/*
The users use the new TIMESTAMP(12) type to indicate they want to
opt in to using timestampPrecision=12. The reason is that some queries
Expand Down Expand Up @@ -1614,6 +1621,11 @@ describe('BigQuery', () => {
}
});
it(`should handle nested ${testCase.name}`, async () => {
if (process.env.BIGQUERY_PICOSECOND_SUPPORT !== 'true') {
// These tests are only important when the high precision
// timestamp support is turned on.
return;
}
/*
The users use the new TIMESTAMP(12) type to indicate they want to
opt in to using timestampPrecision=12. The reason is that some queries
Expand Down Expand Up @@ -2009,6 +2021,11 @@ describe('BigQuery', () => {

testCases.forEach(testCase => {
it(`should handle ${testCase.name}`, async () => {
if (process.env.BIGQUERY_PICOSECOND_SUPPORT !== 'true') {
// These tests are only important when the high precision
// timestamp support is turned on.
return;
}
/*
The users use the new TIMESTAMP(12) type to indicate they want to
opt in to using timestampPrecision=12. The reason is that some queries
Expand Down Expand Up @@ -2063,6 +2080,11 @@ describe('BigQuery', () => {
}
});
it(`should handle nested ${testCase.name}`, async () => {
if (process.env.BIGQUERY_PICOSECOND_SUPPORT !== 'true') {
// These tests are only important when the high precision
// timestamp support is turned on.
return;
}
/*
The users use the new TIMESTAMP(12) type to indicate they want to
opt in to using timestampPrecision=12. The reason is that some queries
Expand Down
78 changes: 78 additions & 0 deletions handwritten/bigquery/system-test/high_precision_timestamp.ts
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice solution 👏

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't want to block this PR, so this is something we can work on later -- but this goes a bit against convention and our internal style guides.

Ideally, we would preserve the relationship between the test file and the file it is testing (i.e. by sharing some portion of the same name). The common pattern for testing the on/off behavior would be something like this:

describe('some feature', () => {
     describe('with flag enabled', () => {
          // Enable flag
          beforeEach(...);

          // Clean up flag
          afterEach();

          it('test 1', ...)

          it('test 2', ...)
      });

     describe('with flag disabled', () => {
          // Ensure flag is cleared
          beforeEach(...);

          it('test 1', ...)

          it('test 2', ...)
     });
});

If we were worried about duplication of code, we can always create a utility file that both tests import.

Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
// Copyright 2026 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

import {describe, before, after} from 'mocha';
import * as path from 'path';

// This file registers a second run of the BigQuery system tests with picosecond support enabled.
// It uses targeted cache clearing to ensure the library and tests are re-initialized with the
// 'BIGQUERY_PICOSECOND_SUPPORT' environment variable set.

const originalValue = process.env.BIGQUERY_PICOSECOND_SUPPORT;

/**
* Helper to clear the require cache for all files within the current package.
*/
function clearPackageCache() {
// Find the root of the current package by looking for package.json
const packageJsonPath = require.resolve('../../package.json');
const packageDir = path.dirname(packageJsonPath);

Object.keys(require.cache).forEach(key => {
if (key.startsWith(packageDir) && !key.includes('node_modules')) {
delete require.cache[key];
}
});
}

// 1. REGISTRATION PHASE:
// Set the environment variable and clear the cache so that the subsequent 'require'
// of the system test file (and any library files it imports) sees the updated state.
process.env.BIGQUERY_PICOSECOND_SUPPORT = 'true';
clearPackageCache();

describe('BigQuery System Tests (High Precision)', () => {
// 2. EXECUTION PHASE:
// Mocha runs 'before' hooks before the tests in the required file are executed.
before(() => {
process.env.BIGQUERY_PICOSECOND_SUPPORT = 'true';
// We don't clear cache here as it's too late for Mocha's registration phase,
// but we ensure the env var is set for any execution-time checks.
});

after(() => {
if (originalValue === undefined) {
delete process.env.BIGQUERY_PICOSECOND_SUPPORT;
} else {
process.env.BIGQUERY_PICOSECOND_SUPPORT = originalValue;
}
});

describe('Run all tests', () => {
// Wrap all the other tests in a describe block to ensure the entire file is
// executed when the environment variable is set to true.

// Programmatically require the tests. Mocha will discover and register them inside this 'describe' block.
require('./bigquery');
require('./timestamp_output_format');
});
});

// 3. CLEANUP:
// Restore the environment variable after the registration phase to minimize side effects on other test files.
if (originalValue === undefined) {
delete process.env.BIGQUERY_PICOSECOND_SUPPORT;
} else {
process.env.BIGQUERY_PICOSECOND_SUPPORT = originalValue;
}
10 changes: 10 additions & 0 deletions handwritten/bigquery/system-test/timestamp_output_format.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ describe('Timestamp Output Format System Tests', () => {
const expectedTsValuePicoseconds = '2023-01-01T12:00:00.123456789123Z';

before(async () => {
if (process.env.BIGQUERY_PICOSECOND_SUPPORT !== 'true') {
return;
}
await dataset.create();
await table.create({
schema: [{name: 'ts', type: 'TIMESTAMP', timestampPrecision: '12'}],
Expand Down Expand Up @@ -159,6 +162,9 @@ describe('Timestamp Output Format System Tests', () => {
expectedTsValue,
}) => {
it(name, async () => {
if (process.env.BIGQUERY_PICOSECOND_SUPPORT !== 'true') {
return;
}
const options: {[key: string]: any} = {};
if (timestampOutputFormat !== undefined) {
options['formatOptions.timestampOutputFormat'] =
Expand All @@ -185,6 +191,10 @@ describe('Timestamp Output Format System Tests', () => {
);

it('should make a request with ISO8601_STRING when no format options are being used', done => {
if (process.env.BIGQUERY_PICOSECOND_SUPPORT !== 'true') {
done();
return;
}
void (async () => {
const originalRequest = table.request;
const requestPromise: Promise<RequestResponse> = new Promise(
Expand Down
28 changes: 22 additions & 6 deletions handwritten/bigquery/test/bigquery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3439,6 +3439,14 @@ describe('BigQuery', () => {
delete req[key];
}
}
const formatOptions =
process.env.BIGQUERY_PICOSECOND_SUPPORT === 'true'
? {
timestampOutputFormat: 'ISO8601_STRING',
}
: {
useInt64Timestamp: true,
};
const expectedReq = {
query: QUERY_STRING,
useLegacySql: false,
Expand All @@ -3465,9 +3473,7 @@ describe('BigQuery', () => {
key: 'value',
},
jobCreationMode: 'JOB_CREATION_REQUIRED',
formatOptions: {
timestampOutputFormat: 'ISO8601_STRING',
},
formatOptions,
};
assert.deepStrictEqual(req, expectedReq);
});
Expand Down Expand Up @@ -3508,6 +3514,9 @@ describe('BigQuery', () => {

testCases.forEach(testCase => {
it(`should handle ${testCase.name}`, () => {
if (process.env.BIGQUERY_PICOSECOND_SUPPORT !== 'true') {
return;
}
const req = bq.buildQueryRequest_(QUERY_STRING, testCase.opts);

const expectedReq = {
Expand Down Expand Up @@ -3535,21 +3544,28 @@ describe('BigQuery', () => {
});
});
});

it('should create a QueryRequest from a SQL string', () => {
const req = bq.buildQueryRequest_(QUERY_STRING, {});
for (const key in req) {
if (req[key] === undefined) {
delete req[key];
}
}
const formatOptions =
process.env.BIGQUERY_PICOSECOND_SUPPORT === 'true'
? {
timestampOutputFormat: 'ISO8601_STRING',
}
: {
useInt64Timestamp: true,
};
const expectedReq = {
query: QUERY_STRING,
useLegacySql: false,
requestId: req.requestId,
jobCreationMode: 'JOB_CREATION_OPTIONAL',
formatOptions: {
timestampOutputFormat: 'ISO8601_STRING',
},
formatOptions,
};
assert.deepStrictEqual(req, expectedReq);
});
Expand Down
Loading
Loading