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

Can't create a table with a field with a property with a value #215

Open
sanikolaev opened this issue Aug 7, 2024 · 1 comment
Open

Comments

@sanikolaev
Copy link
Collaborator

I can't create a table with a field with the property engine='columnar'.

snikolaev@dev2:~$ cat test_client.php
<?php
require_once __DIR__ . '/vendor/autoload.php';

$config = ['host'=>'127.0.0.1','port'=>9308];
$client = new \Manticoresearch\Client($config);
$index = $client->index('t');
$index->drop(true);
$index->create([
    'a'=>['type'=>'int', 'options' => ['engine' => 'columnar']]
]);
snikolaev@dev2:~$ php test_client.php
PHP Fatal error:  Uncaught Manticoresearch\Exceptions\ResponseException: "P03: syntax error, unexpected COLUMNAR, expecting ',' or ')' near 'columnar)'" in /home/snikolaev/vendor/manticoresoftware/manticoresearch-php/src/Manticoresearch/Transport/Http.php:127
Stack trace:
#0 /home/snikolaev/vendor/manticoresoftware/manticoresearch-php/src/Manticoresearch/Client.php(372): Manticoresearch\Transport\Http->execute()
#1 /home/snikolaev/vendor/manticoresoftware/manticoresearch-php/src/Manticoresearch/Indices.php(74): Manticoresearch\Client->request()
#2 /home/snikolaev/vendor/manticoresoftware/manticoresearch-php/src/Manticoresearch/Index.php(246): Manticoresearch\Indices->create()
#3 /home/snikolaev/test_client.php(9): Manticoresearch\Index->create()
#4 {main}
  thrown in /home/snikolaev/vendor/manticoresoftware/manticoresearch-php/src/Manticoresearch/Transport/Http.php on line 127

The query it generates is:

/* Wed Aug 07 11:42:06.862 2024 conn 2213 (127.0.0.1:52026) real 0.000 */ CREATE TABLE t(`a` int columnar);

Expected:

/* Wed Aug 07 11:42:06.862 2024 conn 2213 (127.0.0.1:52026) real 0.000 */ CREATE TABLE t(`a` int engine='columnar');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants