-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix should allow to assign parameters for the Null engine (#112)
- Loading branch information
Showing
4 changed files
with
170 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
CREATE TABLE logs.t0 on cluster default | ||
( | ||
`trace_id` String CODEC(ZSTD(1)), | ||
INDEX trace_id_bloom_idx trace_id TYPE bloom_filter(0.01) GRANULARITY 64 | ||
) ENGINE = Null(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
-- Origin SQL: | ||
CREATE TABLE logs.t0 on cluster default | ||
( | ||
`trace_id` String CODEC(ZSTD(1)), | ||
INDEX trace_id_bloom_idx trace_id TYPE bloom_filter(0.01) GRANULARITY 64 | ||
) ENGINE = Null(); | ||
|
||
-- Format SQL: | ||
CREATE TABLE logs.t0 ON CLUSTER default (`trace_id` String CODEC(ZSTD(1)), INDEX trace_id_bloom_idx trace_id TYPE bloom_filter(0.01) GRANULARITY 64) ENGINE = Null(); |
156 changes: 156 additions & 0 deletions
156
parser/testdata/ddl/output/create_table_with_null_engine.sql.golden.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,156 @@ | ||
[ | ||
{ | ||
"CreatePos": 0, | ||
"StatementEnd": 172, | ||
"Name": { | ||
"Database": { | ||
"Name": "logs", | ||
"QuoteType": 1, | ||
"NamePos": 13, | ||
"NameEnd": 17 | ||
}, | ||
"Table": { | ||
"Name": "t0", | ||
"QuoteType": 1, | ||
"NamePos": 18, | ||
"NameEnd": 20 | ||
} | ||
}, | ||
"IfNotExists": false, | ||
"UUID": null, | ||
"OnCluster": { | ||
"OnPos": 21, | ||
"Expr": { | ||
"Name": "default", | ||
"QuoteType": 1, | ||
"NamePos": 32, | ||
"NameEnd": 39 | ||
} | ||
}, | ||
"TableSchema": { | ||
"SchemaPos": 40, | ||
"SchemaEnd": 157, | ||
"Columns": [ | ||
{ | ||
"NamePos": 47, | ||
"ColumnEnd": 78, | ||
"Name": { | ||
"Ident": { | ||
"Name": "trace_id", | ||
"QuoteType": 3, | ||
"NamePos": 47, | ||
"NameEnd": 55 | ||
}, | ||
"DotIdent": null | ||
}, | ||
"Type": { | ||
"Name": { | ||
"Name": "String", | ||
"QuoteType": 1, | ||
"NamePos": 57, | ||
"NameEnd": 63 | ||
} | ||
}, | ||
"NotNull": null, | ||
"Nullable": null, | ||
"DefaultExpr": null, | ||
"MaterializedExpr": null, | ||
"AliasExpr": null, | ||
"Codec": { | ||
"CodecPos": 64, | ||
"RightParenPos": 78, | ||
"Type": null, | ||
"TypeLevel": null, | ||
"Name": { | ||
"Name": "ZSTD", | ||
"QuoteType": 1, | ||
"NamePos": 70, | ||
"NameEnd": 74 | ||
}, | ||
"Level": { | ||
"NumPos": 74, | ||
"NumEnd": 76, | ||
"Literal": "1", | ||
"Base": 10 | ||
} | ||
}, | ||
"TTL": null, | ||
"Comment": null, | ||
"CompressionCodec": null | ||
}, | ||
{ | ||
"IndexPos": 84, | ||
"Name": { | ||
"Ident": { | ||
"Name": "trace_id_bloom_idx", | ||
"QuoteType": 1, | ||
"NamePos": 90, | ||
"NameEnd": 108 | ||
}, | ||
"DotIdent": null | ||
}, | ||
"ColumnExpr": { | ||
"Expr": { | ||
"Name": "trace_id", | ||
"QuoteType": 1, | ||
"NamePos": 109, | ||
"NameEnd": 117 | ||
}, | ||
"Alias": null | ||
}, | ||
"ColumnType": { | ||
"LeftParenPos": 136, | ||
"RightParenPos": 140, | ||
"Name": { | ||
"Name": "bloom_filter", | ||
"QuoteType": 1, | ||
"NamePos": 123, | ||
"NameEnd": 135 | ||
}, | ||
"Params": [ | ||
{ | ||
"NumPos": 136, | ||
"NumEnd": 140, | ||
"Literal": "0.01", | ||
"Base": 10 | ||
} | ||
] | ||
}, | ||
"Granularity": { | ||
"NumPos": 154, | ||
"NumEnd": 156, | ||
"Literal": "64", | ||
"Base": 10 | ||
} | ||
} | ||
], | ||
"AliasTable": null, | ||
"TableFunction": null | ||
}, | ||
"Engine": { | ||
"EnginePos": 159, | ||
"EngineEnd": 172, | ||
"Name": "Null", | ||
"Params": { | ||
"LeftParenPos": 172, | ||
"RightParenPos": 173, | ||
"Items": { | ||
"ListPos": 173, | ||
"ListEnd": 173, | ||
"HasDistinct": false, | ||
"Items": [] | ||
}, | ||
"ColumnArgList": null | ||
}, | ||
"PrimaryKey": null, | ||
"PartitionBy": null, | ||
"SampleBy": null, | ||
"TTL": null, | ||
"Settings": null, | ||
"OrderBy": null | ||
}, | ||
"SubQuery": null, | ||
"HasTemporary": false, | ||
"Comment": null | ||
} | ||
] |