public static SqlTypeName zetaSqlTypeToCalciteType(TypeKind zetaSqlType) {
    switch (zetaSqlType) {
      case TYPE_INT64:
        return SqlTypeName.BIGINT;
      case TYPE_NUMERIC:
        return SqlTypeName.DECIMAL;
      case TYPE_DOUBLE:
        return SqlTypeName.DOUBLE;
      case TYPE_STRING:
        return SqlTypeName.VARCHAR;
      case TYPE_TIMESTAMP:
        return SqlTypeName.TIMESTAMP;
      case TYPE_BOOL:
        return SqlTypeName.BOOLEAN;
      case TYPE_BYTES:
        return SqlTypeName.VARBINARY;
        // TODO[BEAM-9179] Add conversion code for ARRAY and ROW types
      default:
        throw new IllegalArgumentException("Unsupported ZetaSQL type: " + zetaSqlType.name());
    }
  }
public static SqlTypeName zetaSqlTypeToCalciteType(TypeKind zetaSqlType) {
    switch (zetaSqlType) {
      case TYPE_INT64:
        return SqlTypeName.BIGINT;
      case TYPE_NUMERIC:
        return SqlTypeName.DECIMAL;
      case TYPE_DOUBLE:
        return SqlTypeName.DOUBLE;
      case TYPE_STRING:
        return SqlTypeName.VARCHAR;
      case TYPE_TIMESTAMP:
        return SqlTypeName.TIMESTAMP;
      case TYPE_BOOL:
        return SqlTypeName.BOOLEAN;
      case TYPE_BYTES:
        return SqlTypeName.VARBINARY;
       
      default:
        throw new IllegalArgumentException("Unsupported ZetaSQL type: " + zetaSqlType.name());
    }
  }
public static sqltypename zetasqltypetocalcitetype(typekind zetasqltype) { switch (zetasqltype) { case type_int64: return sqltypename.bigint; case type_numeric: return sqltypename.decimal; case type_double: return sqltypename.double; case type_string: return sqltypename.varchar; case type_timestamp: return sqltypename.timestamp; case type_bool: return sqltypename.boolean; case type_bytes: return sqltypename.varbinary; default: throw new illegalargumentexception("unsupported zetasql type: " + zetasqltype.name()); } }