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

Add support for Presto's REGEXP_* functions #380

Merged
merged 5 commits into from
Jun 11, 2019
Merged

Conversation

dongyoungy
Copy link
Contributor

(Resolves #377)
Add support for the following REGEXP_* functions in Presto as shown in https://prestosql.io/docs/current/functions/regexp.html:

  • REGEXP_EXTRACT_ALL
  • REGEXP_EXTRACT
  • REGEXP_LIKE
  • REGEXP_REPLACE
  • REGEXP_SPLIT

Please note that the lambda expression used in one of the example at the website is not currently supported in VerdictDB.

Copy link
Member

@pyongjoo pyongjoo left a comment

Choose a reason for hiding this comment

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

Thanks! I just left minor comment regarding pom.xml

pom.xml Outdated
<groupId>com.facebook.presto</groupId>
<artifactId>presto-jdbc</artifactId>
<version>0.212</version>
<!-- <scope>test</scope> -->
Copy link
Member

Choose a reason for hiding this comment

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

It looks like we have been including jdbc drivers only for the test phase. Is there any difference for Presto?

@voycey
Copy link

voycey commented Jun 10, 2019 via email

@dongyoungy
Copy link
Contributor Author

I think we had an internal discussion of 'providing JDBC drivers' vs. 'letting users use their own JDBC' and IIRC, the test-only scope has been commented out as a result. It was commented out in this commit: ac65e2c

I will update the JDBC version and restore the test scope for now.

@dongyoungy
Copy link
Contributor Author

dongyoungy commented Jun 10, 2019

After a little bit of digging, it looks likes our PrestoJDBCConnection class requires PrestoStatement and QueryStats so that is actually why we removed 'test' scope previously.

Copy link
Member

@pyongjoo pyongjoo left a comment

Choose a reason for hiding this comment

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

I see. I think I imported those presto-specific classes for printing out query progress.

@codecov-io
Copy link

codecov-io commented Jun 10, 2019

Codecov Report

Merging #380 into master will increase coverage by 0.1%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #380     +/-   ##
=========================================
+ Coverage   66.43%   66.53%   +0.1%     
=========================================
  Files         169      169             
  Lines       11635    11635             
  Branches     1903     1903             
=========================================
+ Hits         7729     7740     +11     
+ Misses       3397     3387     -10     
+ Partials      509      508      -1
Impacted Files Coverage Δ
...org/verdictdb/connection/PrestoJdbcConnection.java 36.67% <ø> (ø) ⬆️
...ain/java/org/verdictdb/sqlsyntax/PrestoSyntax.java 13.34% <100%> (ø) ⬆️
...or/QueryResultAccuracyEstimatorFromDifference.java 83.17% <0%> (-0.99%) ⬇️
...va/org/verdictdb/coordinator/ExecutionContext.java 62.13% <0%> (-0.54%) ⬇️
.../core/scrambling/FastConvergeScramblingMethod.java 91.91% <0%> (+0.58%) ⬆️
.../verdictdb/core/execplan/ExecutableNodeRunner.java 88.54% <0%> (+4.75%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 095d0d0...85f7244. Read the comment docs.

@dongyoungy
Copy link
Contributor Author

I am merging this PR after updating the group id of presto-jdbc to io.prestosql (which should be more up-to-date).

@dongyoungy dongyoungy merged commit fc2770f into master Jun 11, 2019
@dongyoungy dongyoungy deleted the dyoon-feature-377 branch June 11, 2019 16:45
@pyongjoo
Copy link
Member

Thanks!

@commercial-hippie
Copy link
Contributor

Thanks for this!

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.

[Presto] Missing REGEX functions
5 participants