cockroachdb / cockroach

CockroachDB — the cloud native, distributed SQL database designed for high availability, effortless scale, and control over data placement.
https://www.cockroachlabs.com
Other
30.03k stars 3.8k forks source link

sql: generator builtin close() method does not surface errors #61123

Open angelapwen opened 3 years ago

angelapwen commented 3 years ago

Describe the problem In creating a SQL generator method, we use the tree.ValueGenerator interface. Its Close() method currently does not have a return value.

This poses a problem when using the new Internal Executor's streaming iterator pattern (added in #59330) to generate builtin function. Its Close() method must be called to close the iterator and returns an error, but this error cannot be surfaced in the generator builtin caller (and the iterator may potentially be left open).

This problem was originally discussed in context of #60922: link

Jira issue: CRDB-3064

github-actions[bot] commented 11 months ago

We have marked this issue as stale because it has been inactive for 18 months. If this issue is still relevant, removing the stale label or adding a comment will keep it active. Otherwise, we'll close it in 10 days to keep the issue queue tidy. Thank you for your contribution to CockroachDB!