【原創】大數據基礎之Kudu(3)primary key


關於kudu的primary key

The primary key may not be changed after the table is created. You must drop and recreate a table to select a new primary key.

創建之后主鍵列不能變更

The columns which make up the primary key must be listed first in the schema.

否則會報錯:

ImpalaRuntimeException: Error creating Kudu table 'impala::default.cv00_atty_kudu' CAUSED BY: NonRecoverableException: Got out-of-order key column: name: "ent_ts" type: STRING is_key: true is_nullable: false cfile_block_size: 0

The primary key of a row may not be modified using the UPDATE functionality. To modify a row’s primary key, the row must be deleted and re-inserted with the modified key. Such a modification is non-atomic.

主鍵列不能被update

Columns with DOUBLE, FLOAT, or BOOL types are not allowed as part of a primary key definition. Additionally, all columns that are part of a primary key definition must be NOT NULL.

double、float、bool類型字段不能作為主鍵列,同時主鍵列不能為null

Auto-generated primary keys are not supported.

不支持自動生成主鍵

Cells making up a composite primary key are limited to a total of 16KB after the internal composite-key encoding done by Kudu.

主鍵大小最大16k


參考:https://kudu.apache.org/docs/known_issues.html#_schema_and_usage_limitations


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM