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

refactor: use SqlArgument wrapper to look up functions #7011

Merged

Conversation

stevenpyzhang
Copy link
Member

@stevenpyzhang stevenpyzhang commented Feb 17, 2021

Description

Uses SqlArgument wrapper when looking up functions. This allows us in future PR's to handle non SqlType function arguments (such as lambdas)

PR looks large, but it's mainly just replacing instances of SqlType with SqlArgument in UDF lookup code.

Testing done

Updated unit tests, non functional change

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 #")

@stevenpyzhang stevenpyzhang marked this pull request as ready for review February 17, 2021 07:28
@stevenpyzhang stevenpyzhang requested a review from a team as a code owner February 17, 2021 07:28
@stevenpyzhang stevenpyzhang requested a review from lct45 February 17, 2021 07:28
Copy link
Contributor

@lct45 lct45 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 pulling this out @stevenpyzhang , overall LGTM with a few questions/nits

) {
final SqlType sqlType = instance.getSqlType();

// CHECKSTYLE_RULES.ON: CyclomaticComplexity
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a usual pattern for where we turn the checkstyle rules back on?

Copy link
Member Author

Choose a reason for hiding this comment

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

Just following the other patterns, we usually turn it back on right after the method signature, I moved it up one line now

import io.confluent.ksql.schema.ksql.types.SqlType;

Copy link
Contributor

Choose a reason for hiding this comment

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

Does the IDE add these random extra lines?

Copy link
Member Author

Choose a reason for hiding this comment

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

Not sure where this came from, I removed it though

@stevenpyzhang stevenpyzhang requested a review from a team February 17, 2021 17:51
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