Skip to content

Commit

Permalink
delete no need change
Browse files Browse the repository at this point in the history
  • Loading branch information
jerry-024 committed Dec 24, 2024
1 parent bc16c03 commit bbdfa96
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import org.apache.paimon.annotation.Public;
import org.apache.paimon.utils.Preconditions;

import org.apache.paimon.shade.jackson2.com.fasterxml.jackson.annotation.JsonIgnore;
import org.apache.paimon.shade.jackson2.com.fasterxml.jackson.core.JsonGenerator;

import java.io.IOException;
Expand Down Expand Up @@ -55,15 +54,13 @@ public DataType(boolean isNullable, DataTypeRoot typeRoot) {
}

/** Returns whether a value of this type can be {@code null}. */
@JsonIgnore
public boolean isNullable() {
return isNullable;
}

/**
* Returns the root of this type. It is an essential description without additional parameters.
*/
@JsonIgnore
public DataTypeRoot getTypeRoot() {
return typeRoot;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

package org.apache.paimon.rest;

import org.apache.paimon.schema.SchemaSerializer;
import org.apache.paimon.schema.TableSchema;
import org.apache.paimon.schema.TableSchemaSerializer;
import org.apache.paimon.types.DataField;
import org.apache.paimon.types.DataType;
import org.apache.paimon.types.DataTypeJsonParser;
Expand Down Expand Up @@ -47,10 +47,7 @@ public static ObjectMapper create() {
public static Module createPaimonRestJacksonModule() {
SimpleModule module = new SimpleModule("Paimon_REST");
registerJsonObjects(
module,
TableSchema.class,
TableSchemaSerializer.INSTANCE,
TableSchemaSerializer.INSTANCE);
module, TableSchema.class, SchemaSerializer.INSTANCE, SchemaSerializer.INSTANCE);
registerJsonObjects(
module,
DataField.class,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@
import static org.apache.paimon.schema.TableSchema.PAIMON_08_VERSION;

/** A {@link JsonSerializer} for {@link TableSchema}. */
public class TableSchemaSerializer
public class SchemaSerializer
implements JsonSerializer<TableSchema>, JsonDeserializer<TableSchema> {

public static final TableSchemaSerializer INSTANCE = new TableSchemaSerializer();
public static final SchemaSerializer INSTANCE = new SchemaSerializer();

@Override
public void serialize(TableSchema tableSchema, JsonGenerator generator) throws IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

package org.apache.paimon.utils;

import org.apache.paimon.schema.SchemaSerializer;
import org.apache.paimon.schema.TableSchema;
import org.apache.paimon.schema.TableSchemaSerializer;
import org.apache.paimon.types.DataField;
import org.apache.paimon.types.DataType;
import org.apache.paimon.types.DataTypeJsonParser;
Expand Down Expand Up @@ -181,10 +181,7 @@ public T deserialize(JsonParser parser, DeserializationContext context)
private static Module createPaimonJacksonModule() {
SimpleModule module = new SimpleModule("Paimon");
registerJsonObjects(
module,
TableSchema.class,
TableSchemaSerializer.INSTANCE,
TableSchemaSerializer.INSTANCE);
module, TableSchema.class, SchemaSerializer.INSTANCE, SchemaSerializer.INSTANCE);
registerJsonObjects(
module,
DataField.class,
Expand Down

0 comments on commit bbdfa96

Please sign in to comment.