@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(REDSHIFT_BOOLEAN);
                builder.dataType(REDSHIFT_BOOLEAN);
                break;
            case TINYINT:
            case SMALLINT:
                builder.columnType(REDSHIFT_SMALLINT);
                builder.dataType(REDSHIFT_SMALLINT);
                break;
            case INT:
                builder.columnType(REDSHIFT_INTEGER);
                builder.dataType(REDSHIFT_INTEGER);
                break;
            case BIGINT:
                builder.columnType(REDSHIFT_BIGINT);
                builder.dataType(REDSHIFT_BIGINT);
                break;
            case FLOAT:
                builder.columnType(REDSHIFT_REAL);
                builder.dataType(REDSHIFT_REAL);
                break;
            case DOUBLE:
                builder.columnType(REDSHIFT_DOUBLE_PRECISION);
                builder.dataType(REDSHIFT_DOUBLE_PRECISION);
                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(%d,%d)", REDSHIFT_NUMERIC, precision, scale));
                builder.dataType(REDSHIFT_NUMERIC);
                builder.precision(precision);
                builder.scale(scale);
                break;
            case STRING:
                if (column.getColumnLength() == null || column.getColumnLength() <= 0) {
                    builder.columnType(
                            String.format(
                                    "%s(%d)",
                                    REDSHIFT_CHARACTER_VARYING, MAX_CHARACTER_VARYING_LENGTH));
                    builder.dataType(REDSHIFT_CHARACTER_VARYING);
                    builder.length((long) MAX_CHARACTER_VARYING_LENGTH);
                } else if (column.getColumnLength() <= MAX_CHARACTER_VARYING_LENGTH) {
                    builder.columnType(
                            String.format(
                                    "%s(%d)",
                                    REDSHIFT_CHARACTER_VARYING, column.getColumnLength()));
                    builder.dataType(REDSHIFT_CHARACTER_VARYING);
                    builder.length(column.getColumnLength());
                } else {
                    log.warn(
                            "The length of string column {} is {}, which exceeds the maximum length of {}, "
                                    + "the length will be set to {}",
                            column.getName(),
                            column.getColumnLength(),
                            MAX_SUPER_LENGTH,
                            MAX_SUPER_LENGTH);
                    builder.columnType(REDSHIFT_SUPER);
                    builder.dataType(REDSHIFT_SUPER);
                }
                break;
            case BYTES:
                if (column.getColumnLength() == null || column.getColumnLength() <= 0) {
                    builder.columnType(
                            String.format(
                                    "%s(%d)", REDSHIFT_BINARY_VARYING, MAX_BINARY_VARYING_LENGTH));
                    builder.dataType(REDSHIFT_BINARY_VARYING);
                } else if (column.getColumnLength() <= MAX_BINARY_VARYING_LENGTH) {
                    builder.columnType(
                            String.format(
                                    "%s(%d)", REDSHIFT_BINARY_VARYING, column.getColumnLength()));
                    builder.dataType(REDSHIFT_BINARY_VARYING);
                    builder.length(column.getColumnLength());
                } else {
                    builder.columnType(
                            String.format(
                                    "%s(%d)", REDSHIFT_BINARY_VARYING, MAX_BINARY_VARYING_LENGTH));
                    builder.dataType(REDSHIFT_BINARY_VARYING);
                    log.warn(
                            "The length of binary column {} is {}, which exceeds the maximum length of {}, "
                                    + "the length will be set to {}",
                            column.getName(),
                            column.getColumnLength(),
                            MAX_BINARY_VARYING_LENGTH,
                            MAX_BINARY_VARYING_LENGTH);
                }
                break;
            case TIME:
                Integer timeScale = column.getScale();
                if (timeScale != null && 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(REDSHIFT_TIME);
                builder.dataType(REDSHIFT_TIME);
                builder.scale(timeScale);
                break;
            case TIMESTAMP:
                Integer timestampScale = column.getScale();
                if (timestampScale != null && timestampScale > 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(REDSHIFT_TIMESTAMP);
                builder.dataType(REDSHIFT_TIMESTAMP);
                builder.scale(timestampScale);
                break;
            case MAP:
            case ARRAY:
            case ROW:
                builder.columnType(REDSHIFT_SUPER);
                builder.dataType(REDSHIFT_SUPER);
                break;
            default:
                try {
                    return super.reconvert(column);
                } catch (SeaTunnelRuntimeException e) {
                    throw CommonError.convertToConnectorTypeError(
                            DatabaseIdentifier.REDSHIFT,
                            column.getDataType().getSqlType().name(),
                            column.getName());
                }
        }
        return builder.build();
    }
@Test
    public void testReconvertFloat() {
        Column column =
                PhysicalColumn.builder().name("test").dataType(BasicType.FLOAT_TYPE).build();

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