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

Apply DomainTranslator to STARTS_WITH function #4669

Merged
merged 1 commit into from
Aug 4, 2020

Conversation

takezoe
Copy link
Member

@takezoe takezoe commented Aug 2, 2020

No description provided.

@cla-bot cla-bot bot added the cla-signed label Aug 2, 2020
@takezoe takezoe force-pushed the domain_translation_starts_with branch from 1c99fb2 to 40f8f89 Compare August 3, 2020 01:04
if (args.size() != 2) {
return Optional.empty();
}
if (!(args.get(0) instanceof SymbolReference)) {
Copy link
Member

Choose a reason for hiding this comment

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

please extarct args.get(0) and args.get(1) as separate variables

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed.

@takezoe takezoe force-pushed the domain_translation_starts_with branch from 40f8f89 to aaddb47 Compare August 3, 2020 14:37
Copy link
Member

@sopel39 sopel39 left a comment

Choose a reason for hiding this comment

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

lgtm % one extra test case

assertUnsupportedPredicate(startsWith(C_VARCHAR, stringLiteral("")));

// non-ASCII
testSimpleComparison(
Copy link
Member

Choose a reason for hiding this comment

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

Could you add test for complement case?

Copy link
Member Author

Choose a reason for hiding this comment

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

Added.

@@ -1582,6 +1582,39 @@ public void testLikePredicate()
assertUnsupportedPredicate(not(like(C_VARCHAR, stringLiteral("abc\\_def"))));
}

@Test
public void testStartsWithFunction()
Copy link
Member

Choose a reason for hiding this comment

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

Could you add a test for generic function call (that it's not supported)?

Copy link
Member Author

Choose a reason for hiding this comment

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

Added testUnsupportedFunctions() which tests some unsupported functions.

@takezoe takezoe force-pushed the domain_translation_starts_with branch from aaddb47 to 990129e Compare August 3, 2020 17:05
@sopel39 sopel39 merged commit c56f90a into trinodb:master Aug 4, 2020
@sopel39
Copy link
Member

sopel39 commented Aug 4, 2020

merged, thanks!

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

Successfully merging this pull request may close these issues.

3 participants