Created
July 6, 2015 20:15
-
-
Save frsyuki/ffd5450f86ad0b6ebb54 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
@MessagePackDeserialzeTypeSwitches({ | |
@MessagePackTypeSwitches.ifEquals(key = "type", value = "output", then = OutputNode.class), | |
@MessagePackTypeSwitches.ifEquals(key = "type", value = "project", then = ProjectNode.class), | |
@MessagePackTypeSwitches.ifEquals(key = "type", value = "tablescan", then = TableScanNode.class), | |
@MessagePackTypeSwitches.ifExists(key = "error", then = ErrorNode.class) | |
@MessagePackTypeSwitches.ifExists(key = "engine", then = EngineNode.class) | |
}) | |
public abstract class PlanNode | |
{ | |
... | |
} | |
public class ErrorNode extends PlanNode | |
{ | |
@JsonProperty("error") | |
private String getError() { ... } | |
} | |
public class EngineNode extends PlanNode | |
{ | |
@JsonProperty("engine") | |
private String getEngine() { ... } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment