Skip to content

Commit

Permalink
Fix 'mvn site' on JDK 1.8 and enable in Travis-CI.
Browse files Browse the repository at this point in the history
Fix several javadoc errors and warnings.

Remove some duplicate package-info.java files.

Remove versions of maven plugins where apache pom already specifies a version.
  • Loading branch information
julianhyde committed Aug 22, 2014
1 parent 0d84e62 commit 55fbf04
Show file tree
Hide file tree
Showing 19 changed files with 53 additions and 148 deletions.
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,7 @@ jdk:
branches:
only:
- master

- javadoc
script:
mvn test site
# End .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,7 @@ public TimeZone getTimeZone() {
/**
* Executes a parsed query, closing any previously open result set.
*
* @param statement Statement
* @param prepareResult Parsed query
* @return Result set
* @throws java.sql.SQLException if a database error occurs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ AvaticaPreparedStatement newPreparedStatement(
*
* @param statement Statement
* @param prepareResult Prepared statement
* @param timeZone Time zone
* @return Result set
*/
AvaticaResultSet newResultSet(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ public abstract class AvaticaPreparedStatement
*
* @param connection Connection
* @param prepareResult Result of preparing statement
* @param resultSetType Result set type
* @param resultSetConcurrency Result set concurrency
* @param resultSetHoldability Result set holdability
* @throws SQLException If fails due to underlying implementation reasons.
*/
protected AvaticaPreparedStatement(
Expand Down
5 changes: 4 additions & 1 deletion avatica/src/main/java/net/hydromatic/avatica/Cursor.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ List<Accessor> createAccessors(List<ColumnMetaData> types,
* Moves to the next row.
*
* @return Whether moved
*
* @throws SQLException on database error
*/
boolean next() throws SQLException;

Expand All @@ -55,7 +57,8 @@ List<Accessor> createAccessors(List<ColumnMetaData> types,

/**
* Returns whether the last value returned was null.
* @throws SQLException
*
* @throws SQLException on database error
*/
boolean wasNull() throws SQLException;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,6 @@ public class ConnectStringParserTest {
* href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/oledb/htm/oledbconnectionstringsyntax.asp">
* OLE DB spec</a>. Omitted are cases for Window handles, returning multiple
* values, and special handling of "Provider" keyword.
*
* @throws Throwable
*/
@Test public void testOleDbExamples() throws Throwable {
// test the parser with examples from OLE DB documentation
Expand Down
17 changes: 10 additions & 7 deletions core/src/main/java/org/eigenbase/rel/metadata/RelMdPredicates.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,17 @@
* Grouping Keys. This can be extended to infer predicates on Aggregation
* expressions from expressions on the aggregated columns. For e.g.
* <pre>
* select a, max(b) from R1 where b > 7 => max(b) > 7 or max(b) is null
* select a, max(b) from R1 where b &gt; 7
* &rarr; max(b) &gt; 7 or max(b) is null
* </pre>
*
* <li> For Projections we only look at columns that are projected without
* any function applied. So:
* <pre>
* select a from R1 where a > 7 -> a > 7 is pulledUp from the Projection.
* select a + 1 from R1 where a + 1 > 7 -> a + 1 > 7 is not pulledUp
* select a from R1 where a &gt; 7
* &rarr; "a &gt; 7" is pulled up from the Projection.
* select a + 1 from R1 where a + 1 &gt; 7
* &rarr; "a + 1 gt; 7" is not pulled up
* </pre>
*
* <li> There are several restrictions on Joins:
Expand Down Expand Up @@ -135,9 +138,9 @@ public RelOptPredicateList getPredicates(TableAccessRelBase table) {
* is not in the projection list.
*
* <pre>
* childPullUpExprs: {a > 7, b + c < 10, a + e = 9}
* childPullUpExprs: {a &gt; 7, b + c &lt; 10, a + e = 9}
* projectionExprs: {a, b, c, e / 2}
* projectionPullupExprs: {a > 7, b + c < 10}
* projectionPullupExprs: {a &gt; 7, b + c &lt; 10}
* </pre>
*
* </ol>
Expand Down Expand Up @@ -213,9 +216,9 @@ public RelOptPredicateList getPredicates(JoinRelBase join) {
* GroupSet. For e.g.
*
* <pre>
* childPullUpExprs : { a > 7, b + c < 10, a + e = 9}
* childPullUpExprs : { a &gt; 7, b + c &lt; 10, a + e = 9}
* groupSet : { a, b}
* pulledUpExprs : { a > 7}
* pulledUpExprs : { a &gt; 7}
* </pre>
*/
public RelOptPredicateList getPredicates(AggregateRelBase agg) {
Expand Down
3 changes: 2 additions & 1 deletion core/src/test/java/org/eigenbase/test/DiffRepository.java
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,8 @@ public interface Filter {
* @param testCaseName Test case name
* @param tag Tag being expanded
* @param text Text being expanded
* @param expanded Expanded text @return Expanded text after filtering
* @param expanded Expanded text
* @return Expanded text after filtering
*/
String filter(
DiffRepository diffRepository,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ void assertConvertsTo(
*
* @param sql SQL query
* @param plan Expected plan
* @param trim Whether to trim columns that are not needed
*/
void assertConvertsTo(
String sql,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
* <p>
* The syntactic structure of an <i>mtsql</i> script is:
*
* <p><pre>
* <pre>
* &lt;directive&gt;*
* &lt;setup section&gt;?
* &lt;cleanup section&gt;?
Expand Down Expand Up @@ -74,8 +74,6 @@
* Next all the thread sections are run at once, each in its own thread.
* When all these threads complete, the cleanup section (if any) is run.
*
* <p>
*
* <h4>Synchronization:</h4>
*
* <p>The threads are synchronized by inserting synchronization points
Expand Down Expand Up @@ -112,19 +110,19 @@
*
* <h4>Basic Commands (allowed in any section):</h4>
*
* <p><pre>
* <pre>
* &lt;SQL statement&gt;:
* An SQL statement terminated by a semicolon. The statement can span lines.
* </pre>
* <p><pre>
* <pre>
* &#64;include FILE
* Reads and executes the contents of FILE, another mtsql script.
* Inclusions may nest.
* </pre>
*
* <h4>Threaded Commands (allowed only in a &#64;thread section):</h4>
*
* <p><pre>
* <pre>
* &#64;sleep N -- thread sleeps for N milliseconds
* &#64;echo MESSAGE -- prints the message to stdout
*
Expand Down Expand Up @@ -176,7 +174,6 @@
* useful to
* parameterize SQL statements, timeout values etc.
*
* <p>
* <ul>
* <li>Variable Expansion: If VAR is a declared variable, $VAR is replaced
* by the value of VAR. Quotes are ignored. $$ expands to $. A variable
Expand Down
23 changes: 0 additions & 23 deletions mongodb/src/test/java/net/hydromatic/optiq/test/package-info.java

This file was deleted.

32 changes: 1 addition & 31 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,6 @@ limitations under the License.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.2.1</version>
<executions>
<execution>
<id>attach-sources</id>
Expand All @@ -253,7 +252,6 @@ limitations under the License.
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.5</source>
<target>1.5</target>
Expand Down Expand Up @@ -283,7 +281,6 @@ limitations under the License.
</plugin>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<version>2.4.2</version>
<dependencies>
<dependency>
<groupId>org.apache.maven.scm</groupId>
Expand All @@ -307,35 +304,10 @@ limitations under the License.
<artifactId>hydromatic-resource-maven-plugin</artifactId>
<version>0.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.4.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.2.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.16</version>
<version>2.1</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
Expand All @@ -362,7 +334,6 @@ limitations under the License.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.8.1</version>
<configuration>
<links>
<link>http://docs.oracle.com/javase/8/docs/api/</link>
Expand Down Expand Up @@ -471,7 +442,6 @@ limitations under the License.
<plugin>
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId>
<version>0.10</version>
<configuration>
<excludes>
<exclude>*.md</exclude>
Expand Down
23 changes: 0 additions & 23 deletions spark/src/test/java/net/hydromatic/optiq/test/package-info.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
*/

/**
* Provides utility classes.
* Executes queries via Splunk's REST API.
*/
package org.eigenbase.util;
package net.hydromatic.optiq.impl.splunk.search;

// End package-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
*/

/**
* Provides utility classes.
* Utilities for RPC to Splunk.
*/
package org.eigenbase.util;
package net.hydromatic.optiq.impl.splunk.util;

// End package-info.java
23 changes: 0 additions & 23 deletions splunk/src/test/java/net/hydromatic/optiq/test/package-info.java

This file was deleted.

3 changes: 3 additions & 0 deletions src/main/config/checkstyle/suppressions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ limitations under the License.
<!-- Suppress JavadocPackage in the test packages -->
<suppress checks="JavadocPackage" files="src[/\\]test[/\\]java[/\\]"/>

<!-- And likewise in ubenchmark -->
<suppress checks="JavadocPackage" files="StatementTest.java"/>

<!-- Method names in Resource can have underscores -->
<suppress checks="MethodName" files="EigenbaseNewResource.java"/>

Expand Down
16 changes: 16 additions & 0 deletions ubenchmark/src/main/java/net/hydromatic/optiq/StatementTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,22 @@

/**
* Compares {@link java.sql.Statement} vs {@link java.sql.PreparedStatement}.
*
* <p>This package contains micro-benchmarks to test optiq performance.
*
* <p>To run this and other benchmarks:
*
* <blockquote>
* <code>mvn package &amp;&amp;
* java -jar ./target/ubenchmarks.jar -wi 5 -i 5 -f 1</code>
* </blockquote>
*
* <p>To run with profiling:
*
* <blockquote>
* <code>java -Djmh.stack.lines=10 -jar ./target/ubenchmarks.jar
* -prof hs_comp,hs_gc,stack -f 1 -wi 5</code>
* </blockquote>
*/
public class StatementTest {

Expand Down
Loading

0 comments on commit 55fbf04

Please sign in to comment.