morningman commented on a change in pull request #3705:
URL: https://github.com/apache/incubator-doris/pull/3705#discussion_r431628375
##########
File path:
fe/src/main/java/org/apache/doris/analysis/CreateMaterializedViewStmt.java
##########
@@ -100,9 +102,8 @@ public KeysType getMVKeysType() {
@Override
public void analyze(Analyzer analyzer) throws UserException {
- // TODO(ml): remove it
if (!Config.enable_materialized_view) {
- throw new AnalysisException("The materialized view is coming
soon");
+ throw new AnalysisException("The materialized view is disable");
Review comment:
```suggestion
throw new AnalysisException("The materialized view is disabled");
```
##########
File path: fe/src/main/java/org/apache/doris/alter/AlterJobV2.java
##########
@@ -220,16 +233,20 @@ protected boolean checkTableStable(Database db) throws
AlterCancelException {
public abstract void replay(AlterJobV2 replayedJob);
public static AlterJobV2 read(DataInput in) throws IOException {
- JobType type = JobType.valueOf(Text.readString(in));
- switch (type) {
- case ROLLUP:
- return RollupJobV2.read(in);
- case SCHEMA_CHANGE:
- return SchemaChangeJobV2.read(in);
- default:
- Preconditions.checkState(false);
- return null;
+ if (Catalog.getCurrentCatalogJournalVersion() <
FeMetaVersion.VERSION_86) {
+ JobType type = JobType.valueOf(Text.readString(in));
+ switch (type) {
+ case ROLLUP:
+ return RollupJobV2.read(in);
+ case SCHEMA_CHANGE:
+ return SchemaChangeJobV2.read(in);
+ default:
+ Preconditions.checkState(false);
+ return null;
+ }
}
Review comment:
Add `else` to make logic more explict
##########
File path: fe/src/main/java/org/apache/doris/qe/DdlExecutor.java
##########
@@ -132,7 +131,7 @@ public static void execute(Catalog catalog, DdlStmt
ddlStmt, OriginStatement ori
if (loadStmt.getVersion().equals(Load.VERSION) || jobType ==
EtlJobType.HADOOP) {
catalog.getLoadManager().createLoadJobV1FromStmt(loadStmt,
jobType, System.currentTimeMillis());
} else {
- catalog.getLoadManager().createLoadJobFromStmt(loadStmt,
origStmt);
+ catalog.getLoadManager().createLoadJobFromStmt(loadStmt,
ddlStmt.getOrigStmt());
Review comment:
Parameter `ddlStmt.getOrigStmt()` is no longer needed, it can be got
from `loadStmt`
##########
File path: fe/src/main/java/org/apache/doris/catalog/Column.java
##########
@@ -411,28 +412,8 @@ public boolean equals(Object obj) {
@Override
public void write(DataOutput out) throws IOException {
- Text.writeString(out, name);
- ColumnType.write(out, type);
- if (null == aggregationType) {
- out.writeBoolean(false);
- } else {
- out.writeBoolean(true);
- Text.writeString(out, aggregationType.name());
- out.writeBoolean(isAggregationTypeImplicit);
- }
-
- out.writeBoolean(isKey);
- out.writeBoolean(isAllowNull);
-
- if (defaultValue == null) {
- out.writeBoolean(false);
- } else {
- out.writeBoolean(true);
- Text.writeString(out, defaultValue);
- }
- stats.write(out);
-
- Text.writeString(out, comment);
+ String json = GsonUtils.GSON.toJson(this);
+ Text.writeString(out, json);
}
public void readFields(DataInput in) throws IOException {
Review comment:
```suggestion
private void readFields(DataInput in) throws IOException {
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]