Skip to content

Commit

Permalink
[INLONG-10873][SDK]Transform support factorial function
Browse files Browse the repository at this point in the history
  • Loading branch information
youzhi886 committed Sep 1, 2024
1 parent 411b257 commit b004ac4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import org.apache.inlong.sdk.transform.process.function.DateExtractFunction.DateExtractFunctionType;
import org.apache.inlong.sdk.transform.process.function.DateFormatFunction;
import org.apache.inlong.sdk.transform.process.function.ExpFunction;
import org.apache.inlong.sdk.transform.process.function.FactorialFunction;
import org.apache.inlong.sdk.transform.process.function.FloorFunction;
import org.apache.inlong.sdk.transform.process.function.FromUnixTimeFunction;
import org.apache.inlong.sdk.transform.process.function.LnFunction;
Expand All @@ -43,7 +44,6 @@
import org.apache.inlong.sdk.transform.process.function.ToDateFunction;
import org.apache.inlong.sdk.transform.process.function.ToTimestampFunction;
import org.apache.inlong.sdk.transform.process.function.UnixTimestampFunction;
import org.apache.inlong.sdk.transform.process.function.FactorialFunction;
import org.apache.inlong.sdk.transform.process.parser.AdditionParser;
import org.apache.inlong.sdk.transform.process.parser.ColumnParser;
import org.apache.inlong.sdk.transform.process.parser.DateParser;
Expand Down Expand Up @@ -191,7 +191,7 @@ public static ValueParser buildParser(Expression expr) {
} else {
// TODO
Function func = (Function) expr;
java.util.function.Function<Function, ValueParser> valueParserConstructor =
java.util.function.Function<Function, ValueParser> valueParserConstructor =
functionMap.get(func.getName().toLowerCase());
if (valueParserConstructor != null) {
return valueParserConstructor.apply(func);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,6 @@ public void testFactorialFunction() throws Exception {
}
}


@Test
public void testLog2Function() throws Exception {
String transformSql = "select log2(numeric1) from source";
Expand Down

0 comments on commit b004ac4

Please sign in to comment.