Datastax Cassandra PHP 驱动程序:在预准备语句中使用 timeuuid 时出现“无效值类型”异常


Datastax Cassandra PHP Driver: "Invalid value type" exception when using timeuuid in prepared statement

>我正在尝试执行带有timeuuid值的预准备语句并得到"无效值类型"异常。

这是代码:

$builder = 'Cassandra::cluster();
$cluster = $builder->withContactPoints('127.0.0.1')
            ->build();
$session = $cluster->connect();
$preparedStatement = $session->prepare("SELECT * FROM test.timeuuid_test WHERE account_id = :accId and item_time_uid >= minTimeuuid(:minTime);");
$options = new ExecutionOptions([
            'arguments' => [
                'accId' => 1234,
                'minTime' => new 'Cassandra'Timeuuid(1458118516)
            ]
        ]);
$session->execute($preparedStatement, $options);

我得到以下异常:

"Cassandra''Exception''InvalidArgumentException : 无效的值类型"

以下是表格方案:

CREATE KEYSPACE test WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1 };
CREATE TABLE test.timeuuid_test (
  account_id int,
  item_time_uid timeuuid,
  PRIMARY KEY ((account_id), item_time_uid)
) WITH CLUSTERING ORDER BY (item_time_uid DESC);

我做错了什么?

我正在使用 PECL cassandra 1.1.0 和 cassandra 2.0.15:

已安装的 Cassandra 相关软件包:卡桑德拉20-2.0.15-1.诺阿克Cassandra-CPP-driver-2.2.2-1.el6.x86_64Cassandra-CPP-driver-devel-2.2.2-1.el6.x86_64

您将错误的类型绑定到minTimeminTimeUuid采用timestamp参数,而不是timeuuid