001package gudusoft.gsqlparser.nodes; 002 003import gudusoft.gsqlparser.nodes.flink.TFlinkTableProperty; 004 005/** 006 * AST node for StarRocks BEGIN LOAD TRANSACTION statement. 007 * 008 * Syntax: 009 * BEGIN LOAD TRANSACTION [FOR db.table] [WITH LABEL label_name] [PROPERTIES ('key'='value', ...)] 010 * 011 * Used for transactional bulk data loading with two-phase commit support. 012 */ 013public class TBeginLoadTransactionSqlNode extends TParseTreeNode { 014 // Target table specification (optional: FOR db.table) 015 private TObjectName targetTable; 016 017 // Transaction label (optional: WITH LABEL label_name) 018 private TObjectName labelName; 019 020 // Properties (PROPERTIES clause) - raw type to allow parser assignment 021 private TParseTreeNode loadProperties; 022 023 // Getters and setters 024 public TObjectName getTargetTable() { 025 return targetTable; 026 } 027 028 public void setTargetTable(TObjectName targetTable) { 029 this.targetTable = targetTable; 030 } 031 032 public TObjectName getLabelName() { 033 return labelName; 034 } 035 036 public void setLabelName(TObjectName labelName) { 037 this.labelName = labelName; 038 } 039 040 @SuppressWarnings("unchecked") 041 public TPTNodeList<TFlinkTableProperty> getLoadProperties() { 042 return (TPTNodeList<TFlinkTableProperty>) loadProperties; 043 } 044 045 public void setLoadProperties(TParseTreeNode loadProperties) { 046 this.loadProperties = loadProperties; 047 } 048 049 public void init(Object arg1) { 050 // arg1 can be target table (TObjectName) or null 051 if (arg1 instanceof TObjectName) { 052 this.targetTable = (TObjectName) arg1; 053 } 054 } 055}