Skip to content

Remove deprecated FunctionRegistry methods and inline CalciteSqlParser OPTIONS helpers#18789

Open
Akanksha-kedia wants to merge 2 commits into
apache:masterfrom
Akanksha-kedia:remove-deprecated-function-registry-methods
Open

Remove deprecated FunctionRegistry methods and inline CalciteSqlParser OPTIONS helpers#18789
Akanksha-kedia wants to merge 2 commits into
apache:masterfrom
Akanksha-kedia:remove-deprecated-function-registry-methods

Conversation

@Akanksha-kedia

@Akanksha-kedia Akanksha-kedia commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Drop FunctionRegistry.containsFunction(String) and getFunctionInfo(String, int) — both were marked @Deprecated with no callers outside the class
  • Inline the three private @Deprecated helpers in CalciteSqlParser (extractOptionsFromSql, removeOptionsFromSql, extractOptionsMap) directly into compileToSqlNodeAndOptions and delete the dead methods; behaviour is unchanged

Test plan

  • Existing CalciteSqlParserTest and FunctionRegistryTest pass — no API surface was removed that had external callers

@Akanksha-kedia

Copy link
Copy Markdown
Contributor Author

@xiangfu0

…r OPTIONS helpers

- Drop FunctionRegistry.containsFunction(String) and getFunctionInfo(String, int) — both
  had zero callers outside the class and were already marked @deprecated.
  Callers should use contains(canonicalName) and lookupFunctionInfo(canonicalName, n).

- Inline the three private @deprecated helpers in CalciteSqlParser
  (extractOptionsFromSql, removeOptionsFromSql, extractOptionsMap) directly into
  compileToSqlNodeAndOptions and delete the now-dead methods.
  Behavior is identical; the only change is eliminating the indirection.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Akanksha-kedia Akanksha-kedia force-pushed the remove-deprecated-function-registry-methods branch from 8a58d61 to ef5c6ba Compare June 17, 2026 13:56
@codecov-commenter

codecov-commenter commented Jun 17, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 85.71429% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 64.78%. Comparing base (6464736) to head (0302a4f).
⚠️ Report is 13 commits behind head on master.

Files with missing lines Patch % Lines
...org/apache/pinot/sql/parsers/CalciteSqlParser.java 85.71% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #18789      +/-   ##
============================================
- Coverage     64.78%   64.78%   -0.01%     
  Complexity     1309     1309              
============================================
  Files          3380     3381       +1     
  Lines        209540   209948     +408     
  Branches      32797    32887      +90     
============================================
+ Hits         135751   136013     +262     
- Misses        62863    62977     +114     
- Partials      10926    10958      +32     
Flag Coverage Δ
custom-integration1 100.00% <ø> (ø)
integration 100.00% <ø> (ø)
integration1 100.00% <ø> (ø)
integration2 0.00% <ø> (ø)
java-21 64.78% <85.71%> (-0.01%) ⬇️
temurin 64.78% <85.71%> (-0.01%) ⬇️
unittests 64.78% <85.71%> (-0.01%) ⬇️
unittests1 56.96% <85.71%> (-0.02%) ⬇️
unittests2 37.27% <85.71%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@xiangfu0 xiangfu0 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Found one high-signal compatibility issue; see inline comment.

* {@link #canonicalize(String)} multiple times.
*/
@Deprecated
public static boolean containsFunction(String name) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Removing the deprecated containsFunction(String) / getFunctionInfo(String,int) wrappers is still a binary-incompatible change for callers compiled against released pinot-common jars. Upgraders that still invoke those entry points will start failing with NoSuchMethodError, so Pinot usually needs to keep the old methods as delegating shims until there is an explicit compatibility-removal plan.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good point, thank you. I'll restore containsFunction(String) and getFunctionInfo(String,int) as delegating shims so callers compiled against released jars don't get NoSuchMethodError. The CalciteSqlParser inlining (private methods only) should remain unaffected — will update this PR shortly.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done — containsFunction(String) and getFunctionInfo(String, int) restored as delegating shims in the latest commit. PR now only contains the CalciteSqlParser inlining (private methods, no binary-compat impact).

@Akanksha-kedia

Copy link
Copy Markdown
Contributor Author

@xiangfu0 @Jackie-Jiang all CI checks pass, review comments addressed. Please review when you get a chance.

Per xiangfu0's review: containsFunction(String) and getFunctionInfo(String, int)
are public methods on a released pinot-common artifact; removing them would
cause NoSuchMethodError for callers compiled against older jars. Restore as
delegating stubs pending an explicit removal plan.
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.

3 participants