Skip to content

sql: support binary format for DInterval#25242

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
justinj:binary-interval
May 2, 2018
Merged

sql: support binary format for DInterval#25242
craig[bot] merged 1 commit intocockroachdb:masterfrom
justinj:binary-interval

Conversation

@justinj
Copy link
Copy Markdown
Contributor

@justinj justinj commented May 2, 2018

Fixes #24525.

Release note (sql change): The binary postgres wire format is now supported for
intervals.

@justinj justinj requested review from a team and knz May 2, 2018 16:06
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

Copy link
Copy Markdown
Contributor

@knz knz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm with nit

if len(b) < 16 {
return nil, errors.Errorf("interval requires 16 bytes for binary format")
}
nanos := int64(binary.BigEndian.Uint64(b)) / int64(time.Nanosecond) * int64(time.Microsecond)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make the grouping explicit (a / b) * c

@justinj justinj force-pushed the binary-interval branch from 22d2d24 to 7b9e550 Compare May 2, 2018 18:15
@justinj
Copy link
Copy Markdown
Contributor Author

justinj commented May 2, 2018

TFTR!

bors r+

Fixes cockroachdb#24525.

Release note (sql change): The binary postgres wire format is now supported for
intervals.
@justinj justinj force-pushed the binary-interval branch from 7b9e550 to a28cc98 Compare May 2, 2018 18:34
@craig
Copy link
Copy Markdown
Contributor

craig bot commented May 2, 2018

Canceled

@justinj
Copy link
Copy Markdown
Contributor Author

justinj commented May 2, 2018

My bad - missed a linter fix

bors r+

craig bot pushed a commit that referenced this pull request May 2, 2018
24958: sql: Add support for parsing ALTER COLUMN TYPE r=bobvawter a=bobvawter

This change adds SQL parsing support for the proposed ALTER COLUMN TYPE syntax
in RFC #24703.  It still returns an unimplemented error message to the caller.

Release note: none

25242: sql: support binary format for DInterval r=justinj a=justinj

Fixes #24525.

Release note (sql change): The binary postgres wire format is now supported for
intervals.

Co-authored-by: Bob Vawter <bob@cockroachlabs.com>
Co-authored-by: Justin Jaffray <justin@cockroachlabs.com>
@craig
Copy link
Copy Markdown
Contributor

craig bot commented May 2, 2018

Build succeeded

@craig craig bot merged commit a28cc98 into cockroachdb:master May 2, 2018
@knz knz added the fixitday label May 2, 2018
craig bot pushed a commit that referenced this pull request Aug 1, 2018
28135: release-2.0: sql: support binary format for DInterval r=knz a=knz

Backport 1/1 commits from #25242.

Fixes #28134

/cc @cockroachdb/release

---

Release note (sql change): The binary postgres wire format is now supported for
intervals.


Co-authored-by: Justin Jaffray <justin@cockroachlabs.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants