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

if with identical then and else blocks in sql/sem/tree/backup.go #111781

Closed
chavacava opened this issue Oct 4, 2023 · 2 comments · Fixed by #112393
Closed

if with identical then and else blocks in sql/sem/tree/backup.go #111781

chavacava opened this issue Oct 4, 2023 · 2 comments · Fixed by #112393
Labels
A-disaster-recovery E-easy Easy issue to tackle, requires little or no CockroachDB experience good first issue O-community Originated from the community T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) X-blathers-triaged blathers was able to find an owner

Comments

@chavacava
Copy link
Contributor

chavacava commented Oct 4, 2023

if ctx.HasFlags(FmtHideConstants) {
ctx.WriteString(" WITH OPTIONS (")
ctx.FormatNode(&node.Options)
ctx.WriteString(")")
} else {
ctx.WriteString(" WITH OPTIONS (")
ctx.FormatNode(&node.Options)
ctx.WriteString(")")

if ctx.HasFlags(FmtHideConstants) {
maybeAddSep()
ctx.WriteString("execution locality = ")
ctx.FormatNode(o.ExecutionLocality)
} else {
maybeAddSep()
ctx.WriteString("execution locality = ")
ctx.FormatNode(o.ExecutionLocality)
}

In both conditionals, then and else blocks are identical.

(found by revive while testing it on cockroach code base)

Jira issue: CRDB-32067

@blathers-crl
Copy link

blathers-crl bot commented Oct 4, 2023

Hello, I am Blathers. I am here to help you get the issue triaged.

It looks like you have not filled out the issue in the format of any of our templates. To best assist you, we advise you to use one of these templates.

I have CC'd a few people who may be able to assist you:

  • @cockroachdb/disaster-recovery (found keywords: backup)

If we have not gotten back to your issue within a few business days, you can try the following:

  • Join our community slack channel and ask on #cockroachdb.
  • Try find someone from here if you know they worked closely on the area and CC them.

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@blathers-crl blathers-crl bot added A-disaster-recovery O-community Originated from the community X-blathers-triaged blathers was able to find an owner T-disaster-recovery labels Oct 4, 2023
@blathers-crl
Copy link

blathers-crl bot commented Oct 4, 2023

cc @cockroachdb/disaster-recovery

@exalate-issue-sync exalate-issue-sync bot added T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) and removed T-disaster-recovery labels Oct 9, 2023
@rafiss rafiss added E-easy Easy issue to tackle, requires little or no CockroachDB experience good first issue labels Oct 10, 2023
craig bot pushed a commit that referenced this issue Oct 19, 2023
112393: sql: remove redundant conditional paths r=stevendanna a=Shikhar03Stark

Fixes: #111781 
Remove redundant conditional path in sql package

Co-authored-by: Harshit Vishwakarma <[email protected]>
@craig craig bot closed this as completed in 64441a1 Oct 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-disaster-recovery E-easy Easy issue to tackle, requires little or no CockroachDB experience good first issue O-community Originated from the community T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) X-blathers-triaged blathers was able to find an owner
Projects
No open projects
Archived in project
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants