jameshartig commented on code in PR #1855: URL: https://github.com/apache/cassandra-gocql-driver/pull/1855#discussion_r2128993030
########## marshal.go: ########## @@ -131,60 +128,11 @@ func Marshal(info TypeInfo, value interface{}) ([]byte, error) { return v.MarshalCQL(info) } - switch info.Type() { - case TypeVarchar, TypeAscii, TypeBlob, TypeText: - return marshalVarchar(info, value) - case TypeBoolean: - return marshalBool(info, value) - case TypeTinyInt: - return marshalTinyInt(info, value) - case TypeSmallInt: - return marshalSmallInt(info, value) - case TypeInt: - return marshalInt(info, value) - case TypeBigInt, TypeCounter: - return marshalBigInt(info, value) - case TypeFloat: - return marshalFloat(info, value) - case TypeDouble: - return marshalDouble(info, value) - case TypeDecimal: - return marshalDecimal(info, value) - case TypeTime: - return marshalTime(info, value) - case TypeTimestamp: - return marshalTimestamp(info, value) - case TypeList, TypeSet: - return marshalList(info, value) - case TypeMap: - return marshalMap(info, value) - case TypeUUID, TypeTimeUUID: - return marshalUUID(info, value) - case TypeVarint: - return marshalVarint(info, value) - case TypeInet: - return marshalInet(info, value) - case TypeTuple: - return marshalTuple(info, value) - case TypeUDT: - return marshalUDT(info, value) - case TypeDate: - return marshalDate(info, value) - case TypeDuration: - return marshalDuration(info, value) - case TypeCustom: + /* if vector, ok := info.(VectorType); ok { return marshalVector(vector, value) - } - } - - // detect protocol 2 UDT - if strings.HasPrefix(info.Custom(), "org.apache.cassandra.db.marshal.UserType") && info.Version() < 3 { - return nil, ErrorUDTUnavailable - } - - // TODO(tux21b): add the remaining types - return nil, fmt.Errorf("can not marshal %T into %s", value, info) + }*/ Review Comment: Woops, this was a reminder for me to implement the vector code but I forgot to remove it ########## marshal.go: ########## @@ -237,62 +185,12 @@ func Unmarshal(info TypeInfo, data []byte, value interface{}) error { return unmarshalNullable(info, data, value) } - switch info.Type() { - case TypeVarchar, TypeAscii, TypeBlob, TypeText: - return unmarshalVarchar(info, data, value) - case TypeBoolean: - return unmarshalBool(info, data, value) - case TypeInt: - return unmarshalInt(info, data, value) - case TypeBigInt, TypeCounter: - return unmarshalBigInt(info, data, value) - case TypeVarint: - return unmarshalVarint(info, data, value) - case TypeSmallInt: - return unmarshalSmallInt(info, data, value) - case TypeTinyInt: - return unmarshalTinyInt(info, data, value) - case TypeFloat: - return unmarshalFloat(info, data, value) - case TypeDouble: - return unmarshalDouble(info, data, value) - case TypeDecimal: - return unmarshalDecimal(info, data, value) - case TypeTime: - return unmarshalTime(info, data, value) - case TypeTimestamp: - return unmarshalTimestamp(info, data, value) - case TypeList, TypeSet: - return unmarshalList(info, data, value) - case TypeMap: - return unmarshalMap(info, data, value) - case TypeTimeUUID: - return unmarshalTimeUUID(info, data, value) - case TypeUUID: - return unmarshalUUID(info, data, value) - case TypeInet: - return unmarshalInet(info, data, value) - case TypeTuple: - return unmarshalTuple(info, data, value) - case TypeUDT: - return unmarshalUDT(info, data, value) - case TypeDate: - return unmarshalDate(info, data, value) - case TypeDuration: - return unmarshalDuration(info, data, value) - case TypeCustom: + /* if vector, ok := info.(VectorType); ok { return unmarshalVector(vector, data, value) } - } - - // detect protocol 2 UDT - if strings.HasPrefix(info.Custom(), "org.apache.cassandra.db.marshal.UserType") && info.Version() < 3 { - return ErrorUDTUnavailable - } - - // TODO(tux21b): add the remaining types - return fmt.Errorf("can not unmarshal %s into %T", info, value) + */ Review Comment: Same, this was a reminder and forgot to remove it. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org For additional commands, e-mail: pr-h...@cassandra.apache.org