@@ -170,23 +170,23 @@ private void getCreateTableDDLStatement() throws IOException {
170170 */
171171 private String getCreateMetadataTableDDLStatement () {
172172 return String .format (
173- "CREATE TABLE IF NOT EXISTS %s (" + // metadata
174- "%s STRING(MAX) NOT NULL," + // metadata_id
175- "%s STRING(MAX) NOT NULL," + // namespace
176- "%s STRING(MAX) NOT NULL," + // entity_type
177- "%s STRING(MAX) NOT NULL," + // name
178- "%s INT64," + // create_time
179- "%s STRING(MAX)," + // user
180- "%s STRING(MAX)," + // system
181- "%s JSON," + // metadata_column
182- "%s INT64 NOT NULL," + // version
183- "user_tokens TOKENLIST AS " + // user_tokens list
184- "(TOKENIZE_SUBSTRING(%s, support_relative_search=>TRUE)) HIDDEN," +
185- "system_tokens TOKENLIST AS " + // system_tokens list
186- "(TOKENIZE_SUBSTRING(%s, support_relative_search=>TRUE)) HIDDEN," +
187- "text_tokens TOKENLIST AS " + // text_tokens list
188- "(TOKENLIST_CONCAT([User_Tokens, System_Tokens])) HIDDEN," +
189- ") PRIMARY KEY (%s) " , // metadata_id
173+ "CREATE TABLE IF NOT EXISTS %s (" // metadata
174+ + "%s STRING(MAX) NOT NULL," // metadata_id
175+ + "%s STRING(MAX) NOT NULL," // namespace
176+ + "%s STRING(MAX) NOT NULL," // entity_type
177+ + "%s STRING(MAX) NOT NULL," // name
178+ + "%s INT64," // create_time
179+ + "%s STRING(MAX)," // user
180+ + "%s STRING(MAX)," // system
181+ + "%s JSON," // metadata_column
182+ + "%s INT64 NOT NULL," // version
183+ + "user_tokens TOKENLIST AS " // user_tokens list
184+ + "(TOKENIZE_SUBSTRING(%s, support_relative_search=>TRUE)) HIDDEN,"
185+ + "system_tokens TOKENLIST AS " // system_tokens list
186+ + "(TOKENIZE_SUBSTRING(%s, support_relative_search=>TRUE)) HIDDEN,"
187+ + "text_tokens TOKENLIST AS " // text_tokens list
188+ + "(TOKENLIST_CONCAT([User_Tokens, System_Tokens])) HIDDEN,"
189+ + ") PRIMARY KEY (%s) " , // metadata_id
190190 METADATA_TABLE ,
191191 Tables .Metadata .METADATA_ID_FIELD ,
192192 Tables .Metadata .NAMESPACE_FIELD ,
@@ -229,17 +229,17 @@ private String getCreateMetadataTableDDLStatement() {
229229 */
230230 private String getCreateMetadataPropsTableDDLStatement () {
231231 return String .format (
232- "CREATE TABLE IF NOT EXISTS %s (" +
233- "%s STRING(MAX) NOT NULL," + // metadata_id
234- "%s STRING(MAX) NOT NULL," + // namespace
235- "%s STRING(MAX) NOT NULL," + // entity_type
236- "%s STRING(MAX) NOT NULL," + // name
237- "%s STRING(MAX)," + // scope
238- "%s STRING(MAX)," + // value
239- "value_tokens TOKENLIST AS " + // value_tokens list
240- "(TOKENIZE_SUBSTRING(%s, support_relative_search=>TRUE)) HIDDEN," +
241- ") PRIMARY KEY (%s, %s, %s) ," + // metadata_id, name, scope
242- "INTERLEAVE IN PARENT %s ON DELETE CASCADE" ,
232+ "CREATE TABLE IF NOT EXISTS %s ("
233+ + "%s STRING(MAX) NOT NULL," // metadata_id
234+ + "%s STRING(MAX) NOT NULL," // namespace
235+ + "%s STRING(MAX) NOT NULL," // entity_type
236+ + "%s STRING(MAX) NOT NULL," // name
237+ + "%s STRING(MAX)," // scope
238+ + "%s STRING(MAX)," // value
239+ + "value_tokens TOKENLIST AS " // value_tokens list
240+ + "(TOKENIZE_SUBSTRING(%s, support_relative_search=>TRUE)) HIDDEN,"
241+ + ") PRIMARY KEY (%s, %s, %s) ," // metadata_id, name, scope
242+ + "INTERLEAVE IN PARENT %s ON DELETE CASCADE" ,
243243 METADATA_PROPS_TABLE ,
244244 Tables .MetadataProps .METADATA_ID_FIELD ,
245245 Tables .MetadataProps .NAMESPACE_FIELD ,
0 commit comments