lgbo-ustc commented on code in PR #9554:
URL: https://github.com/apache/incubator-gluten/pull/9554#discussion_r2600715388


##########
gluten-flink/planner/src/main/java/org/apache/gluten/velox/FromElementsSourceFactory.java:
##########
@@ -40,22 +42,27 @@
 import java.util.List;
 import java.util.Map;
 
-public class VeloxSourceBuilder {
+public class FromElementsSourceFactory implements VeloxSourceSinkFactory {
 
-  public static Transformation<RowData> build(
-      Transformation<RowData> transformation, ScanTableSource scanTableSource) 
{
+  @SuppressWarnings("rawtypes")
+  @Override
+  public boolean match(Transformation<RowData> transformation) {
     if (transformation instanceof LegacySourceTransformation) {
-      if 
(scanTableSource.getClass().getSimpleName().equals("TestValuesScanLookupTableSource"))
 {
-        return buildFromElementsSource(transformation, scanTableSource);
+      StreamSource source = ((LegacySourceTransformation) 
transformation).getOperator();
+      String sourceFunctionName = 
source.getUserFunction().getClass().getSimpleName();
+      if (sourceFunctionName.equals("FromElementsFunction")) {

Review Comment:
   Is `isinstanceof` better?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to