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: remove CUSTOM from SqlTypeBase #3293

Merged
merged 1 commit into from
Sep 4, 2019

Conversation

agavra
Copy link
Contributor

@agavra agavra commented Sep 3, 2019

Description

Instead of having a rewriter rewrite the types, TypeContextUtil performs the rewriting in place.

Testing done

  • Added more unit tests
  • E2E testing

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

@agavra agavra requested a review from a team as a code owner September 3, 2019 20:08
@@ -316,7 +317,7 @@ private void addFunction(final Class theClass,
if (annotation.isPresent() && !annotation.get().schema().isEmpty()) {
return SchemaConverters.sqlToConnectConverter()
.toConnectSchema(
TypeContextUtil.getType(annotation.get().schema()).getSqlType(),
TypeContextUtil.getType(annotation.get().schema(), TypeRegistry.EMPTY).getSqlType(),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

custom types aren't yet supported in UDF declarations

@@ -116,7 +117,7 @@

private static Optional<Schema> parseSchema(final String schema) {
return Optional.ofNullable(schema)
.map(TypeContextUtil::getType)
.map(schemaString -> TypeContextUtil.getType(schemaString, TypeRegistry.EMPTY))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

custom types aren't supported in QTT

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.

LGTM

@vcrfxia vcrfxia requested a review from a team September 4, 2019 15:06
@agavra agavra merged commit 6a3a2b9 into confluentinc:master Sep 4, 2019
@agavra agavra deleted the types_refactor branch September 4, 2019 15:59
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