Skip to content

Commit

Permalink
[FeMeta](function) write function nullable mode info
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangstar333 committed Oct 17, 2023
1 parent 31a5e07 commit c068465
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,11 @@ public final class FeMetaVersion {
public static final int VERSION_124 = 124;
// For write/read auto create partition expr
public static final int VERSION_125 = 125;
// For write/read function nullable mode info
public static final int VERSION_126 = 126;

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

// 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 @@ -21,6 +21,7 @@
import org.apache.doris.analysis.FunctionCallExpr;
import org.apache.doris.analysis.FunctionName;
import org.apache.doris.common.AnalysisException;
import org.apache.doris.common.FeMetaVersion;
import org.apache.doris.common.UserException;
import org.apache.doris.common.io.IOUtils;
import org.apache.doris.common.io.Text;
Expand Down Expand Up @@ -664,6 +665,7 @@ protected void writeFields(DataOutput output) throws IOException {
}
IOUtils.writeOptionString(output, libUrl);
IOUtils.writeOptionString(output, checksum);
output.writeUTF(nullableMode.toString());
}

@Override
Expand Down Expand Up @@ -698,6 +700,9 @@ public void readFields(DataInput input) throws IOException {
if (hasChecksum) {
checksum = Text.readString(input);
}
if (Env.getCurrentEnvJournalVersion() >= FeMetaVersion.VERSION_126) {
nullableMode = NullableMode.valueOf(input.readUTF());
}
}

public static Function read(DataInput input) throws IOException {
Expand Down

0 comments on commit c068465

Please sign in to comment.