public final class GuidEncoder extends Object
All hashes: SHA-256 over UTF-8 of pipe-joined normalized fields; output is 64
lowercase hex chars. Normalization rules (rev 3): trim every field; null and empty
both contribute an empty string ("empty→empty, not NULL"); field positions are
preserved when values are empty; names are lowercased, roles/record types uppercased;
| is the frozen P0 separator.
Byte-identity against
gudu-sqlflow/tools/lineage-contract-fixtures/hash_identity_fixtures.json
is asserted by Lineage2ContractConformanceTest on every build.
Internal API: not part of the public gsqlparser surface.
| Modifier and Type | Method and Description |
|---|---|
static String |
factGuid(String workspaceId,
String sourceDatabase,
String sourceSchema,
String sourceObjectName,
String sourceColumnName,
String targetDatabase,
String targetSchema,
String targetObjectName,
String targetColumnName,
String lineageRole)
Canonical edge identity (contract §3.4): workspace + source endpoint + target
endpoint + role.
|
static String |
incomingDeltaHash(String predicateText,
String transformationText,
String queryFingerprint,
String recordStatus)
Mutable-content hash for INCOMING occurrences (contract §7.2).
|
static String |
occurrenceGuid(String workspaceId,
String factGuid,
String variantGuid,
String recordType,
String procedureName,
String queryId,
String queryFingerprint,
String inputUnitId,
int statementIndex)
Evidence instance of a variant (contract §5.2).
|
static String |
outgoingDeltaHash(String queryFingerprint,
Long executionCount,
String firstExecutionAtIso,
String lastExecutionAtIso,
String recordStatus)
Mutable-content hash for OUTGOING occurrences (contract §7.3).
|
static String |
sha256Hex(String text)
SHA-256 of the UTF-8 bytes, 64 lowercase hex chars.
|
static String |
textHash(String text)
transformation_hash / predicate_hash / expression_hash component: sha256 of the
trimmed text, or the empty string (not a hash) when the text is null/empty.
|
static String |
transformNodeGuid(String workspaceId,
String occurrenceGuid,
int statementIndex,
String localScopeId,
String localNodeId,
String nodeKind)
Statement-local transform graph node identity (contract §6.2).
|
static String |
transformStepGuid(String workspaceId,
String occurrenceGuid,
int statementIndex,
String localScopeId,
int stepIndex,
String operationType,
String targetNodeGuid,
String expressionHash)
Statement-local transform graph step identity (contract §6.3).
|
static String |
variantGuid(String workspaceId,
String factGuid,
String lineageRole,
String transformationHash,
String predicateHash,
String queryFingerprint)
Semantic/effect signature under one fact (contract §4.2).
|
public static String factGuid(String workspaceId, String sourceDatabase, String sourceSchema, String sourceObjectName, String sourceColumnName, String targetDatabase, String targetSchema, String targetObjectName, String targetColumnName, String lineageRole)
public static String textHash(String text)
public static String variantGuid(String workspaceId, String factGuid, String lineageRole, String transformationHash, String predicateHash, String queryFingerprint)
public static String occurrenceGuid(String workspaceId, String factGuid, String variantGuid, String recordType, String procedureName, String queryId, String queryFingerprint, String inputUnitId, int statementIndex)
public static String incomingDeltaHash(String predicateText, String transformationText, String queryFingerprint, String recordStatus)
public static String outgoingDeltaHash(String queryFingerprint, Long executionCount, String firstExecutionAtIso, String lastExecutionAtIso, String recordStatus)
public static String transformNodeGuid(String workspaceId, String occurrenceGuid, int statementIndex, String localScopeId, String localNodeId, String nodeKind)
public static String transformStepGuid(String workspaceId, String occurrenceGuid, int statementIndex, String localScopeId, int stepIndex, String operationType, String targetNodeGuid, String expressionHash)