@@ -29,7 +29,7 @@ class WarmupSelectIndexCommandTest {
2929 @ Test
3030 void reusesWarmupSelectForIndexOnlyMode () {
3131 Assertions .assertInstanceOf (WarmupSelectCommand .class , new NereidsParser ().parseSingle (
32- "WARM UP SELECT * FROM lake.demo.items SETTINGS (\" read_index_only\" = true)" ));
32+ "WARM UP SELECT * FROM lake.demo.items PROPERTIES (\" read_index_only\" = true)" ));
3333 }
3434
3535 @ Test
@@ -40,7 +40,7 @@ void preservesDataModeAndItsFileCacheRequirement() {
4040 try {
4141 Config .cloud_unique_id = "" ;
4242 context .getSessionVariable ().setEnableFileCache (true );
43- for (String suffix : new String [] {"" , " SETTINGS (read_index_only=false)" }) {
43+ for (String suffix : new String [] {"" , " PROPERTIES (read_index_only=false)" }) {
4444 WarmupSelectCommand command = (WarmupSelectCommand ) new NereidsParser ().parseSingle (
4545 "WARM UP SELECT settings FROM items WHERE settings > 0" + suffix );
4646 Assertions .assertEquals (6 , command .getResultSetMetaData ().getColumns ().size ());
@@ -49,7 +49,7 @@ void preservesDataModeAndItsFileCacheRequirement() {
4949 Assertions .assertThrows (Exception .class ,
5050 () -> new NereidsParser ().parseSingle ("WARM UP SELECT * FROM items" ));
5151 WarmupSelectCommand index = (WarmupSelectCommand ) new NereidsParser ().parseSingle (
52- "WARM UP SELECT embedding FROM items SETTINGS (read_index_only=true)" );
52+ "WARM UP SELECT embedding FROM items PROPERTIES (read_index_only=true)" );
5353 Assertions .assertEquals (5 , index .getResultSetMetaData ().getColumns ().size ());
5454 } finally {
5555 Config .cloud_unique_id = cloud ;
@@ -62,24 +62,27 @@ void supportsQualifiedColumnsAndStars() {
6262 for (String query : new String [] {
6363 "SELECT i.embedding FROM lake.demo.items i" ,
6464 "SELECT items.* FROM lake.demo.items" ,
65- "SELECT embedding, embedding FROM lake.demo.items" }) {
65+ "SELECT embedding, embedding FROM lake.demo.items" ,
66+ "SELECT properties FROM lake.demo.items properties" ,
67+ "SELECT settings FROM lake.demo.items settings" }) {
6668 Assertions .assertInstanceOf (WarmupSelectCommand .class , new NereidsParser ().parseSingle (
67- "WARM UP " + query + " SETTINGS (read_index_only='TRUE')" ));
69+ "WARM UP " + query + " PROPERTIES (read_index_only='TRUE')" ));
6870 }
6971 }
7072
7173 @ Test
72- void rejectsUnsupportedSettingsAndProjectionSemantics () {
74+ void rejectsUnsupportedPropertiesAndProjectionSemantics () {
7375 for (String sql : new String [] {
7476 "WARM UP INDEX idx ON lake.demo.items" ,
75- "WARM UP SELECT * FROM items SETTINGS (read_index_only='yes')" ,
76- "WARM UP SELECT * FROM items SETTINGS (typo=true)" ,
77- "WARM UP SELECT * FROM items WHERE id=1 SETTINGS (read_index_only=true)" ,
78- "EXPLAIN WARM UP SELECT * FROM items SETTINGS (read_index_only=true)" ,
79- "WARM UP SELECT wrong.embedding FROM items SETTINGS (read_index_only=true)" ,
80- "WARM UP SELECT * EXCEPT(id) FROM items SETTINGS (read_index_only=true)" ,
81- "WARM UP SELECT *, id FROM items SETTINGS (read_index_only=true)" ,
82- "WARM UP SELECT id+1 FROM items SETTINGS (read_index_only=true)" }) {
77+ "WARM UP SELECT * FROM items SETTINGS (read_index_only=true)" ,
78+ "WARM UP SELECT * FROM items PROPERTIES (read_index_only='yes')" ,
79+ "WARM UP SELECT * FROM items PROPERTIES (typo=true)" ,
80+ "WARM UP SELECT * FROM items WHERE id=1 PROPERTIES (read_index_only=true)" ,
81+ "EXPLAIN WARM UP SELECT * FROM items PROPERTIES (read_index_only=true)" ,
82+ "WARM UP SELECT wrong.embedding FROM items PROPERTIES (read_index_only=true)" ,
83+ "WARM UP SELECT * EXCEPT(id) FROM items PROPERTIES (read_index_only=true)" ,
84+ "WARM UP SELECT *, id FROM items PROPERTIES (read_index_only=true)" ,
85+ "WARM UP SELECT id+1 FROM items PROPERTIES (read_index_only=true)" }) {
8386 Assertions .assertThrows (Exception .class , () -> new NereidsParser ().parseSingle (sql ), sql );
8487 }
8588 }
0 commit comments