Copilot commented on code in PR #8846:
URL: https://github.com/apache/gravitino/pull/8846#discussion_r2452215982


##########
core/src/main/java/org/apache/gravitino/listener/api/event/stats/DropStatisticsFailureEvent.java:
##########
@@ -0,0 +1,57 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package org.apache.gravitino.listener.api.event.stats;
+
+import java.util.List;
+import org.apache.gravitino.NameIdentifier;
+import org.apache.gravitino.annotation.DeveloperApi;
+import org.apache.gravitino.listener.api.event.OperationType;
+
+/** Event fired when dropping metadata object statistics fails. */
+@DeveloperApi
+public class DropStatisticsFailureEvent extends StatisticsFailureEvent {
+  private final List<String> statisticNames;
+
+  /**
+   * Constructor for DropStatisticsFailureEvent.
+   *
+   * @param user
+   * @param identifier
+   * @param exception

Review Comment:
   Javadoc parameter descriptions are missing. Each @param should include a 
description of the parameter.
   ```suggestion
      * @param user the name of the user who initiated the drop statistics 
operation
      * @param identifier the identifier of the metadata object whose 
statistics were to be dropped
      * @param exception the exception that was thrown during the drop 
statistics operation
      * @param statisticNames the list of statistic names that were attempted 
to be dropped
   ```



##########
core/src/main/java/org/apache/gravitino/listener/api/event/stats/UpdatePartitionStatisticsEvent.java:
##########
@@ -0,0 +1,60 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package org.apache.gravitino.listener.api.event.stats;
+
+import java.util.List;
+import org.apache.gravitino.NameIdentifier;
+import org.apache.gravitino.annotation.DeveloperApi;
+import org.apache.gravitino.listener.api.event.OperationType;
+import org.apache.gravitino.stats.PartitionStatisticsUpdate;
+
+/** Event fired when updating partition statistics. */
+@DeveloperApi
+public class UpdatePartitionStatisticsEvent extends StatisticsEvent {
+  List<PartitionStatisticsUpdate> partitionStatisticsUpdates;

Review Comment:
   Field should be declared as 'private final' for consistency with other event 
classes and immutability.
   ```suggestion
     private final List<PartitionStatisticsUpdate> partitionStatisticsUpdates;
   ```



##########
core/src/main/java/org/apache/gravitino/listener/api/event/stats/StatsiticsPreEvent.java:
##########
@@ -0,0 +1,37 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package org.apache.gravitino.listener.api.event.stats;
+
+import org.apache.gravitino.NameIdentifier;
+import org.apache.gravitino.annotation.DeveloperApi;
+import org.apache.gravitino.listener.api.event.PreEvent;
+
+/** Base class for all statistics-related pre-events. */
+@DeveloperApi
+public abstract class StatsiticsPreEvent extends PreEvent {
+  /**
+   * Constructor for creating a statistics pre-event.
+   *
+   * @param user the user initiating the event
+   * @param identifier the name identifier associated with the event.
+   */
+  protected StatsiticsPreEvent(String user, NameIdentifier identifier) {

Review Comment:
   Corrected spelling of 'Statsitics' to 'Statistics' in class name.
   ```suggestion
   public abstract class StatisticsPreEvent extends PreEvent {
     /**
      * Constructor for creating a statistics pre-event.
      *
      * @param user the user initiating the event
      * @param identifier the name identifier associated with the event.
      */
     protected StatisticsPreEvent(String user, NameIdentifier identifier) {
   ```



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

Reply via email to