@Override
    public BasicTypeDefine reconvert(Column column) {
        BasicTypeDefine.BasicTypeDefineBuilder builder =
                BasicTypeDefine.builder()
                        .name(column.getName())
                        .nullable(column.isNullable())
                        .comment(column.getComment())
                        .defaultValue(column.getDefaultValue());
        switch (column.getDataType().getSqlType()) {
            case BOOLEAN:
                builder.columnType(XUGU_BOOLEAN);
                builder.dataType(XUGU_BOOLEAN);
                break;
            case TINYINT:
                builder.columnType(XUGU_TINYINT);
                builder.dataType(XUGU_TINYINT);
                break;
            case SMALLINT:
                builder.columnType(XUGU_SMALLINT);
                builder.dataType(XUGU_SMALLINT);
                break;
            case INT:
                builder.columnType(XUGU_INTEGER);
                builder.dataType(XUGU_INTEGER);
                break;
            case BIGINT:
                builder.columnType(XUGU_BIGINT);
                builder.dataType(XUGU_BIGINT);
                break;
            case FLOAT:
                builder.columnType(XUGU_FLOAT);
                builder.dataType(XUGU_FLOAT);
                break;
            case DOUBLE:
                builder.columnType(XUGU_DOUBLE);
                builder.dataType(XUGU_DOUBLE);
                break;
            case DECIMAL:
                DecimalType decimalType = (DecimalType) column.getDataType();
                long precision = decimalType.getPrecision();
                int scale = decimalType.getScale();
                if (precision <= 0) {
                    precision = DEFAULT_PRECISION;
                    scale = DEFAULT_SCALE;
                    log.warn(
                            "The decimal column {} type decimal({},{}) is out of range, "
                                    + "which is precision less than 0, "
                                    + "it will be converted to decimal({},{})",
                            column.getName(),
                            decimalType.getPrecision(),
                            decimalType.getScale(),
                            precision,
                            scale);
                } else if (precision > MAX_PRECISION) {
                    scale = (int) Math.max(0, scale - (precision - MAX_PRECISION));
                    precision = MAX_PRECISION;
                    log.warn(
                            "The decimal column {} type decimal({},{}) is out of range, "
                                    + "which exceeds the maximum precision of {}, "
                                    + "it will be converted to decimal({},{})",
                            column.getName(),
                            decimalType.getPrecision(),
                            decimalType.getScale(),
                            MAX_PRECISION,
                            precision,
                            scale);
                }
                if (scale < 0) {
                    scale = 0;
                    log.warn(
                            "The decimal column {} type decimal({},{}) is out of range, "
                                    + "which is scale less than 0, "
                                    + "it will be converted to decimal({},{})",
                            column.getName(),
                            decimalType.getPrecision(),
                            decimalType.getScale(),
                            precision,
                            scale);
                } else if (scale > MAX_SCALE) {
                    scale = MAX_SCALE;
                    log.warn(
                            "The decimal column {} type decimal({},{}) is out of range, "
                                    + "which exceeds the maximum scale of {}, "
                                    + "it will be converted to decimal({},{})",
                            column.getName(),
                            decimalType.getPrecision(),
                            decimalType.getScale(),
                            MAX_SCALE,
                            precision,
                            scale);
                }
                builder.columnType(String.format("%s(%s,%s)", XUGU_NUMERIC, precision, scale));
                builder.dataType(XUGU_NUMERIC);
                builder.precision(precision);
                builder.scale(scale);
                break;
            case BYTES:
                if (column.getColumnLength() == null || column.getColumnLength() <= 0) {
                    builder.columnType(XUGU_BLOB);
                    builder.dataType(XUGU_BLOB);
                } else if (column.getColumnLength() <= MAX_BINARY_LENGTH) {
                    builder.columnType(XUGU_BINARY);
                    builder.dataType(XUGU_BINARY);
                } else {
                    builder.columnType(XUGU_BLOB);
                    builder.dataType(XUGU_BLOB);
                }
                break;
            case STRING:
                if (column.getColumnLength() == null || column.getColumnLength() <= 0) {
                    builder.columnType(String.format("%s(%s)", XUGU_VARCHAR, MAX_VARCHAR_LENGTH));
                    builder.dataType(XUGU_VARCHAR);
                } else if (column.getColumnLength() <= MAX_VARCHAR_LENGTH) {
                    builder.columnType(
                            String.format("%s(%s)", XUGU_VARCHAR, column.getColumnLength()));
                    builder.dataType(XUGU_VARCHAR);
                } else {
                    builder.columnType(XUGU_CLOB);
                    builder.dataType(XUGU_CLOB);
                }
                break;
            case DATE:
                builder.columnType(XUGU_DATE);
                builder.dataType(XUGU_DATE);
                break;
            case TIME:
                builder.dataType(XUGU_TIME);
                if (column.getScale() != null && column.getScale() > 0) {
                    Integer timeScale = column.getScale();
                    if (timeScale > MAX_TIME_SCALE) {
                        timeScale = MAX_TIME_SCALE;
                        log.warn(
                                "The time column {} type time({}) is out of range, "
                                        + "which exceeds the maximum scale of {}, "
                                        + "it will be converted to time({})",
                                column.getName(),
                                column.getScale(),
                                MAX_SCALE,
                                timeScale);
                    }
                    builder.columnType(String.format("%s(%s)", XUGU_TIME, timeScale));
                    builder.scale(timeScale);
                } else {
                    builder.columnType(XUGU_TIME);
                }
                break;
            case TIMESTAMP:
                if (column.getScale() == null || column.getScale() <= 0) {
                    builder.columnType(XUGU_TIMESTAMP);
                } else {
                    int timestampScale = column.getScale();
                    if (column.getScale() > MAX_TIMESTAMP_SCALE) {
                        timestampScale = MAX_TIMESTAMP_SCALE;
                        log.warn(
                                "The timestamp column {} type timestamp({}) is out of range, "
                                        + "which exceeds the maximum scale of {}, "
                                        + "it will be converted to timestamp({})",
                                column.getName(),
                                column.getScale(),
                                MAX_TIMESTAMP_SCALE,
                                timestampScale);
                    }
                    builder.columnType(String.format("TIMESTAMP(%s)", timestampScale));
                    builder.scale(timestampScale);
                }
                builder.dataType(XUGU_TIMESTAMP);
                break;
            default:
                throw CommonError.convertToConnectorTypeError(
                        DatabaseIdentifier.XUGU,
                        column.getDataType().getSqlType().name(),
                        column.getName());
        }

        return builder.build();
    }
@Test
    public void testReconvertByte() {
        Column column = PhysicalColumn.builder().name("test").dataType(BasicType.BYTE_TYPE).build();

        BasicTypeDefine typeDefine = XuguTypeConverter.INSTANCE.reconvert(column);
        Assertions.assertEquals(column.getName(), typeDefine.getName());
        Assertions.assertEquals(XuguTypeConverter.XUGU_TINYINT, typeDefine.getColumnType());
        Assertions.assertEquals(XuguTypeConverter.XUGU_TINYINT, typeDefine.getDataType());
    }