This is an automated email from the ASF dual-hosted git repository.

hansva pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/hop.git


The following commit(s) were added to refs/heads/main by this push:
     new d6fb2813a3 fix preview to show last set of rows and not skip row 
between sets, fixes #5305 (#5878)
d6fb2813a3 is described below

commit d6fb2813a316c9b3375b0bf13e3082381302cc57
Author: Hans Van Akelyen <[email protected]>
AuthorDate: Thu Oct 23 20:42:16 2025 +0200

    fix preview to show last set of rows and not skip row between sets, fixes 
#5305 (#5878)
---
 .../hop/pipeline/debug/PipelineDebugMeta.java      | 60 +++-------------------
 1 file changed, 7 insertions(+), 53 deletions(-)

diff --git 
a/engine/src/main/java/org/apache/hop/pipeline/debug/PipelineDebugMeta.java 
b/engine/src/main/java/org/apache/hop/pipeline/debug/PipelineDebugMeta.java
index 1ce3fe3494..af36267647 100644
--- a/engine/src/main/java/org/apache/hop/pipeline/debug/PipelineDebugMeta.java
+++ b/engine/src/main/java/org/apache/hop/pipeline/debug/PipelineDebugMeta.java
@@ -20,6 +20,8 @@ package org.apache.hop.pipeline.debug;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import lombok.Getter;
+import lombok.Setter;
 import org.apache.hop.core.exception.HopException;
 import org.apache.hop.core.exception.HopTransformException;
 import org.apache.hop.core.row.IRowMeta;
@@ -35,52 +37,24 @@ import org.apache.hop.pipeline.transform.TransformMeta;
  * breakpoints can be applied to transforms. When a certain condition is met, 
the pipeline will be
  * paused and the caller will be informed of this fact through a listener 
system.
  */
+@Getter
+@Setter
 public class PipelineDebugMeta {
 
   public static final String XML_TAG = "pipeline-debug-meta";
 
   private PipelineMeta pipelineMeta;
   private Map<TransformMeta, TransformDebugMeta> transformDebugMetaMap;
-  private boolean dataShown = false;
 
   public PipelineDebugMeta(PipelineMeta pipelineMeta) {
     this.pipelineMeta = pipelineMeta;
     transformDebugMetaMap = new HashMap<>();
   }
 
-  /**
-   * @return the referenced pipeline metadata
-   */
-  public PipelineMeta getPipelineMeta() {
-    return pipelineMeta;
-  }
-
-  /**
-   * @param pipelineMeta the pipeline metadata to reference
-   */
-  public void setPipelineMeta(PipelineMeta pipelineMeta) {
-    this.pipelineMeta = pipelineMeta;
-  }
-
-  /**
-   * @return the map that contains the debugging information per transform
-   */
-  public Map<TransformMeta, TransformDebugMeta> getTransformDebugMetaMap() {
-    return transformDebugMetaMap;
-  }
-
-  /**
-   * @param transformDebugMeta the map that contains the debugging information 
per transform
-   */
-  public void setTransformDebugMetaMap(Map<TransformMeta, TransformDebugMeta> 
transformDebugMeta) {
-    this.transformDebugMetaMap = transformDebugMeta;
-  }
-
   public synchronized void addRowListenersToPipeline(final 
IPipelineEngine<PipelineMeta> pipeline) {
 
     // for every transform in the map, add a row listener...
     //
-    dataShown = false;
     for (final TransformMeta transformMeta : transformDebugMetaMap.keySet()) {
       final TransformDebugMeta transformDebugMeta = 
transformDebugMetaMap.get(transformMeta);
 
@@ -107,7 +81,7 @@ public class PipelineDebugMeta {
                       if (transformDebugMeta.isReadingFirstRows() && rowCount 
> 0) {
 
                         int bufferSize = 
transformDebugMeta.getRowBuffer().size();
-                        if (bufferSize < rowCount) {
+                        if (bufferSize < rowCount - 1) {
 
                           // This is the classic preview mode.
                           // We add simply add the row to the buffer.
@@ -122,7 +96,8 @@ public class PipelineDebugMeta {
                           // Also call the pause / break-point listeners on 
the transform
                           // debugger...
                           //
-                          dataShown = true;
+                          transformDebugMeta.setRowBufferMeta(rowMeta);
+                          
transformDebugMeta.getRowBuffer().add(rowMeta.cloneRow(row));
                           
transformDebugMeta.fireBreakPointListeners(PipelineDebugMeta.this);
                         }
                       } else if (transformDebugMeta.isPausingOnBreakPoint()
@@ -184,9 +159,6 @@ public class PipelineDebugMeta {
     try {
       pipeline.addExecutionFinishedListener(
           p -> {
-            if (dataShown) {
-              return;
-            }
             for (TransformMeta transformMeta : transformDebugMetaMap.keySet()) 
{
               TransformDebugMeta transformDebugMeta = 
transformDebugMetaMap.get(transformMeta);
               if (transformDebugMeta != null) {
@@ -243,22 +215,4 @@ public class PipelineDebugMeta {
 
     return nr;
   }
-
-  /**
-   * Gets dataShown
-   *
-   * @return value of dataShown
-   */
-  public boolean isDataShown() {
-    return dataShown;
-  }
-
-  /**
-   * Sets dataShown
-   *
-   * @param dataShown value of dataShown
-   */
-  public void setDataShown(boolean dataShown) {
-    this.dataShown = dataShown;
-  }
 }

Reply via email to