001package gudusoft.gsqlparser.common.structured; 002 003public final class StructuredExpansion { 004 005 private final StructuredExpansionKind kind; 006 private final StructuredColumnPath elementPath; 007 private final boolean preservesNullRows; 008 009 public StructuredExpansion(StructuredExpansionKind kind, 010 StructuredColumnPath elementPath, 011 boolean preservesNullRows) { 012 if (kind == null) { 013 throw new IllegalArgumentException("kind must not be null"); 014 } 015 if (elementPath == null) { 016 throw new IllegalArgumentException("elementPath must not be null"); 017 } 018 this.kind = kind; 019 this.elementPath = elementPath; 020 this.preservesNullRows = preservesNullRows; 021 } 022 023 public StructuredExpansionKind getKind() { 024 return kind; 025 } 026 027 public StructuredColumnPath getElementPath() { 028 return elementPath; 029 } 030 031 /** Whether the expansion preserves null/empty input rows (Spark explode_outer). */ 032 public boolean preservesNullRows() { 033 return preservesNullRows; 034 } 035}