Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow implicit casting to int[], decimal[] #42704

Merged
merged 1 commit into from
Nov 26, 2019
Merged

Conversation

apantel
Copy link
Contributor

@apantel apantel commented Nov 22, 2019

Fixes #41405

Release note (sql change): Cast string to int[] or decimal[] when appropriate

@apantel apantel requested a review from rafiss November 22, 2019 18:46
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@rafiss rafiss requested a review from a team November 22, 2019 19:44
Copy link
Collaborator

@rafiss rafiss left a comment

Choose a reason for hiding this comment

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

minor nit: typo in commit message for strign

other than very small comments, looks great! thanks

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @apantel and @rafiss)


pkg/sql/sem/tree/constant_test.go, line 269 at r1 (raw file):

	types.Interval:    mustParseDInterval,
	types.Jsonb:       mustParseDJSON,
	types.IntArray: 	 mustParseDIntArray,

can a test also be added for DecimalArray?

Copy link
Contributor Author

@apantel apantel left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @rafiss)


pkg/sql/sem/tree/constant_test.go, line 269 at r1 (raw file):

Previously, rafiss (Rafi Shamim) wrote…

can a test also be added for DecimalArray?

Done.

Copy link
Contributor Author

@apantel apantel left a comment

Choose a reason for hiding this comment

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

Dismissed @rafiss from a discussion.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained

@apantel
Copy link
Contributor Author

apantel commented Nov 26, 2019

bors r+

@craig
Copy link
Contributor

craig bot commented Nov 26, 2019

Build failed

Fixes cockroachdb#41405

Release note (sql change): Cast string to int[] or decimal[] when appropriate
@apantel
Copy link
Contributor Author

apantel commented Nov 26, 2019

bors r+

craig bot pushed a commit that referenced this pull request Nov 26, 2019
42601: storage/protectedts: introduce interfaces r=nvanbenschoten a=ajwerner

This commit introduces the interfaces for the protectedts subsystem.
The APIs are centered around protobufs for no great reason; it's mostly
an implementation vestige. I'm happy to swap it out for regular go structs.
That being said, there is something nice about having a well-defined encoding
for values.

This is the first of a number of PRs to come from #42600.

Release note: None

42704: Allow implicit casting to int[], decimal[] r=apantel a=apantel

Fixes #41405

Release note (sql change): Cast string to int[] or decimal[] when appropriate

42782: Correct some columns in pg_type from OID to REGPROC. r=apantel a=apantel

Fixes #42568

Release note (sql change): Some columns (typinput, typoutput,
typreceive, typsend, typmodin, typmodout, typanalyze) in pg_type were
incorrectly typed as OID instead of REGPROC.

42785: gceworker: fix substitution error r=RaduBerinde a=RaduBerinde

Some folks have been getting `${response,,}: bad substitution` errors,
I guess because their version of bash doesn't understand it. Changing
to a POSIX standard way to convert to lowercase.

Co-authored-by: Andrew Werner <ajwerner@cockroachlabs.com>
Co-authored-by: Adam Pantel <adam@cockroachlabs.com>
Co-authored-by: Radu Berinde <radu@cockroachlabs.com>
@craig
Copy link
Contributor

craig bot commented Nov 26, 2019

Build succeeded

@craig craig bot merged commit 9b16d51 into cockroachdb:master Nov 26, 2019
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.

sql: cast string to int[] or decimal[] when appropriate
3 participants