1919import org .testng .annotations .AfterClass ;
2020import org .testng .annotations .Optional ;
2121
22+ import static com .facebook .presto .common .type .BigintType .BIGINT ;
2223import static com .facebook .presto .common .type .VarcharType .VARCHAR ;
2324import static com .facebook .presto .testing .MaterializedResult .resultBuilder ;
2425import static com .facebook .presto .testing .assertions .Assert .assertEquals ;
@@ -119,16 +120,16 @@ public void testShowColumns(@Optional("PARQUET") String storageFormat)
119120 {
120121 MaterializedResult actual = computeActual ("SHOW COLUMNS FROM orders" );
121122
122- MaterializedResult expectedParametrizedVarchar = resultBuilder (getSession (), VARCHAR , VARCHAR , VARCHAR , VARCHAR )
123- .row ("orderkey" , "bigint" , "" , "" )
124- .row ("custkey" , "bigint" , "" , "" )
125- .row ("orderstatus" , "varchar" , "" , "" )
126- .row ("totalprice" , "double" , "" , "" )
127- .row ("orderdate" , "varchar" , "" , "" )
128- .row ("orderpriority" , "varchar" , "" , "" )
129- .row ("clerk" , "varchar" , "" , "" )
130- .row ("shippriority" , "integer" , "" , "" )
131- .row ("comment" , "varchar" , "" , "" )
123+ MaterializedResult expectedParametrizedVarchar = resultBuilder (getSession (), VARCHAR , VARCHAR , VARCHAR , VARCHAR , BIGINT , BIGINT , BIGINT )
124+ .row ("orderkey" , "bigint" , "" , "" , Long . valueOf ( 19 ), null , null )
125+ .row ("custkey" , "bigint" , "" , "" , Long . valueOf ( 19 ), null , null )
126+ .row ("orderstatus" , "varchar" , "" , "" , null , null , Long . valueOf ( 2147483647 ) )
127+ .row ("totalprice" , "double" , "" , "" , Long . valueOf ( 53 ), null , null )
128+ .row ("orderdate" , "varchar" , "" , "" , null , null , Long . valueOf ( 2147483647 ) )
129+ .row ("orderpriority" , "varchar" , "" , "" , null , null , Long . valueOf ( 2147483647 ) )
130+ .row ("clerk" , "varchar" , "" , "" , null , null , Long . valueOf ( 2147483647 ) )
131+ .row ("shippriority" , "integer" , "" , "" , Long . valueOf ( 10 ), null , null )
132+ .row ("comment" , "varchar" , "" , "" , null , null , Long . valueOf ( 2147483647 ) )
132133 .build ();
133134
134135 assertEquals (actual , expectedParametrizedVarchar );
@@ -151,4 +152,57 @@ public void testWrittenStats()
151152 {
152153 // TODO Cassandra connector supports CTAS and inserts, but the test would fail
153154 }
155+
156+ @ Override
157+ public void testPayloadJoinApplicability ()
158+ {
159+ // no op -- test not supported due to lack of support for array types.
160+ }
161+
162+ @ Override
163+ public void testPayloadJoinCorrectness ()
164+ {
165+ // no op -- test not supported due to lack of support for array types.
166+ }
167+ @ Override
168+ public void testNonAutoCommitTransactionWithCommit ()
169+ {
170+ // Connector only supports writes using ctas
171+ }
172+
173+ @ Override
174+ public void testNonAutoCommitTransactionWithRollback ()
175+ {
176+ // Connector only supports writes using ctas
177+ }
178+
179+ @ Override
180+ public void testRemoveRedundantCastToVarcharInJoinClause ()
181+ {
182+ // no op -- test not supported due to lack of support for array types.
183+ }
184+
185+ @ Override
186+ public void testStringFilters ()
187+ {
188+ // no op -- test not supported due to lack of support for char type.
189+ }
190+
191+ @ Override
192+ public void testSubfieldAccessControl ()
193+ {
194+ // no op -- test not supported due to lack of support for array types.
195+ }
196+
197+ @ Override
198+ protected String getOrderDateExpression (String storageFormat )
199+ {
200+ return "CAST(o.orderdate AS DATE)" ;
201+ }
202+
203+ @ Override
204+ protected String getShipDateExpression (String storageFormat )
205+ {
206+ return "cast(l.shipdate as DATE)" ;
207+ }
154208}
0 commit comments