-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Scalar function for url encoding and decoding #8378
Conversation
9d12d16
to
71d2e7b
Compare
Codecov Report
@@ Coverage Diff @@
## master #8378 +/- ##
============================================
- Coverage 70.79% 61.07% -9.73%
+ Complexity 4264 4192 -72
============================================
Files 1640 1640
Lines 85931 86228 +297
Branches 12922 13035 +113
============================================
- Hits 60837 52664 -8173
- Misses 20899 29679 +8780
+ Partials 4195 3885 -310
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
@@ -94,6 +94,15 @@ public void testLiteralOnlyTransformBrokerRequestFromSQL() { | |||
.compileToPinotQuery("SELECT ago('PT1H'), fromDateTime('2020-01-01 UTC', 'yyyy-MM-dd z') FROM myTable"))); | |||
Assert.assertFalse(BaseBrokerRequestHandler | |||
.isLiteralOnlyQuery(CalciteSqlParser.compileToPinotQuery("SELECT count(*) from foo where bar > ago('PT1H')"))); | |||
Assert.assertTrue(BaseBrokerRequestHandler.isLiteralOnlyQuery(CalciteSqlParser |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we not use full URLs as inputs to encodeUrl / decodeUrl functions in tests ? From user perspective, they will use the full URL right ?
SELECT encodeUrl(<myURL>) FROM FOO .....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jasperjiaguo - please add test cases with real URLs as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I merged the PR too soon. @jasperjiaguo Can you please address Sidd's comments in a separate PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM otherwise
Description
Add scalar functions to perform url encoding and decoding in queries.
Upgrade Notes
Does this PR prevent a zero down-time upgrade? (Assume upgrade order: Controller, Broker, Server, Minion)
No