private String reverseMapSpannerDataTypeToSource()

in spanner-data-validator-java/src/main/java/com/google/migration/dofns/CustomTransformationDoFn.java [186:205]


  private String reverseMapSpannerDataTypeToSource(String spannerDataType) {
    switch (spannerDataType.toUpperCase()) {
      case "STRING":
        return "VARCHAR";
      case "INT64":
        //It does not really matter if we return "INT" or "BIGINT" here since both will simply
        //get written as string in the string which will represent the record which we take a hash of.
        return "BIGINT";
      case "BOOL":
        return "BOOLEAN";
      case "FLOAT64":
        return "DOUBLE";
      case "TIMESTAMP":
        return "TIMESTAMP";
      case "DATE":
        return "DATE";
      default:
        throw new RuntimeException(String.format("%s is not a supported column data type in custom transformations!", spannerDataType));
    }
  }