Skip to content

Conversation

sanyamsinghal
Copy link
Collaborator

…FromDefElem to fetch the defNames values for other scenarios where the arg is not string

Describe the changes in this pull request

Describe if there are any user-facing changes

NA

How was this pull request tested?

Added unit tests.

Does your PR have changes in callhome/yugabyted payloads? If so, is the payload version incremented?

Does your PR have changes that can cause upgrade issues?

Component Breaking changes?
MetaDB Yes/No
Name registry json Yes/No
Data File Descriptor Json Yes/No
Export Snapshot Status Json Yes/No
Import Data State Yes/No
Export Status Json Yes/No
Data .sql files of tables Yes/No
Export and import data queue Yes/No
Schema Dump Yes/No
AssessmentDB Yes/No
Sizing DB Yes/No
Migration Assessment Report Json Yes/No
Callhome Json Yes/No
YugabyteD Tables Yes/No
TargetDB Metadata Tables Yes/No

…FromDefElem to fetch the defNames values for other scenarios where the arg is not string
@sanyamsinghal sanyamsinghal self-assigned this Aug 25, 2025
@sanyamsinghal sanyamsinghal requested review from makalaaneesh and priyanshi-yb and removed request for makalaaneesh August 25, 2025 19:11
options:{def_elem:{defname:"security_barrier" arg:{string:{sval:"false"}} defaction:DEFELEM_UNSPEC location:57}}
Extract all defnames from the def_eleme node
*/
func ProtoAsAIndirectionNode(msg protoreflect.Message) (*pg_query.A_Indirection, bool) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

just function rename

if tc := arg.GetTypeCast(); tc != nil {
return NormalizeDefElemArgToString(tc.Arg)
}
return arg.String()
Copy link
Contributor

Choose a reason for hiding this comment

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

This isn't a complete normalization, right?
As there could be other arg types like expression, function call

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Are there any other known cases for def elements?
I added what i could find/think of.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

added log line for fallback

Copy link
Contributor

@priyanshi-yb priyanshi-yb left a comment

Choose a reason for hiding this comment

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

LGTM

@sanyamsinghal sanyamsinghal merged commit c1a0fad into main Aug 28, 2025
78 checks passed
@sanyamsinghal sanyamsinghal deleted the sanyam/db-18017 branch August 28, 2025 12:21
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.

2 participants