Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UDT Support #57

Open
steambao opened this issue Jan 12, 2015 · 3 comments
Open

UDT Support #57

steambao opened this issue Jan 12, 2015 · 3 comments
Assignees
Milestone

Comments

@steambao
Copy link

Hi Guys,

Using Cassandra 2.1.2 and trying to get UDTs to work in the library, and since everyone is busy figured I would give it a shot. However, having trouble.

Looking at the v3 Binary Protocol (https://git-wip-us.apache.org/repos/asf?p=cassandra.git;a=blob_plain;f=doc/native_protocol_v3.spec;hb=HEAD), I notice a new column type.
0x0030 UDT: the value is < ks >< udt_name >< n >< name_1 >< type_1 >...< name_n >< type_n >

However, in evseevnn\Cassandra\Protocol\Response\DataStream\TypeReader class, public static function readFromStream(DataStream $stream) {...} always reads a UDT type as '0' instead of the expected '48'.

Thus, I can't get the library to differentiate a 'custom' column from a 'UDT' column when generating the column meta-data; and so I can't properly process 'reading' the datastream. Any ideas? Am I on the right track?

@steambao
Copy link
Author

I guess it's because we still using V1 of Binary Protocol?

class VersionEnum {
const REQUEST = 0x01;
const RESPONSE = 0x81;
}

@evseevnn-zz
Copy link
Owner

Hi!
You're right.
The point is that fully maintain the library is not enough time. It must be modified to support the protocol v3.

I would be glad if you help with this.

@evseevnn-zz evseevnn-zz self-assigned this Jan 13, 2015
@evseevnn-zz evseevnn-zz added this to the v0.2.0 milestone Jan 13, 2015
@steambao
Copy link
Author

Hey evseevnn. You probably already know this (since you commited heaps to this repo), but https://github.com/duoshuo/php-cassandra has full UDT support as well as v3 protocol currently working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants