Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#1938 GEO_DISTANCE function broken by new UDF Invoker #2700

Merged
merged 9 commits into from May 8, 2019
Merged

#1938 GEO_DISTANCE function broken by new UDF Invoker #2700

merged 9 commits into from May 8, 2019

Conversation

uurl
Copy link
Contributor

@uurl uurl commented Apr 17, 2019

Description

This PR fixes #1938 GEO_DISTANCE function broken by new UDF Invoker

Testing done

mvn clean package

Reviewer checklist

  • Ensure docs are updated if necessary. (eg. if a user visible feature is being added or changed).
  • Ensure relevant issues are linked (description should include text like "Fixes #")

@uurl uurl requested a review from a team as a code owner April 17, 2019 09:49
Copy link
Contributor

@agavra agavra left a comment

Choose a reason for hiding this comment

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

Thanks @uurl! I think the preferred approach, however, would be to move this to the new UDF framework (e.g. using the @UdfDescription annotation, you can see an example in DateToString.java). This way, it will require primitives (non-null) to match the function without the explicit null checks simply by looking at the signature of the method and seeing primitives as parameters.

I would also recommend that you add a test for this using our QueryTranslationTest framework, which you can see an example in datestring.json, including a case for when it should _not _work (e.g. nulls are passed in). To see an example syntax for expected exception take a look at cast.json

@agavra agavra requested a review from a team April 17, 2019 20:37
@big-andy-coates big-andy-coates requested review from rodesai, hjafarpour and vcrfxia and removed request for a team May 1, 2019 10:39
@vcrfxia vcrfxia requested a review from agavra May 1, 2019 21:00
Copy link
Contributor

@agavra agavra left a comment

Choose a reason for hiding this comment

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

This is looking really good! Just a few comments in-line :)

@agavra agavra self-requested a review May 1, 2019 21:08
Copy link
Contributor

@agavra agavra left a comment

Choose a reason for hiding this comment

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

Thanks @uurl! Some more comments in-line, also please check why the tests are failing https://jenkins.confluent.io/job/confluentinc-pr/job/ksql/job/PR-2700/12/testReport/ - I think the comments that I have given will address them, but you can run the tests locally with mvn clean install

@agavra agavra self-requested a review May 2, 2019 17:25
Copy link
Contributor

@agavra agavra left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for the contribution @uurl - we may need to rebase to get the tests passing, the current failure seems unrelated to your change. I'll ask some folk to give you a second review and then we can get this merged.

@uurl
Copy link
Contributor Author

uurl commented May 7, 2019

Copy link
Contributor

@vcrfxia vcrfxia left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution, @uurl ! Apologies I've left so many nits, but they shouldn't take long to address and I'm happy to get this merged for you as soon as that happens.

@uurl
Copy link
Contributor Author

uurl commented May 8, 2019

@vcrfxia Ready, thanks

Copy link
Contributor

@vcrfxia vcrfxia left a comment

Choose a reason for hiding this comment

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

Thanks so much @uurl -- merging now!

@vcrfxia vcrfxia merged commit 5914735 into confluentinc:master May 8, 2019
@uurl uurl deleted the issue1938 branch May 10, 2019 14:02
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.

GEO_DISTANCE function broken by new UDF Invoker
3 participants