parser: move scan.go to new scanner package #67584
parser: move scan.go to new scanner package #67584craig[bot] merged 2 commits intocockroachdb:masterfrom
Conversation
otan
left a comment
There was a problem hiding this comment.
lgtm mod interface function names
pkg/sql/parser/sql.y
Outdated
| return s.id | ||
| } | ||
|
|
||
| func (s *sqlSymType) SetId(id int32) { |
pkg/sql/parser/sql.y
Outdated
| // sqlSymType is generated by goyacc, and implements the ScanSymType interface. | ||
| var _ ScanSymType = &sqlSymType{} | ||
|
|
||
| func (s *sqlSymType) Id() int32 { |
This will allow us to move scan.go into its own package. Release note: None
3a2c081 to
2da7e1d
Compare
2da7e1d to
6143d22
Compare
knz
left a comment
There was a problem hiding this comment.
Change LGTM but I'd like to try to trick git (and reviewable) into recognizing the file rename, so that we don't get a completely fresh new file without any history.
I have checked locally and it appears that you can achieve that by renaming parser/scan.go into parser/scanner.go and amending the 2nd commit. Does that work for you too?
Reviewed 3 of 3 files at r1, 10 of 10 files at r2.
Reviewable status:complete! 0 of 0 LGTMs obtained (waiting on @dt and @rafiss)
6143d22 to
dc8c1c9
Compare
that worked! thanks |
dc8c1c9 to
216b453
Compare
The functionality of scan.go is now available externally, without needing to pull in a large dependency on sql/sem/tree. Release note: None
216b453 to
af67519
Compare
|
tftr! bors r=knz,otan |
|
Build failed (retrying...): |
|
Build succeeded: |
Fixes #64710
See individual commits.
This extracts an interface for sqlSymType so that scan.go can keep using it.
This allows scan.go to live in its own package so that other components can
use its functionality without needing to pull in a large dependency
on sql/sem/tree.
Release note: None