1616import com .facebook .airlift .log .Level ;
1717import com .facebook .airlift .log .Logging ;
1818import com .facebook .presto .nativeworker .AbstractTestNativeGeneralQueries ;
19+ import com .facebook .presto .scalar .sql .SqlInvokedFunctionsPlugin ;
1920import com .facebook .presto .testing .ExpectedQueryRunner ;
2021import com .facebook .presto .testing .QueryRunner ;
2122import org .testng .annotations .Ignore ;
@@ -31,14 +32,22 @@ public class TestPrestoSparkNativeGeneralQueries
3132 @ Override
3233 protected QueryRunner createQueryRunner ()
3334 {
34- return PrestoSparkNativeQueryRunnerUtils .createHiveRunner ();
35+ QueryRunner queryRunner = PrestoSparkNativeQueryRunnerUtils .createHiveRunner ();
36+
37+ // Install plugins needed for extra array functions.
38+ queryRunner .installPlugin (new SqlInvokedFunctionsPlugin ());
39+ return queryRunner ;
3540 }
3641
3742 @ Override
3843 protected ExpectedQueryRunner createExpectedQueryRunner ()
3944 throws Exception
4045 {
41- return PrestoSparkNativeQueryRunnerUtils .createJavaQueryRunner ();
46+ QueryRunner queryRunner = PrestoSparkNativeQueryRunnerUtils .createJavaQueryRunner ();
47+
48+ // Install plugins needed for extra array functions.
49+ queryRunner .installPlugin (new SqlInvokedFunctionsPlugin ());
50+ return queryRunner ;
4251 }
4352
4453 @ Override
@@ -107,18 +116,8 @@ public void testRowWiseExchange() {}
107116 @ Ignore
108117 public void testAnalyzeStatsOnDecimals () {}
109118
110- //Caused by: com.facebook.presto.sql.analyzer.SemanticException: line 1:31: Function array_duplicates not registered
111- @ Override
112- @ Ignore
113- public void testArrayAndMapFunctions () {}
114-
115119 // VeloxRuntimeError: it != connectors().end() Connector with ID 'hivecached' not registered
116120 @ Override
117121 @ Ignore
118122 public void testCatalogWithCacheEnabled () {}
119-
120- // Caused by: com.facebook.presto.spi.PrestoException: Sampling function: key_sampling_percent not cannot be resolved
121- @ Override
122- @ Ignore
123- public void testKeyBasedSamplingInlined () {}
124123}
0 commit comments