Skip to content

Conversation

@matriv
Copy link
Contributor

@matriv matriv commented Mar 3, 2020

Set size/displaySize to 45 which is the maximum string for
an IP (v6), since IPs are returned as strings.

Fixes: #52762

Set size/displaySize to 45 which is the maximum string for
an IP (v6), since IPs are returned as strings.

Fixes: elastic#52762
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search (:Search/SQL)

Copy link
Member

@costin costin left a comment

Choose a reason for hiding this comment

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

LGTM

}
if (dataType == IP) {
return 39;
return 45;
Copy link
Member

Choose a reason for hiding this comment

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

DataType.size() could be potentially returned since it's the same value.

if (dataType == DATETIME) {
return 29;
}
if (dataType == IP) {
Copy link
Member

Choose a reason for hiding this comment

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

DataType.size() could be potentially returned since it's the same value.

In fact, maybe this approach could be used for other DataTypes as well if applicable - that is whenever size == displaySize

@costin
Copy link
Member

costin commented Mar 3, 2020

No need to backport all the way to 6.x

@matriv matriv removed the v6.8.8 label Mar 3, 2020
Copy link
Contributor

@bpintea bpintea left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@astefan astefan left a comment

Choose a reason for hiding this comment

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

LGTM

@matriv matriv merged commit 815f017 into elastic:master Mar 4, 2020
@matriv matriv deleted the fix-52762 branch March 4, 2020 09:09
matriv added a commit that referenced this pull request Mar 4, 2020
Set size/displaySize to 45 which is the maximum string for
an IP (v6), since IPs are returned as strings.

Fixes: #52762

(cherry picked from commit 815f017)
matriv added a commit that referenced this pull request Mar 4, 2020
Set size/displaySize to 45 which is the maximum string for
an IP (v6), since IPs are returned as strings.

Fixes: #52762

(cherry picked from commit 815f017)
matriv added a commit that referenced this pull request Mar 4, 2020
Set size/displaySize to 45 which is the maximum string for
an IP (v6), since IPs are returned as strings.

Fixes: #52762

(cherry picked from commit 815f017)
@matriv matriv added the v6.8.8 label Mar 4, 2020
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.

SQL: IP type reported to have column size of 0

6 participants