2424import com .facebook .presto .metadata .InMemoryNodeManager ;
2525import com .facebook .presto .metadata .Metadata ;
2626import com .facebook .presto .nodeManager .PluginNodeManager ;
27+ import com .facebook .presto .scalar .sql .SqlInvokedFunctionsPlugin ;
2728import com .facebook .presto .spi .WarningCollector ;
2829import com .facebook .presto .sql .analyzer .FeaturesConfig ;
2930import com .facebook .presto .sql .analyzer .QueryExplainer ;
5657import static java .util .Collections .emptyList ;
5758import static org .testng .Assert .fail ;
5859
59- public class TestBuiltInNativeFunctions
60+ public class TestPrestoNativeBuiltInFunctions
6061 extends AbstractTestQueryFramework
6162{
6263 @ Override
@@ -75,12 +76,12 @@ protected QueryRunner createQueryRunner()
7576 throws Exception
7677 {
7778 DistributedQueryRunner queryRunner = (DistributedQueryRunner ) PrestoNativeQueryRunnerUtils .nativeHiveQueryRunnerBuilder ()
78- .setExtraProperties (ImmutableMap .of ("built-in-sidecar-functions-enabled" , "true" ))
7979 .setAddStorageFormatToPath (true )
8080 .setBuiltInWorkerFunctionsEnabled (true )
8181 .build ();
8282
8383 queryRunner .registerNativeFunctions ();
84+ queryRunner .installPlugin (new SqlInvokedFunctionsPlugin ());
8485
8586 return queryRunner ;
8687 }
@@ -89,9 +90,13 @@ protected QueryRunner createQueryRunner()
8990 protected QueryRunner createExpectedQueryRunner ()
9091 throws Exception
9192 {
92- return PrestoNativeQueryRunnerUtils .javaHiveQueryRunnerBuilder ()
93+ QueryRunner queryRunner = PrestoNativeQueryRunnerUtils .javaHiveQueryRunnerBuilder ()
9394 .setAddStorageFormatToPath (true )
9495 .build ();
96+
97+ queryRunner .installPlugin (new SqlInvokedFunctionsPlugin ());
98+
99+ return queryRunner ;
95100 }
96101
97102 private void assertJsonPlan (@ Language ("SQL" ) String query , boolean withBuiltInSidecarEnabled , @ Language ("RegExp" ) String jsonPlanRegex , boolean shouldContainRegex )
0 commit comments