nxcals.api.extraction.data.builders.DataFrame.semanticHash

DataFrame.semanticHash() int

Returns a hash code of the logical query plan against this DataFrame.

New in version 3.1.0.

Changed in version 3.5.0: Supports Spark Connect.

Notes

Unlike the standard hash code, the hash is calculated against the query plan simplified by tolerating the cosmetic differences such as attribute names.

This API is a developer API.

Returns:

Hash value.

Return type:

int

Examples

>>> spark.range(10).selectExpr("id as col0").semanticHash()  
1855039936
>>> spark.range(10).selectExpr("id as col1").semanticHash()  
1855039936