Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
28072: rangefeed: create new rangefeed package r=nvanbenschoten a=nvanbenschoten This is the first "mergable" part of #27285. The change introduces a new rangefeed package, which exports a `Processor` that manages a set of rangefeed registrations and handles the routing of logical updates to these registrations. While routing logical updates to rangefeed registrations, the processor performs two important tasks: 1. it translates logical updates into rangefeed events. These logical updates are provided to the Processor through its `ConsumeLogicalOps` method. 2. it transforms a range-level closed timestamp to a rangefeed-level resolved timestamp. Closed timestamp updates are passed to the Processor through its `ForwardClosedTS` method. In order to perform its second task, a `Processor` hold on to a `resolvedTimestamp` object. A rangefeed's "resolved timestamp" is defined as the timestamp at which no future updates will be emitted to the feed at or before. The timestamp is monotonically increasing and is communicated through RangeFeedCheckpoint notifications whenever it changes. The `resolvedTimestamp` itself holds on to a `unresolvedIntentQueue` (described in #26782) which allows it to efficiently track unresolved intents that it observes in logical updates provided to the Processor. There are two major pieces of this package missing. The first is catch up scans for new registrations and the second is a mechanism to push intents that are old enough to be holding back the resolved timestamp. The change doesn't plug anything in yet, but a rough draft of the plumbing can be seen in #27285. Release note: None 28129: sql: disambiguate float,decimal formatting r=jordanlewis a=jordanlewis Previously, the FmtParsable directive wouldn't produce a parsable representation for some floats and decimals, in the context of other expressions. In particular, negative floats and decimals would format like `-10.0:::FLOAT`. This seems fine, but since the `:::` operator binds more closely than the `-` operator, an expression like `(-10.0:::FLOAT)::STRING` would get formatted to `-10.0:::FLOAT::STRING`, which is of course invalid as there's no unary negative operator for the string datatype. Now, floats and decimals are marked as unambiguously formatted datatypes and take care of disambiguating themselves with a type annotation if necessary, as well as further-disambiguating parentheses if the numbers are nuegative. Release note (bug fix): correct the round-trip formatting of negative floats and decimals in the context of other expressions when executing in a distributed flow. Co-authored-by: Nathan VanBenschoten <[email protected]> Co-authored-by: Jordan Lewis <[email protected]>
- Loading branch information