Set the context before creating SparkLogicalPlans.