public Schema getPhysicalSchema() { return getInSchema(); }
public Schema getPhysicalSchema() { return getInSchema(); }
@Override public LogicalNode visitScan(CompilationContext context, LogicalPlan plan, LogicalPlan.QueryBlock block, ScanNode node, Stack<LogicalNode> stack) throws TajoException { compileProjectableNode(context, node.getInSchema(), node); compileSelectableNode(context, node.getInSchema(), node); return node; }
@Override public LogicalNode visitScan(CompilationContext context, LogicalPlan plan, LogicalPlan.QueryBlock block, ScanNode node, Stack<LogicalNode> stack) throws TajoException { compileProjectableNode(context, node.getInSchema(), node); compileSelectableNode(context, node.getInSchema(), node); return node; }
public PartitionMergeScanExec(TaskAttemptContext context, ScanNode plan, CatalogProtos.FragmentProto[] fragments) throws IOException { super(context, plan.getInSchema(), plan.getOutSchema()); this.plan = plan; this.fragments = fragments; inputStats = new TableStats(); }
public PartitionMergeScanExec(TaskAttemptContext context, ScanNode plan, CatalogProtos.FragmentProto[] fragments) throws IOException { super(context, plan.getInSchema(), plan.getOutSchema()); this.plan = plan; this.fragments = fragments; inputStats = new TableStats(); }
public void init(ScanNode scanNode, Path[] inputPaths) { tableDesc = scanNode.tableDesc; setInSchema(scanNode.getInSchema()); setOutSchema(scanNode.getOutSchema()); this.qual = scanNode.qual; this.targets = scanNode.targets; this.inputPaths = inputPaths; if (scanNode.hasAlias()) { alias = scanNode.alias; } }
public SystemPhysicalExec(TaskAttemptContext context, ScanNode scanNode) { super(context, scanNode.getInSchema(), scanNode.getOutSchema()); this.scanNode = scanNode; if (this.scanNode.hasQual()) { this.qual = this.scanNode.getQual(); this.qual.bind(null, inSchema); } cachedData = new ArrayList<>(); currentRow = 0; isClosed = false; projector = new Projector(context, inSchema, outSchema, scanNode.getTargets()); }
public void init(ScanNode scanNode, Path[] inputPaths) { tableDesc = scanNode.tableDesc; setInSchema(scanNode.getInSchema()); setOutSchema(scanNode.getOutSchema()); this.qual = scanNode.qual; this.targets = scanNode.targets; setInputPaths(inputPaths); if (scanNode.hasAlias()) { alias = scanNode.alias; } }
public void init(TableDesc desc, String alias) { this.tableDesc = desc; this.alias = alias; if (!CatalogUtil.isFQTableName(this.tableDesc.getName())) { throw new IllegalArgumentException("the name in TableDesc must be qualified, but it is \"" + desc.getName() + "\""); } String databaseName = CatalogUtil.extractQualifier(this.tableDesc.getName()); String qualifiedAlias = CatalogUtil.buildFQName(databaseName, alias); this.setInSchema(tableDesc.getSchema()); this.getInSchema().setQualifier(qualifiedAlias); this.setOutSchema(new Schema(getInSchema())); logicalSchema = SchemaUtil.getQualifiedLogicalSchema(tableDesc, qualifiedAlias); }
public void init(TableDesc desc, String alias) { this.tableDesc = desc; this.alias = alias; if (!IdentifierUtil.isFQTableName(this.tableDesc.getName())) { throw new IllegalArgumentException("the name in TableDesc must be qualified, but it is \"" + desc.getName() + "\""); } String databaseName = IdentifierUtil.extractQualifier(this.tableDesc.getName()); String qualifiedAlias = IdentifierUtil.buildFQName(databaseName, alias); this.setInSchema(tableDesc.getSchema()); this.getInSchema().setQualifier(qualifiedAlias); this.setOutSchema(SchemaBuilder.builder().addAll(getInSchema().getRootColumns()).build()); logicalSchema = SchemaUtil.getQualifiedLogicalSchema(tableDesc, qualifiedAlias); }
public SystemPhysicalExec(TaskAttemptContext context, ScanNode scanNode) { super(context, scanNode.getInSchema(), scanNode.getOutSchema()); this.scanNode = scanNode; if (this.scanNode.hasQual()) { this.qual = this.scanNode.getQual(); this.qual.bind(null, inSchema); } cachedData = TUtil.newList(); currentRow = 0; isClosed = false; projector = new Projector(context, inSchema, outSchema, scanNode.getTargets()); }
public SeqScanExec(TaskAttemptContext context, ScanNode plan, CatalogProtos.FragmentProto [] fragments) throws IOException { super(context, plan.getInSchema(), plan.getOutSchema()); this.plan = plan; this.qual = plan.getQual(); this.fragments = fragments; if (plan.getTableDesc().hasPartition() && plan.getTableDesc().getPartitionMethod().getPartitionType() == CatalogProtos.PartitionType.COLUMN) { rewriteColumnPartitionedTableSchema(); } }
public IndexScanNode(int pid, ScanNode scanNode , Schema keySchema , SimplePredicate[] predicates, URI indexPath) { this(pid); init(scanNode.getTableDesc()); setQual(scanNode.getQual()); setInSchema(scanNode.getInSchema()); setTargets(scanNode.getTargets()); this.set(keySchema, predicates, indexPath); }
public SeqScanExec(TaskAttemptContext context, ScanNode plan, CatalogProtos.FragmentProto [] fragments) throws IOException { super(context, plan.getInSchema(), plan.getOutSchema()); this.plan = plan; this.qual = plan.getQual(); this.fragments = fragments; if (plan.getTableDesc().hasPartition() && plan.getTableDesc().getPartitionMethod().getPartitionType() == CatalogProtos.PartitionType.COLUMN) { rewriteColumnPartitionedTableSchema(); } }
public IndexScanNode(int pid, ScanNode scanNode , Schema keySchema , SimplePredicate[] predicates, URI indexPath) { this(pid); init(scanNode.getTableDesc()); setQual(scanNode.getQual()); setInSchema(scanNode.getInSchema()); setTargets(scanNode.getTargets()); this.set(keySchema, predicates, indexPath); }
@Override public void init() throws IOException { // Why we should check nullity? See https://issues.apache.org/jira/browse/TAJO-1422 if (fragments == null) { scanIt = new EmptyScanIterator(); } else { Schema projectedFields = getProjectSchema( plan.getInSchema(), plan.getOutSchema(), Optional.ofNullable(plan.getTargets()), Optional.ofNullable(plan.getQual()) ); initScanner(projectedFields); // See Scanner.isProjectable() method. Depending on the result of isProjectable(), // the width of retrieved tuple is changed. // // If projectable, the retrieved tuple will contain only projected fields. // Otherwise, the retrieved tuple will contain projected fields and NullDatum // for non-projected fields. Schema actualInSchema = scanner.isProjectable() ? projectedFields : inSchema; initializeProjector(actualInSchema); if (plan.hasQual()) { qual.bind(context.getEvalContext(), actualInSchema); } initScanIterator(); } super.init(); }
@Override public PlanString getPlanString() { PlanString planStr = new PlanString(this).appendTitle(" on ").appendTitle(getTableName()); if (hasAlias()) { planStr.appendTitle(" as ").appendTitle(alias); } if (hasQual()) { planStr.addExplan("filter: ").appendExplain(this.qual.toString()); } if (hasTargets()) { planStr.addExplan("target list: ").appendExplain(StringUtils.join(targets, ", ")); } planStr.addDetail("out schema: ").appendDetail(getOutSchema().toString()); planStr.addDetail("in schema: ").appendDetail(getInSchema().toString()); return planStr; } }
@Override public PlanString getPlanString() { PlanString planStr = new PlanString(this).appendTitle(" on ").appendTitle(getTableName()); if (hasAlias()) { planStr.appendTitle(" as ").appendTitle(alias); } if (hasQual()) { planStr.addExplan("filter: ").appendExplain(this.qual.toString()); } if (hasTargets()) { planStr.addExplan("target list: "); boolean first = true; for (Target target : targets) { if (!first) { planStr.appendExplain(", "); } planStr.appendExplain(target.toString()); first = false; } } planStr.addDetail("out schema: ").appendDetail(getOutSchema().toString()); planStr.addDetail("in schema: ").appendDetail(getInSchema().toString()); return planStr; } }