Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangstar333 committed Jun 3, 2024
1 parent 887d26f commit 2f50d7d
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,10 @@ public final class FeMetaVersion {
public static final int VERSION_133 = 133;

// For udf static load
public static final int VERSION_133 = 133;
public static final int VERSION_134 = 134;

// note: when increment meta version, should assign the latest version to VERSION_CURRENT
public static final int VERSION_CURRENT = VERSION_133;
public static final int VERSION_CURRENT = VERSION_134;

// all logs meta version should >= the minimum version, so that we could remove many if clause, for example
// if (FE_METAVERSION < VERSION_94) ...
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,7 @@ public void readFields(DataInput input) throws IOException {
if (Env.getCurrentEnvJournalVersion() >= FeMetaVersion.VERSION_131) {
isUDTFunction = input.readBoolean();
}
if (Env.getCurrentEnvJournalVersion() >= FeMetaVersion.VERSION_133) {
if (Env.getCurrentEnvJournalVersion() >= FeMetaVersion.VERSION_134) {
isStaticLoad = input.readBoolean();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,9 @@
-- !select10 --
1

-- !select11 --
1

-- !select12 --
2

Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,16 @@ suite("test_javaudf_static_load_test") {
qt_select8 """ SELECT not_static_load_test(); """
qt_select9 """ SELECT not_static_load_test(); """
qt_select10 """ SELECT not_static_load_test(); """

sql """DROP FUNCTION IF EXISTS static_load_test(); """
sql """ CREATE FUNCTION static_load_test() RETURNS int PROPERTIES (
"file"="file://${jarPath}",
"symbol"="org.apache.doris.udf.StaticIntTest",
"static_load"="true",
"type"="JAVA_UDF"
); """
qt_select11 """ SELECT static_load_test(); """
qt_select12 """ SELECT static_load_test(); """
} finally {
try_sql("DROP FUNCTION IF EXISTS not_static_load_test();")
try_sql("DROP FUNCTION IF EXISTS static_load_test();")
Expand Down

0 comments on commit 2f50d7d

Please sign in to comment.