We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
master
when i use CreateTableStmt:
List<ColumnDef> columnDefs = new ArrayList<>(); columnDefs.add(new ColumnDef("catalog_id", TypeDef.create(PrimitiveType.BIGINT), false)); columnDefs.add(new ColumnDef("catalog_name", TypeDef.createVarchar(StatisticConstants.MAX_NAME_LEN), false)); columnDefs.add(new ColumnDef("database_name", TypeDef.createVarchar(StatisticConstants.MAX_NAME_LEN), false)); columnDefs.add(new ColumnDef("table", TypeDef.createVarchar(StatisticConstants.MAX_NAME_LEN), false)); columnDefs.add(new ColumnDef("update_time", TypeDef.create(PrimitiveType.DATETIME), false)); columnDefs.get(columnDefs.size() - 1).setAggregateType(AggregateType.REPLACE); String engineName = "olap"; ArrayList<String> aggKeys = Lists.newArrayList("catalog_id", "catalog_name", "databases", "table"); KeysDesc keysDesc = new KeysDesc(KeysType.AGG_KEYS, aggKeys); DistributionDesc distributionDesc = new HashDistributionDesc( StatisticConstants.STATISTIC_TABLE_BUCKET_COUNT, Lists.newArrayList("catalog_id")); Map<String, String> properties = new HashMap<String, String>() { { put("replication_num", String.valueOf(Math.max(1, Config.min_replication_num_per_tablet))); } }; TableName tableName = new TableName("internal", "__internal_schema", "cache_show_tables"); CreateTableStmt createTableStmt = new CreateTableStmt(true, false, tableName, columnDefs, engineName, keysDesc, null, distributionDesc, properties, null, "", null);
then run createTableStmt.toSql();
createTableStmt.toSql();
CREATE TABLE internal.__internal_schema.cache_show_tables ( `catalog_id` bigint(20) NOT NULL COMMENT "", `catalog_name` varchar(64) NOT NULL COMMENT "", `databases` varchar(64) NOT NULL COMMENT "", `table` varchar(64) NOT NULL COMMENT "", `update_time` datetime REPLACE NOT NULL COMMENT "" ) ENGINE = olap AGG_KEY(`catalog_id`, `catalog_name`, `databases`, `table`) DISTRIBUTED BY HASH(`catalog_id`) BUCKETS 7 PROPERTIES ("replication_num" = "1");
error : AGG_KEY miss : IF NOT EXISTS
AGG_KEY
IF NOT EXISTS
CREATE TABLE IF NOT EXISTS internal.__internal_schema .cache_show_tables ( `catalog_id` bigint(20) NOT NULL COMMENT "", `catalog_name` varchar(64) NOT NULL COMMENT "", `databases` varchar(64) NOT NULL COMMENT "", `table` varchar(64) NOT NULL COMMENT "", `update_time` datetime REPLACE NOT NULL COMMENT "" ) ENGINE = olap AGGREGATE KEY(`catalog_id`, `catalog_name`, `databases`, `table`) DISTRIBUTED BY HASH(`catalog_id`) BUCKETS 7 PROPERTIES ("replication_num" = "1");
No response
The text was updated successfully, but these errors were encountered:
pr : #22750
Sorry, something went wrong.
[fix](createTableStmt)fix bug that createTableStmt toSql (#22750)
bfc1efe
Issue Number: #22749
0bf6309
[fix](createTableStmt)fix bug that createTableStmt toSql (apache#22750)
fd38add
Issue Number: apache#22749
No branches or pull requests
Search before asking
Version
master
What's Wrong?
when i use CreateTableStmt:
then run
createTableStmt.toSql();
error :
AGG_KEY
miss :
IF NOT EXISTS
What You Expected?
How to Reproduce?
No response
Anything Else?
No response
Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: