Last active
July 18, 2022 09:15
-
-
Save shivam-880/9094e2fdae4a812b5b34eb8a846670e8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trait ValueVector { | |
def allocateNew() | |
} | |
abstract class BaseFixedWidthVector extends ValueVector { | |
def allocateNew() { | |
// impl | |
} | |
} | |
class IntVector extends BaseFixedWidthVector | |
abstract class BaseVariableWidthVector extends ValueVector { | |
def allocateNew() { | |
// impl | |
} | |
} | |
class VarCharVector extends BaseVariableWidthVector | |
val intVector: ValueVector = new IntVector() | |
val strVector: ValueVector = new VarCharVector() | |
intVector.allocateNew() | |
strVector.allocateNew() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment