Skip to content

Conversation

@bpintea
Copy link
Collaborator

@bpintea bpintea commented Feb 5, 2020

This PR initialises a variable ("format") that can be read
uninitialised. There are no negative manifestations of this issue.


The var carries the type of time format that has been detected when
parsing a string input value, which would subsequently be converted to
a TIME/DATE/TIMESTAMP data type. In case the source is a string
representing a TIMESTAMP and the destination a DATE, the representation
of the destination is obtained from the original input, by zero-ing the
time part (since this is how DATEs are represented in ES/SQL) and the
"format" var decides, in a disjunction with another variable, on this
action.

In case the source is of the type DATE and the destination also a DATE,
the "format" var would not be set, but its value read. In the case the
random value the var can take matches the condition, a zero'ing of an
already zero'd string would happen, with no other side-effect.

This commit initializes a variable ("format") that can be read
uninitialized. There are no negative manifestations of this issue.

The var carries the type of time format that has been detected when
parssing a string input value, which would subsequently be converted to
a TIME/DATE/TIMESTAMP data type. In case the source is a string
representing a TIMESTAMP and the destination a DATE, the representation
of the destination is obtained from the original input, by zero-ing the
time part (since this is how DATEs are represented in ES/SQL) and the
"format" var decides, in a disjunction with another variable, on this
action.

In case the source is of the type DATE and the destination also a DATE,
the "format" var would not be set, but its value read. In the case the
random value the var can take matches the condition, a zero'ing of an
already zero'd string would happen, with no other side-effect.
Copy link

@droberts195 droberts195 left a comment

Choose a reason for hiding this comment

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

LGTM

@bpintea bpintea merged commit d1392c7 into elastic:master Feb 6, 2020
bpintea added a commit that referenced this pull request Feb 11, 2020
This commit initializes a variable ("format") that can be read
uninitialized. There are no negative manifestations of this issue.

The var carries the type of time format that has been detected when
parssing a string input value, which would subsequently be converted to
a TIME/DATE/TIMESTAMP data type. In case the source is a string
representing a TIMESTAMP and the destination a DATE, the representation
of the destination is obtained from the original input, by zero-ing the
time part (since this is how DATEs are represented in ES/SQL) and the
"format" var decides, in a disjunction with another variable, on this
action.

In case the source is of the type DATE and the destination also a DATE,
the "format" var would not be set, but its value read. In the case the
random value the var can take matches the condition, a zero'ing of an
already zero'd string would happen, with no other side-effect.

(cherry picked from commit d1392c7)
bpintea added a commit that referenced this pull request Feb 11, 2020
This commit initializes a variable ("format") that can be read
uninitialized. There are no negative manifestations of this issue.

The var carries the type of time format that has been detected when
parssing a string input value, which would subsequently be converted to
a TIME/DATE/TIMESTAMP data type. In case the source is a string
representing a TIMESTAMP and the destination a DATE, the representation
of the destination is obtained from the original input, by zero-ing the
time part (since this is how DATEs are represented in ES/SQL) and the
"format" var decides, in a disjunction with another variable, on this
action.

In case the source is of the type DATE and the destination also a DATE,
the "format" var would not be set, but its value read. In the case the
random value the var can take matches the condition, a zero'ing of an
already zero'd string would happen, with no other side-effect.

(cherry picked from commit d1392c7)
@bpintea bpintea deleted the fix/use_of_united_var_format branch April 3, 2020 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants