@@ -12001,6 +12001,8 @@ private Operator genTablePlan(String alias, QB qb) throws SemanticException {
1200112001 // Determine row schema for TSOP.
1200212002 // Include column names from SerDe, the partition and virtual columns.
1200312003 rwsch = new RowResolver();
12004+ Set<String> partCols = tab.hasNonNativePartitionSupport() ?
12005+ Sets.newHashSet(tab.getPartColNames()) : Collections.emptySet();
1200412006 try {
1200512007 // Including parameters passed in the query
1200612008 if (properties != null) {
@@ -12018,8 +12020,6 @@ private Operator genTablePlan(String alias, QB qb) throws SemanticException {
1201812020 deserializer.handleJobLevelConfiguration(conf);
1201912021 List<? extends StructField> fields = rowObjectInspector
1202012022 .getAllStructFieldRefs();
12021- Set<String> partCols = tab.hasNonNativePartitionSupport() ?
12022- Sets.newHashSet(tab.getPartColNames()) : Collections.emptySet();
1202312023 for (int i = 0; i < fields.size(); i++) {
1202412024 /**
1202512025 * if the column is a skewed column, use ColumnInfo accordingly
@@ -12039,6 +12039,9 @@ private Operator genTablePlan(String alias, QB qb) throws SemanticException {
1203912039 // Hack!! - refactor once the metadata APIs with types are ready
1204012040 // Finally add the partitioning columns
1204112041 for (FieldSchema part_col : tab.getPartCols()) {
12042+ if(partCols.contains(part_col.getName())){
12043+ break;
12044+ }
1204212045 LOG.trace("Adding partition col: " + part_col);
1204312046 rwsch.put(alias, part_col.getName(), new ColumnInfo(part_col.getName(),
1204412047 TypeInfoFactory.getPrimitiveTypeInfo(part_col.getType()), alias, true));
0 commit comments