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


##########
gluten-flink/planner/src/main/java/org/apache/gluten/rexnode/RexConversionContext.java:
##########
@@ -14,24 +14,18 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.gluten.rexnode.functions;
 
-import io.github.zhztheplayer.velox4j.expression.CallTypedExpr;
-import io.github.zhztheplayer.velox4j.expression.TypedExpr;
-import io.github.zhztheplayer.velox4j.type.Type;
+package org.apache.gluten.rexnode;
 
 import java.util.List;
 
-/** Default convertor for velox function. */
-public class DefaultFunctionConverter implements FunctionConverter {
-    private final String function;
-
-    public DefaultFunctionConverter(String function) {
-        this.function = function;
+public class RexConversionContext {
+    private final List<String> inputAttributeNames;
+    
+    public RexConversionContext(List<String> inputAttributeNames) {
+        this.inputAttributeNames = inputAttributeNames;
     }
-
-    @Override
-    public CallTypedExpr toVeloxFunction(Type nodeType, List<TypedExpr> 
params) {
-        return new CallTypedExpr(nodeType, params, function);
+    public List<String> getInputAttributeNames() {
+        return inputAttributeNames;
     }
-}
+};

Review Comment:
   done



##########
gluten-flink/planner/src/main/java/org/apache/gluten/rexnode/Utils.java:
##########
@@ -46,4 +56,42 @@ public static void registerRegistry() {
             ISerializableRegistry.registerAll();
         }
     }
+
+    private static final List<Type> NUMBER_TYPE_PRIORITY_LIST = List.of(

Review Comment:
   done



##########
gluten-flink/planner/src/main/java/org/apache/gluten/rexnode/Utils.java:
##########
@@ -46,4 +56,42 @@ public static void registerRegistry() {
             ISerializableRegistry.registerAll();
         }
     }
+
+    private static final List<Type> NUMBER_TYPE_PRIORITY_LIST = List.of(
+        new TinyIntType(),
+        new SmallIntType(),
+        new IntegerType(),
+        new BigIntType(),
+        new RealType(),
+        new DoubleType()
+    );
+
+    private static int getNumberTypePriority(Type type) {

Review Comment:
   done



##########
gluten-flink/planner/src/main/java/org/apache/gluten/rexnode/Utils.java:
##########
@@ -46,4 +56,42 @@ public static void registerRegistry() {
             ISerializableRegistry.registerAll();
         }
     }
+
+    private static final List<Type> NUMBER_TYPE_PRIORITY_LIST = List.of(
+        new TinyIntType(),
+        new SmallIntType(),
+        new IntegerType(),
+        new BigIntType(),
+        new RealType(),
+        new DoubleType()
+    );
+
+    private static int getNumberTypePriority(Type type) {
+        int index = -1;
+        for (int i = 0; i < NUMBER_TYPE_PRIORITY_LIST.size(); ++i) {
+            if 
(NUMBER_TYPE_PRIORITY_LIST.get(i).getClass().equals((type.getClass()))) {
+                index = i;
+                break;

Review Comment:
   done



-- 
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