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 SCALAR type into TransformFunctionType #5544

Merged
merged 2 commits into from Jun 12, 2020

Conversation

Jackie-Jiang
Copy link
Contributor

Description

Inside query engine, scalar function is modeled as TransformFunction (ScalarTransformFunctionWrapper)
Add SCALAR type into TransformFunctionType so that FunctionDefinitionRegistry can identify scalar function as transform function

Inside query engine, scalar function is modeled as TransformFunction (ScalarTransformFunctionWrapper)
Add SCALAR type into TransformFunctionType so that FunctionDefinitionRegistry can identify scalar function as transform function
@codecov-commenter
Copy link

codecov-commenter commented Jun 12, 2020

Codecov Report

❗ No coverage uploaded for pull request base (master@f1f1c41). Click here to learn what that means.
The diff coverage is 75.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #5544   +/-   ##
=========================================
  Coverage          ?   66.29%           
=========================================
  Files             ?     1105           
  Lines             ?    56877           
  Branches          ?     8506           
=========================================
  Hits              ?    37709           
  Misses            ?    16378           
  Partials          ?     2790           
Flag Coverage Δ
#integrationtests 44.88% <50.00%> (?)
#unittests 56.79% <75.00%> (?)
Impacted Files Coverage Δ
...apache/pinot/common/function/FunctionRegistry.java 82.14% <ø> (ø)
...e/pinot/common/function/TransformFunctionType.java 88.88% <75.00%> (ø)
...rm/transformer/datetime/SDFToEpochTransformer.java 100.00% <0.00%> (ø)
...org/apache/pinot/core/plan/ProjectionPlanNode.java 61.11% <0.00%> (ø)
...ot/core/segment/index/readers/BytesDictionary.java 100.00% <0.00%> (ø)
...gin/inputformat/avro/SimpleAvroMessageDecoder.java 0.00% <0.00%> (ø)
...che/pinot/common/restlet/resources/TablesList.java 100.00% <0.00%> (ø)
...g/apache/pinot/core/common/DataSourceMetadata.java 100.00% <0.00%> (ø)
.../apache/pinot/controller/util/TableSizeReader.java 96.15% <0.00%> (ø)
...ment/index/readers/text/LuceneTextIndexReader.java 76.78% <0.00%> (ø)
... and 1097 more

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 f1f1c41...e085cfe. Read the comment docs.

@@ -70,6 +73,9 @@ public static TransformFunctionType getTransformFunctionType(String functionName
try {
return TransformFunctionType.valueOf(upperCaseFunctionName);
} catch (Exception e) {
if (FunctionRegistry.getFunctionByName(functionName) != null) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This looks a bit hacky especially if FunctionRegistry starts getting used for something else as well (in addition to scalar functions). May be update the Javadoc of FunctionRegistry to state it is for scalar functions?

Currently it says in-built Pinot functions which is misleading since today all functions are in-built functions.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@siddharthteotia Updated the doc, and also added a TODO to merge FunctionRegistry and FunctionDefinitionRegistry to provide one single registry for all functions.

Copy link
Contributor

Choose a reason for hiding this comment

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

Awesome. Thanks!

@Jackie-Jiang Jackie-Jiang merged commit fcc3144 into apache:master Jun 12, 2020
@Jackie-Jiang Jackie-Jiang deleted the transform_function_type branch June 12, 2020 21:05
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.

None yet

3 participants