KevinyhZou commented on code in PR #12297:
URL: https://github.com/apache/gluten/pull/12297#discussion_r3488915814
##########
gluten-flink/planner/src/main/java/org/apache/flink/table/planner/plan/nodes/exec/stream/StreamExecWindowAggregate.java:
##########
@@ -313,4 +314,13 @@ protected Transformation<RowData> translateToPlanInternal(
transform.setStateKeyType(selector.getProducedType());
return transform;
}
+
+ private int getWindowPropertyIndex(Class<? extends WindowProperty>
propertyClass) {
Review Comment:
This seems useless code.
##########
gluten-flink/runtime/src/main/java/org/apache/gluten/velox/VeloxSourceSinkFactory.java:
##########
@@ -43,21 +58,67 @@ Transformation<RowData> buildVeloxSink(
/** Choose the matched source/sink factory by given transformation. */
private static Optional<VeloxSourceSinkFactory> getFactory(
- Transformation<RowData> transformation) {
+ Transformation<RowData> transformation, Map<String, Object> parameters) {
ServiceLoader<VeloxSourceSinkFactory> factories =
ServiceLoader.load(VeloxSourceSinkFactory.class);
- for (VeloxSourceSinkFactory factory : factories) {
- if (factory.match(transformation)) {
- return Optional.of(factory);
+ try {
+ for (VeloxSourceSinkFactory factory : factories) {
+ if (factory.match(transformation)) {
+ return Optional.of(factory);
+ }
+ }
+ } catch (ServiceConfigurationError e) {
+ LOG.warn("Failed to load Velox source/sink factory", e);
+ }
+ for (String factoryClassName : FACTORY_CLASS_NAMES) {
+ Optional<VeloxSourceSinkFactory> factory = loadFactory(factoryClassName,
parameters);
Review Comment:
Seems by implemeting this, we can remove the spi
`org.apache.gluten.velox/.VeloxSourceSinkFactory`
--
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]