Skip to content

Conversation

@xy720
Copy link
Member

@xy720 xy720 commented Apr 4, 2023

Proposed changes

In #17344 , we support template and variadic template function.

e.g.

[['element_at', '%element_extract%'], 'V', ['MAP<K, V>', 'K'], 'ALWAYS_NULLABLE', ['K', 'V']],

Then it raises a new issue, as some functions has unpredictable return type.
e.g.

[['element_at', '%element_extract%'], '???', ['STRUCT<TYPES>', 'VARCHAR'], 'ALWAYS_NULLABLE', ['TYPES...']],

This commit support ANY_TYPE.

If a function has ANY_TYPE as return type, then this function is an inference function.

e.g.

[['element_at', '%element_extract%'], 'ANY_TYPE', ['STRUCT<TYPES>', 'VARCHAR'], 'ALWAYS_NULLABLE', ['TYPES...']],

An inference function's return type will be analyze to actual type at runtime in FE.

Problem summary

Describe your changes.

Checklist(Required)

  • Does it affect the original behavior
  • Has unit tests been added
  • Has document been added or modified
  • Does it need to update dependencies
  • Is this PR support rollback (If NO, please explain WHY)

Further comments

If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...

@github-actions github-actions bot added the area/sql/function Issues or PRs related to the SQL functions label Apr 4, 2023
@github-actions github-actions bot added area/planner Issues or PRs related to the query planner area/vectorization labels Apr 6, 2023
@xy720 xy720 force-pushed the support-deduce-function-in-fe branch from cf6524d to 1e6a8a5 Compare April 6, 2023 08:12
@github-actions
Copy link
Contributor

github-actions bot commented Apr 6, 2023

clang-tidy review says "All clean, LGTM! 👍"

@xy720
Copy link
Member Author

xy720 commented Apr 6, 2023

run buildall

@xy720 xy720 force-pushed the support-deduce-function-in-fe branch from c87bf42 to bf61059 Compare April 7, 2023 05:00
@xy720
Copy link
Member Author

xy720 commented Apr 7, 2023

run buildall

@xy720
Copy link
Member Author

xy720 commented Apr 7, 2023

run p0

@xy720 xy720 force-pushed the support-deduce-function-in-fe branch from bf61059 to 10dc471 Compare April 7, 2023 10:28
@xy720
Copy link
Member Author

xy720 commented Apr 7, 2023

run buildall

@xy720 xy720 force-pushed the support-deduce-function-in-fe branch from 10dc471 to 6f6f19c Compare April 11, 2023 04:28
@xy720
Copy link
Member Author

xy720 commented Apr 11, 2023

run buildall

@xy720
Copy link
Member Author

xy720 commented Apr 11, 2023

run compile

@xy720
Copy link
Member Author

xy720 commented Apr 11, 2023

run p0

Copy link
Contributor

@cambyzju cambyzju left a comment

Choose a reason for hiding this comment

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

LGTM

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Apr 11, 2023
@github-actions
Copy link
Contributor

PR approved by at least one committer and no changes requested.

@github-actions
Copy link
Contributor

PR approved by anyone and no changes requested.

@xy720 xy720 merged commit cb644d5 into apache:master Apr 11, 2023
gnehil pushed a commit to gnehil/doris that referenced this pull request Apr 21, 2023
Add AnyType to Doris.
Support Inference function in fe SQL function.
Reminiscent pushed a commit to Reminiscent/doris that referenced this pull request May 15, 2023
Add AnyType to Doris.
Support Inference function in fe SQL function.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. area/planner Issues or PRs related to the query planner area/sql/function Issues or PRs related to the SQL functions area/vectorization reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants