@Test public void testGetTableInfo() { MockMapperUDTF udtf = new MockMapperUDTF(conf, testData); TableInfoBuilder builder = TableInfo.builder().projectName("foo").tableName("bar"); assertEquals(builder.build(), udtf.getTableInfo(InputUtils.getTables(conf), "foo.bar")); assertEquals(builder.build(), udtf.getTableInfo(InputUtils.getTables(conf), "foo.bar/ds=19970701/hr=19;foo.bar/ds=19970701/hr=20")); builder.partSpec("ds=19970701/hr=19"); assertEquals(builder.build(), udtf.getTableInfo(InputUtils.getTables(conf), "foo.bar/ds=19970701/hr=19")); }
TableInfo getTableInfo(TableInfo[] inputs, String inputSpec) { TableInfo info = getTableInfoFromDesc(inputSpec); for (TableInfo input : inputs) { if (MapReduceUtils.partSpecInclusive(input, info)) { TableInfo tmpInfo = new TableInfo(input); tmpInfo.setPartSpec(info.getPartSpec()); info = tmpInfo; } } return info; }
LotMapperUDTF extends LotTaskUDTF { TableInfo getTableInfo(TableInfo[] inputs, String inputSpec) { TableInfo info = getTableInfoFromDesc(inputSpec); for (TableInfo input : inputs) { if (MapReduceUtils.partSpecInclusive(input, info)) { TableInfo tmpInfo = new TableInfo(input); tmpInfo.setPartSpec(info.getPartSpec()); info = tmpInfo; } } return info; } }
LotMapperUDTF extends LotTaskUDTF { TableInfo getTableInfo(TableInfo[] inputs, String inputSpec) { TableInfo info = getTableInfoFromDesc(inputSpec); for (TableInfo input : inputs) { if (MapReduceUtils.partSpecInclusive(input, info)) { TableInfo tmpInfo = new TableInfo(input); tmpInfo.setPartSpec(info.getPartSpec()); info = tmpInfo; } } return info; } LotMapperUDTF();  LotMapperUDTF(String functionName); }
LotMapperUDTF extends LotTaskUDTF { TableInfo getTableInfo(TableInfo[] inputs, String inputSpec) { TableInfo info = getTableInfoFromDesc(inputSpec); for (TableInfo input : inputs) { if (MapReduceUtils.partSpecInclusive(input, info)) { TableInfo tmpInfo = new TableInfo(input); tmpInfo.setPartSpec(info.getPartSpec()); info = tmpInfo; } } return info; } LotMapperUDTF();  LotMapperUDTF(String functionName); @SuppressWarnings("deprecation") @Override com.aliyun.odps.udf.OdpsType[] resolve(com.aliyun.odps.udf.OdpsType[] sig); @SuppressWarnings("deprecation") @Override com.aliyun.odps.type.TypeInfo[] resolve(com.aliyun.odps.type.TypeInfo[] sig); @Override void setup(ExecutionContext context); @Override void close(); void run(); Object[] getNextRowWapper(); }
LotMapperUDTF extends LotTaskUDTF { TableInfo getTableInfo(TableInfo[] inputs, String inputSpec) { TableInfo info = getTableInfoFromDesc(inputSpec); for (TableInfo input : inputs) { if (MapReduceUtils.partSpecInclusive(input, info)) { TableInfo tmpInfo = new TableInfo(input); tmpInfo.setPartSpec(info.getPartSpec()); info = tmpInfo; } } return info; } LotMapperUDTF();  LotMapperUDTF(String functionName); @SuppressWarnings("deprecation") @Override com.aliyun.odps.udf.OdpsType[] resolve(com.aliyun.odps.udf.OdpsType[] sig); @SuppressWarnings("deprecation") @Override com.aliyun.odps.type.TypeInfo[] resolve(com.aliyun.odps.type.TypeInfo[] sig); @Override void setup(ExecutionContext context); @Override void close(); void run(); Object[] getNextRowWapper();  }