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

Support functions with complex parameters #3356

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

hbalasu2
Copy link
Contributor

What type of PR is this?

-> Improvement

What does this PR do / why is it needed ?

-> Add getter method generators to protocol generation
-> Support functions with complex parameters

@hbalasu2 hbalasu2 requested a review from a team as a code owner January 15, 2025 21:25
Copy link

github-actions bot commented Jan 15, 2025

Test Results

  1 029 files    1 029 suites   2h 2m 54s ⏱️
13 236 tests 13 113 ✔️ 123 💤 0
19 275 runs  19 152 ✔️ 123 💤 0

Results for commit 2d3ebf3.

♻️ This comment has been updated with latest results.

@hbalasu2 hbalasu2 changed the title Review functions with complex parameters Support functions with complex parameters Jan 16, 2025
rafaelbey
rafaelbey previously approved these changes Jan 16, 2025
@rafaelbey
Copy link
Contributor

We should handle the parameter validation inside
'meta::pure::executionPlan::platformBinding::legendJava::generateLegendJavaPlatformBindingCode'

String protocolObjectClassName = parameterValidationContext.protocolClassName;
try
{
Class<?> protocolObjectClass = ExecutionPlanJavaCompilerExtensionLoader.extensions().stream()
Copy link
Contributor

Choose a reason for hiding this comment

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

Class.forName(protocolObjectClassName)

{
return Lists.mutable.<Class<? extends ExecutionPlanJavaCompilerExtension>>empty()
.with(MongoDBDocumentFormatJavaCompilerExtension.class)
.with(IngestJavaCompilerExtension.class)
Copy link
Contributor

Choose a reason for hiding this comment

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

Not needed

@@ -192,6 +192,11 @@ Class meta::pure::executionPlan::EnumValidationContext extends ParameterValidati
validEnumValues: String[*];
}

Class meta::pure::executionPlan::ProtocolObjectValidationContext extends ParameterValidationContext
{
protocolClassName: String[1];
Copy link
Contributor

Choose a reason for hiding this comment

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

parameterClass: Class[1];
protocolClassName: String[0..1];


import java.util.Map;

public class IngestJavaCompilerExtension implements ExecutionPlanJavaCompilerExtension
Copy link
Contributor

Choose a reason for hiding this comment

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

We dont need this anymore

import meta::external::language::java::factory::*;
import meta::external::language::java::transform::*;

function meta::external::ingest::platformBinding::ingestLegendJavaPlatformBindingExtension(): meta::pure::executionPlan::platformBinding::legendJava::LegendJavaPlatformBindingExtension[1]
Copy link
Contributor

Choose a reason for hiding this comment

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

We dont need this anymore

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.

2 participants