Skip to content

ingest convert processor add long and double type.#23423

Closed
fishioon wants to merge 5 commits intoelastic:masterfrom
fishioon:master
Closed

ingest convert processor add long and double type.#23423
fishioon wants to merge 5 commits intoelastic:masterfrom
fishioon:master

Conversation

@fishioon
Copy link
Copy Markdown

@fishioon fishioon commented Mar 1, 2017

issue around this enhancement here #23085

@clintongormley clintongormley added :Distributed/Ingest Node Execution or management of Ingest Pipelines >enhancement labels Mar 1, 2017
@clintongormley clintongormley requested a review from talevy March 1, 2017 13:15
@talevy
Copy link
Copy Markdown
Contributor

talevy commented Mar 2, 2017

brilliant!

We try to have tests on all of our PRs before merging them in -- think you are up for adding appropriate tests in this file: ConvertProcessorTests.java?

I can also follow-up with updating the documentation

@elasticmachine
Copy link
Copy Markdown
Collaborator

Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually?

@talevy
Copy link
Copy Markdown
Contributor

talevy commented Mar 3, 2017

jenkins please test this

1 similar comment
@talevy
Copy link
Copy Markdown
Contributor

talevy commented Mar 20, 2017

jenkins please test this

@fishioon
Copy link
Copy Markdown
Author

I am sorry for forgot this. It's my mistake and fix now.

@talevy
Copy link
Copy Markdown
Contributor

talevy commented Mar 22, 2017

no worries, I'll re-run the test and then do a final review. thanks for following up!

@talevy
Copy link
Copy Markdown
Contributor

talevy commented Mar 22, 2017

jenkins please test this

@fishioon
Copy link
Copy Markdown
Author

jenkins please test this

1 similar comment
@talevy
Copy link
Copy Markdown
Contributor

talevy commented Mar 29, 2017

jenkins please test this

Copy link
Copy Markdown
Contributor

@talevy talevy left a comment

Choose a reason for hiding this comment

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

Overall looks good, Left a note about the overlapped matching that can go on between floats and doubles.

I think I am OK with that, maybe we should change it to give Double higher precedence

try {
return FLOAT.convert(value);
} catch (IllegalArgumentException e) {}
try {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Problem here is that FLOAT.convert(value) would succeed and produce potential rounding errors instead of failing and dropping down to here.

Looks like setting AUTO would potentially never generate a FLOAT if we re-order these

assertThat(convertedValue, equalTo(randomFloat));
}

public void testAutoConvertMatchDouble() throws Exception {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This test fails because of my previous comment, Floats match before Doubles.

long randomLong = randomLong();
randomValue = randomLong;
break;
case 4:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

There is a tab (\t) here, should be converted to spaces 😄

@rjernst
Copy link
Copy Markdown
Member

rjernst commented Jun 9, 2017

@fishioon Are you interested in addressing the comments raised by @talevy?

@talevy
Copy link
Copy Markdown
Contributor

talevy commented Aug 1, 2017

Hi @fishioon. would love to see these changes go through, but there hasn't been a response in a while. I am going to go ahead and close this for now, but feel free to re-open the PR to continue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Distributed/Ingest Node Execution or management of Ingest Pipelines >enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants