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

reverse merge #25

Merged
merged 15 commits into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ netstat -i
cd pinot-integration-tests || exit 1
if [ "$RUN_TEST_SET" == "1" ]; then
mvn test \
-P github-actions,custom-cluster-integration-test-suite || exit 1
-P github-actions,codecoverage,custom-cluster-integration-test-suite || exit 1
fi
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ netstat -i
cd pinot-integration-tests || exit 1
if [ "$RUN_TEST_SET" == "1" ]; then
mvn test \
-P github-actions,integration-tests-set-1 && exit 0 || exit 1
-P github-actions,codecoverage,integration-tests-set-1 && exit 0 || exit 1
fi
if [ "$RUN_TEST_SET" == "2" ]; then
mvn test \
-P github-actions,integration-tests-set-2 && exit 0 || exit 1
-P github-actions,codecoverage,integration-tests-set-2 && exit 0 || exit 1
fi
6 changes: 4 additions & 2 deletions .github/workflows/scripts/pr-tests/.pinot_tests_unit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ if [ "$RUN_TEST_SET" == "1" ]; then
-pl 'pinot-core' \
-pl 'pinot-query-planner' \
-pl 'pinot-query-runtime' \
-P github-actions,no-integration-tests || exit 1
-P github-actions,codecoverage,no-integration-tests || exit 1
fi
if [ "$RUN_TEST_SET" == "2" ]; then
mvn test -T 16 \
Expand All @@ -48,5 +48,7 @@ if [ "$RUN_TEST_SET" == "2" ]; then
-pl '!pinot-query-planner' \
-pl '!pinot-query-runtime' \
-pl '!:pinot-yammer' \
-P github-actions,no-integration-tests || exit 1
-P github-actions,codecoverage,no-integration-tests || exit 1
fi

mvn jacoco:report-aggregate@report -P codecoverage || exit 1
104 changes: 58 additions & 46 deletions pinot-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,16 @@
<plugin>
<groupId>org.xolstice.maven.plugins</groupId>
<artifactId>protobuf-maven-plugin</artifactId>
<configuration>
<checkStaleness>true</checkStaleness>
</configuration>
<executions>
<execution>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
</plugin>

<plugin>
Expand All @@ -73,50 +83,6 @@
</java>
</configuration>
</plugin>

<!-- Following plugins and their configurations are used to generate the custom Calcite's SQL parser -->
<!-- Copy the templates present in the codegen directory to ${project.build.directory}/codegen -->
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-fmpp-resources</id>
<phase>generate-sources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/codegen</outputDirectory>
<resources>
<resource>
<directory>src/main/codegen</directory>
<filtering>false</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<!-- "Plugs in" the Calcite's Parser.jj with the variables present in config.fmpp. These contain the custom rules
as well as the class to which the custom implementation will get generated -->
<plugin>
<groupId>com.googlecode.fmpp-maven-plugin</groupId>
<artifactId>fmpp-maven-plugin</artifactId>
<executions>
<execution>
<id>generate-fmpp-sources</id>
<phase>generate-sources</phase>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<cfgFile>${project.build.directory}/codegen/config.fmpp</cfgFile>
<outputDirectory>${project.build.directory}/generated-sources</outputDirectory>
<templateDirectory>${project.build.directory}/codegen/templates</templateDirectory>
</configuration>
</execution>
</executions>
</plugin>
<!-- Creates a Java class for the custom parser from Parser.jj -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
Expand All @@ -129,13 +95,12 @@
<goal>javacc</goal>
</goals>
<configuration>
<sourceDirectory>${project.build.directory}/generated-sources/javacc</sourceDirectory>
<sourceDirectory>${project.build.directory}/generated-sources/fmpp/javacc</sourceDirectory>
<includes>
<include>Parser.jj</include>
</includes>
<lookAhead>2</lookAhead>
<isStatic>false</isStatic>
<outputDirectory>${project.build.directory}/generated-sources</outputDirectory>
</configuration>
</execution>
</executions>
Expand Down Expand Up @@ -372,5 +337,52 @@
<shade.phase.prop>package</shade.phase.prop>
</properties>
</profile>
<profile>
<!-- The fmpp-maven-plugin doesn't care about unchanged (re)sources and will always generate.
This causes the maven-compiler-plugin to detect changes and always recompile the Java sources.

If there are changes in src/main/codegen, either enforcer activation of this profile by using -Psqlparser or by
removing the generated-sources/fmpp directory

NOTICE: In Maven the profile activation is decided BEFORE plugin execution.
When running clean+verify, the profile will not be activated (because the file still exists),
clean will remove it and compiler-plugin will fail because of a missing class.
Either run 'mvn clean && mvn verify' or 'mvn verify -Psqlparser'
-->
<id>sqlparser</id>
<activation>
<file>
<missing>target/generated-sources/fmpp/javacc/Parser.jj</missing>
</file>
</activation>
<build>
<plugins>
<!-- "Plugs in" the Calcite's Parser.jj with the variables present in config.fmpp. These contain the custom rules
as well as the class to which the custom implementation will get generated -->
<plugin>
<groupId>com.googlecode.fmpp-maven-plugin</groupId>
<artifactId>fmpp-maven-plugin</artifactId>
<executions>
<execution>
<id>generate-fmpp-sources</id>
<phase>generate-sources</phase>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<cfgFile>src/main/codegen/config.fmpp</cfgFile>
<templateDirectory>src/main/codegen/templates</templateDirectory>
<outputDirectory>${project.build.directory}/generated-sources/fmpp</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin> <!-- Enforce javacc-maven-plugin executions after fmpp-maven-plugin -->
<groupId>org.codehaus.mojo</groupId>
<artifactId>javacc-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
Loading