Skip to content

Moved create_empty_agtype out of loops to avoid repetition#888

Merged
jrgemignani merged 1 commit into
apache:masterfrom
mohayu22:mohayu22-props-1
May 3, 2023
Merged

Moved create_empty_agtype out of loops to avoid repetition#888
jrgemignani merged 1 commit into
apache:masterfrom
mohayu22:mohayu22-props-1

Conversation

@mohayu22

@mohayu22 mohayu22 commented May 2, 2023

Copy link
Copy Markdown
Contributor

create_empty_agtype can be classified as a pure function since it does not modify the database, but simply creates an empty agtype.

To avoid repeated calls inside the loop, create_empty_agtype was declared outside the loop and its output was assigned to the props variable which is then used inside the loop.

This approach ensures that the function is only called once and improves the efficiency of the code.

@jrgemignani

Copy link
Copy Markdown
Contributor

@mohayu22 Please adjust your commit description to the archaic 80 characters per line standard :)

image

To avoid repeated calls inside the loop,
"create_empty_agtype" was declared outside the loop
and its output was assigned to the "props" variable
which is then used inside the loop.
@mohayu22

mohayu22 commented May 3, 2023

Copy link
Copy Markdown
Contributor Author

@jrgemignani Done

@jrgemignani jrgemignani merged commit b0c9e9c into apache:master May 3, 2023
@mohayu22 mohayu22 deleted the mohayu22-props-1 branch May 3, 2023 20:48
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