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

INVALID_ARGUMENT: The code field is required for types. #2009

Closed
surbhigarg92 opened this issue Mar 4, 2024 · 0 comments · May be fixed by #2011
Closed

INVALID_ARGUMENT: The code field is required for types. #2009

surbhigarg92 opened this issue Mar 4, 2024 · 0 comments · May be fixed by #2011
Assignees
Labels
api: spanner Issues related to the googleapis/nodejs-spanner API. priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@surbhigarg92
Copy link
Contributor

Running a untyped query with stringarray of giving error "INVALID_ARGUMENT: The code field is required for types."

This issue is happening after #1869 where the type check for "string" was removed.

Sample query to reproduce the issue. Where column named "StringArray" is of type "StringArray"

const value = ['ghi', 'jkl'];
const query: ExecuteSqlRequest = {
          sql: 'SELECT * FROM ABC WHERE EXISTS (SELECT 1 FROM UNNEST(StringArray) AS c WHERE c IN UNNEST(@value))',
          params: {
            value,
          },
        };

@surbhigarg92 surbhigarg92 added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. priority: p2 Moderately-important priority. Fix may not be included in next release. labels Mar 4, 2024
@product-auto-label product-auto-label bot added the api: spanner Issues related to the googleapis/nodejs-spanner API. label Mar 4, 2024
@surbhigarg92 surbhigarg92 self-assigned this Mar 4, 2024
@surbhigarg92 surbhigarg92 added priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. and removed priority: p2 Moderately-important priority. Fix may not be included in next release. labels Mar 4, 2024
gcf-merge-on-green bot pushed a commit that referenced this issue Mar 4, 2024
This fix is reverting the feature untyped param type added in [PR](https://togithub.com/googleapis/nodejs-spanner/pull/1869) and released in [7.4.0](https://togithub.com/googleapis/nodejs-spanner/releases/tag/v7.4.0)

This fixes issue #2009 which was introduced by untyped param type feature.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: spanner Issues related to the googleapis/nodejs-spanner API. priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
1 participant