Skip to content

Infer types in values clause #5046

@avantgardnerio

Description

@avantgardnerio

Is your feature request related to a problem or challenge? Please describe what you are trying to do.

I've been running into issues related to the SQL values clause:

  1. When trying to infer parameter types, the values clause required param_data_types which itself had to be inferred
  2. When doing insert and update queries, I always get Int64 types, which might need to get coerced into Uint64 for example

These issues (as well as several invariants enforced at runtime) seem to be unnecessary if we could pass a Schema down into value.rs if one is known, and infer the types being parsed from that Schema - i.e. any time we are doing an insert into or can infer placeholder value types.

Fundamentally, this issue is questioning this comment and the design around it.

Describe the solution you'd like

Pass an optional schema into the values clause parser.

Describe alternatives you've considered

Keep doing it how we are now.

@andygrove and @alamb I'd love to hear your thoughts.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions