Skip to content

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

@surbhigarg92

Description

@surbhigarg92

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,
          },
        };

Metadata

Metadata

Assignees

Labels

api: spannerIssues related to the googleapis/nodejs-spanner API.priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions