A Text File Is Marked as a Binary File
Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
The issue can be fix by stripping null characters using the following command.
tr -d '\000' < filein > fileout
References
Sum Type in Rust
Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
Enum is the preferred way to constrcut a sum type of several types (which does not implemente the same trait).
The Rust crate
either
provides an enum Either (with variants Left …
Spark Issue: Pure Python Code Errors
Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
This post collects some typical pure Python errors in PySpark applications.
Symptom 1
object has no attribute
Solution 1
Fix the attribute name.
Symptom 2
No such file or directory
Solution …
Spark SQL
Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
-
Since a Spark DataFrame is immutable, you cannot update or delete records from a physical table (e.g., a Hive table) directly using Spark DataFrame/SQL API. However …
Spark Issue: TypeError WithReplacement
Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
Symptoms
TypeError: withReplacement (optional), fraction (required) and seed (optional) should be a bool, float and number; however, got [
].
Causes
An integer number (e.g., 1) is passed to the fraction parameter …