[MDEV-4541] ERROR 1928 (HY000): Internal error: 'Some of SQL fields were not mapped to Cassandra's fields' Created: 2013-05-17 Updated: 2013-05-18 Resolved: 2013-05-18 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | 10.0.2 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Robert Wagner | Assignee: | Sergei Petrunia |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | cassandra | ||
| Environment: |
Linux x64, Apache Cassandra 1.2.4 |
||
| Description |
|
When creating a Table in MariaDB pointing to Cassandra Engine, I get: ERROR 1928 (HY000): Internal error: 'Some of SQL fields were not mapped to Cassandra's fields' Fields appear to exist in both the command + Cassandra. I am unsure what this error means. |
| Comments |
| Comment by Elena Stepanova [ 2013-05-17 ] |
|
Please provide both Cassandra column family structure and MariaDB CREATE TABLE. |
| Comment by Robert Wagner [ 2013-05-17 ] |
|
Cassandra-CLI {column_name:te_ACLID, validation_class:LongType, index_type: KEYS} {column_name:te_ACLRight, validation_class:LongType} {column_name:te_CreationTime, validation_class:LongType} {column_name:te_EndTime, validation_class:LongType} {column_name:te_MaxUsage, validation_class:LongType} {column_name:te_PrincipalID, validation_class:LongType, index_type: KEYS} {column_name:te_StartTime, validation_class:LongType} {column_name:te_SystemID, validation_class:LongType, index_type: KEYS} {column_name:te_UserRight, validation_class:LongType} {column_name:te_signature, validation_class:UTF8Type} ]; MariaDB: Note - tried several different ways to create a link. [default@eruces_keys] show schema; WARNING: CQL3 tables are intentionally omitted from 'show schema' output. create keyspace eruces_keys and durable_writes = true; use eruces_keys; create column family te_ACLEntry , , , , , , , , , , ] ; |
| Comment by Robert Wagner [ 2013-05-17 ] |
|
I think I zapped part of the structure when I tried to solve this error. by running this command: ]; If I recreate the column family, with multiple KEYS, I get an error about Primary Key must be neame rowkey. I cannot find information on creating an Alias for a column_name. CREATE TABLE te_ACLEntry (te_ACLEntryId bigint primary key, te_ACLID bigint, te_ACLRight bigint, te_CreationTime bigint, te_EndTime bigint, te_MaxUsage bigint, te_PrincipalID bigint, te_StartTime bigint, te_SystemID bigint, te_UserRight bigint, te_signature varchar(100) ) engine=cassandra keyspace='eruces_keys' column_family='te_ACLEntry'; |
| Comment by Robert Wagner [ 2013-05-17 ] |
|
Figured out the problem.... Must create tables with CQL instead of cassandra-CLI cqlsh:eruces_keys> create columnfamily te_ACLEntry (te_ACLEntryId bigint primary key, te_ACLID bigint, te_ACLRight bigint, te_CreationTime bigint, te_EndTime bigint, te_MaxUsage bigint, te_PrincipalID bigint, te_StartTime bigint, te_SystemID bigint, te_UserRight bigint, te_signature varchar); MariaDB [cass_keys]> CREATE TABLE te_ACLEntry (te_ACLEntryId bigint primary key, te_ACLID bigint, te_ACLRight bigint, te_CreationTime bigint, te_EndTime bigint, te_MaxUsage bigint, te_PrincipalID bigint, te_StartTime bigint, te_SystemID bigint, te_UserRight bigint, te_signature varchar(100) ) engine=cassandra keyspace='eruces_keys' column_family='te_ACLEntry'; Works fine now...will move onto Primary Key + Secondary Keys and test... |
| Comment by Robert Wagner [ 2013-05-17 ] |
|
Multiple_keys has a problem....See https://mariadb.atlassian.net/browse/MDEV-4543 |
| Comment by Sergei Petrunia [ 2013-05-18 ] |
|
I have tried with Cassandra 1.1.4:
CREATE COLUMN FAMILY te_ACLEntry WITH comparator=UTF8Type AND column_metadata = [ {column_name:te_ACLEntryId, validation_class:LongType}{column_name:te_ACLID, validation_class:LongType, index_type: KEYS} {column_name:te_ACLRight, validation_class:LongType} {column_name:te_CreationTime, validation_class:LongType} {column_name:te_EndTime, validation_class:LongType} {column_name:te_MaxUsage, validation_class:LongType} {column_name:te_PrincipalID, validation_class:LongType, index_type: KEYS} {column_name:te_StartTime, validation_class:LongType} {column_name:te_SystemID, validation_class:LongType, index_type: KEYS} {column_name:te_UserRight, validation_class:LongType} {column_name:te_signature, validation_class:UTF8Type} ];
It worked. |
| Comment by Sergei Petrunia [ 2013-05-18 ] |
|
The commands posted in the previous work with Cassandra 1.2.4, too. |
| Comment by Sergei Petrunia [ 2013-05-18 ] |
|
Closing this issue, as requested. |