Skip to content
Open
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 @@ -19,7 +19,7 @@ private SchemaHelper() {}
*
* @param createStatements a SQL string containing only CREATE statements
* @return a {@link CalciteCatalogReader} generated from the CREATE statements
* @throws SqlParseException
* @throws SqlParseException if the sql can not be parsed
*/
public static CalciteSchema processCreateStatementsToSchema(final List<String> createStatements)
throws SqlParseException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,15 @@
import io.substrait.util.EmptyVisitationContext;
import java.util.List;

/** ExpressionStringify gives a simple debug text output for Expressions */
/** ExpressionStringify gives a simple debug text output for Expressions. */
public class ExpressionStringify extends ParentStringify
implements ExpressionVisitor<String, EmptyVisitationContext, RuntimeException> {

/**
* Constructor.
*
* @param indent indent size
*/
public ExpressionStringify(int indent) {
super(indent);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
public class FunctionArgStringify extends ParentStringify
implements FuncArgVisitor<String, EmptyVisitationContext, RuntimeException> {

/**
* Constructor
*
* @param indent number of indents to use
*/
public FunctionArgStringify(int indent) {
super(indent);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,13 @@
*/
public class ParentStringify {

/** Indent character. */
protected String indentChar = " ";

/** Indents of idnentsize to use. */
protected int indent;

/** Size of each indent. */
protected int indentSize = 3;

/**
Expand Down Expand Up @@ -50,6 +55,12 @@ StringBuilder getContinuationIndentString() {
return sb;
}

/**
* Get the outdent to use, decreats indent counter.
*
* @param sb Stribug Builder with outdent
* @return outdent string
*/
protected String getOutdent(StringBuilder sb) {
indent--;
return (sb).toString();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ public class SubstraitStringify extends ParentStringify

private boolean showRemap = false;

/** Constructor. */
public SubstraitStringify() {
super(0);
}
Expand Down Expand Up @@ -96,7 +97,7 @@ public static List<String> explain(io.substrait.plan.Plan plan) {
/**
* Explains the Sustrait relation
*
* @param plan Subsrait relation
* @param rel Subsrait relation
* @return List of strings; typically these would then be logged or sent to stdout
*/
public static List<String> explain(io.substrait.relation.Rel rel) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,15 @@
import io.substrait.type.Type.VarChar;
import io.substrait.type.TypeVisitor;

/** TypeStringify produces a simple debug string of Substrait types */
/** TypeStringify produces a simple debug string of Substrait types. */
public class TypeStringify extends ParentStringify
implements TypeVisitor<String, RuntimeException> {

/**
* Constructor.
*
* @param indent numver of idents to use
*/
protected TypeStringify(int indent) {
super(indent);
}
Expand Down
7 changes: 7 additions & 0 deletions isthmus-cli/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,10 @@ tasks.register("writeIsthmusVersion") {
}

tasks.named("compileJava") { dependsOn("writeIsthmusVersion") }

tasks.named<Javadoc>("javadoc") {
description = "Generate Javadoc for main source files (excludes generated)."

val isthmusVersionClass = layout.buildDirectory.file("generated/sources").get().getAsFile()
exclude { spec -> spec.file.toPath().startsWith(isthmusVersionClass.toPath()) }
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
package io.substrait.isthmus.cli;

/** */
public class InitializeAtBuildTime {}
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import picocli.CommandLine.Option;
import picocli.CommandLine.Parameters;

/** Isthmus CLI entry point. */
@Command(
name = "isthmus",
versionProvider = io.substrait.isthmus.cli.IsthmusCliVersion.class,
Expand Down Expand Up @@ -61,6 +62,11 @@ enum OutputFormat {
description = "Calcite's casing policy for unquoted identifiers: ${COMPLETION-CANDIDATES}")
private Casing unquotedCasing = Casing.TO_UPPER;

/**
* Standard Java Main method.
*
* @param args Isthmus CLI arguments.
*/
public static void main(String... args) {
CommandLine commandLine = new CommandLine(new IsthmusEntryPoint());
commandLine.setCaseInsensitiveEnumValuesAllowed(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
import org.graalvm.nativeimage.hosted.RuntimeReflection;
import org.immutables.value.Value;

/** */
public final class RegisterAtRuntime implements Feature {
@Override
public void beforeAnalysis(BeforeAnalysisAccess access) {
Expand Down