2

Hi I was wondering if someone could explain this signature I found in the Spark codebase. It looks like a recursive datatype, it's used to build the query plan so it kind of makes sense. Does anyone have anymore detailed knowledge of this?

abstract class TreeNode[BaseType <: TreeNode[BaseType]] extends Product 
1
  • "Does anyone have anymore detailed knowledge of this?" is a question about the existence of knowledgeable people in a specific area of research, it is not a valid SO question. Commented Feb 18, 2018 at 10:38

1 Answer 1

7

It is F-Bounded Types (or self-recursive types). Not scala specific, e.g. equivalent in java

public abstract class Enum<E extends Enum<E>> implements Comparable<E>

You can read here or here

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.