Class FormulaAnalyzer
java.lang.Object
io.deephaven.engine.table.impl.select.codegen.FormulaAnalyzer
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
A container to hold a single copy of imports required to compile formulas for one operation.static class
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic FormulaAnalyzer.Result
analyze
(String rawFormulaString, Map<String, ColumnDefinition<?>> columnDefinitionMap, QueryLanguageParser.Result queryLanguageResult) static QueryLanguageParser.Result
parseFormula
(@NotNull String formulaString, @NotNull Map<String, ColumnDefinition<?>> availableColumns, @NotNull Map<String, String> columnRenames, @NotNull FormulaAnalyzer.Imports imports) Get the compiled formula for a given formula string.static QueryLanguageParser.Result
parseFormula
(@NotNull String formulaString, @NotNull Map<String, ColumnDefinition<?>> availableColumns, @NotNull Map<String, String> columnRenames, @NotNull FormulaAnalyzer.Imports imports, boolean unboxArguments) Get the compiled formula for a given formula string.
-
Constructor Details
-
FormulaAnalyzer
public FormulaAnalyzer()
-
-
Method Details
-
analyze
public static FormulaAnalyzer.Result analyze(String rawFormulaString, Map<String, ColumnDefinition<?>> columnDefinitionMap, QueryLanguageParser.Result queryLanguageResult) -
parseFormula
public static QueryLanguageParser.Result parseFormula(@NotNull @NotNull String formulaString, @NotNull @NotNull Map<String, ColumnDefinition<?>> availableColumns, @NotNull @NotNull Map<String, throws ExceptionString> columnRenames, @NotNull @NotNull FormulaAnalyzer.Imports imports) Get the compiled formula for a given formula string.- Parameters:
formulaString
- The raw formula stringavailableColumns
- The columns available for use in the formulacolumnRenames
- Outer to inner column name mappingimports
- The query scope variables, package, class, and static imports- Returns:
- The parsed formula
result
- Throws:
Exception
- If the formula cannot be parsed
-
parseFormula
public static QueryLanguageParser.Result parseFormula(@NotNull @NotNull String formulaString, @NotNull @NotNull Map<String, ColumnDefinition<?>> availableColumns, @NotNull @NotNull Map<String, throws ExceptionString> columnRenames, @NotNull @NotNull FormulaAnalyzer.Imports imports, boolean unboxArguments) Get the compiled formula for a given formula string.- Parameters:
formulaString
- The raw formula stringavailableColumns
- The columns available for use in the formulacolumnRenames
- Outer to inner column name mappingimports
- The query scope variables, package, class, and static importsunboxArguments
- If true it will unbox the query scope arguments- Returns:
- The parsed formula
result
- Throws:
Exception
- If the formula cannot be parsed
-