Fetch fully qualified name for 'col_path' by converting it into non-canonical table path.
| 549 | // Fetch fully qualified name for 'col_path' by converting it into non-canonical |
| 550 | // table path. |
| 551 | string PrintColPath(const HdfsTableDescriptor& hdfs_table, const SchemaPath& col_path, |
| 552 | const unique_ptr<OrcSchemaResolver>& schema_resolver) { |
| 553 | SchemaPath table_col_path, file_col_path; |
| 554 | if (col_path.size() > 0) { |
| 555 | DCHECK(schema_resolver != nullptr); |
| 556 | // Convert 'col_path' to non-canonical table path 'table_col_path'. |
| 557 | schema_resolver->TranslateColPaths(col_path, &table_col_path, &file_col_path); |
| 558 | auto it = table_col_path.begin(); |
| 559 | // remove initial -1s from the table_col_path |
| 560 | // -1 is present to represent some of the constructs in ACID table which are not |
| 561 | // present in table schema |
| 562 | while (it != table_col_path.end()) { |
| 563 | if (*it == -1) { |
| 564 | it = table_col_path.erase(it); |
| 565 | } else { |
| 566 | break; |
| 567 | } |
| 568 | } |
| 569 | } |
| 570 | |
| 571 | return PrintPath(hdfs_table, table_col_path); |
| 572 | } |
| 573 | |
| 574 | Status HdfsOrcScanner::ResolveColumns(const TupleDescriptor& tuple_desc, |
| 575 | list<const orc::Type*>* selected_nodes, stack<const SlotDescriptor*>* pos_slots) { |