public void setExternal(boolean isExternal) { if (TYPE.TABLE.equals(getDescType())) { createTblDesc.setExternal(isExternal); } }
public String getInputFormat() { switch (getDescType()) { case TABLE: return createTblDesc.getInputFormat(); case VIEW: return createViewDesc.getInputFormat(); } return null; }
public String getSerName() { switch (getDescType()) { case TABLE: return createTblDesc.getSerName(); case VIEW: return createViewDesc.getSerde(); } return null; }
public void setReplicationSpec(ReplicationSpec replSpec) { switch (getDescType()) { case TABLE: createTblDesc.setReplicationSpec(replSpec); break; case VIEW: createViewDesc.setReplicationSpec(replSpec); break; } }
public void setLocation(String location) { switch (getDescType()) { case TABLE: createTblDesc.setLocation(location); break; case VIEW: createViewDesc.setLocation(location); break; } }
public List<String> getBucketCols() { if (TYPE.TABLE.equals(getDescType())) { return createTblDesc.getBucketCols(); } return null; }
/** * @param replaceMode Determine if this CreateTable should behave like a replace-into alter instead */ public void setReplaceMode(boolean replaceMode) { switch (getDescType()) { case TABLE: createTblDesc.setReplaceMode(replaceMode); break; case VIEW: createViewDesc.setReplace(replaceMode); } }
public List<FieldSchema> getPartCols() { switch (getDescType()) { case TABLE: return createTblDesc.getPartCols(); case VIEW: return createViewDesc.getPartCols(); } return null; }
public Map<String, String> getTblProps() { switch (getDescType()) { case TABLE: return createTblDesc.getTblProps(); case VIEW: return createViewDesc.getTblProps(); } return null; }
public String getOutputFormat() { switch (getDescType()) { case TABLE: return createTblDesc.getOutputFormat(); case VIEW: return createViewDesc.getOutputFormat(); } return null; }
public List<Order> getSortCols() { if (TYPE.TABLE.equals(getDescType())) { return createTblDesc.getSortCols(); } return null; }
public boolean isExternal() { if (TYPE.TABLE.equals(getDescType())) { return createTblDesc.isExternal(); } return false; }
public String getLocation() { switch (getDescType()) { case TABLE: return createTblDesc.getLocation(); case VIEW: return createViewDesc.getLocation(); } return null; }
public List<FieldSchema> getCols() { switch (getDescType()) { case TABLE: return createTblDesc.getCols(); case VIEW: return createViewDesc.getSchema(); } return null; }
public Map<String, String> getSerdeProps() { switch (getDescType()) { case TABLE: return createTblDesc.getSerdeProps(); case VIEW: return createViewDesc.getSerdeProps(); } return null; }
public Table toTable(HiveConf conf) throws Exception { switch (getDescType()) { case TABLE: return createTblDesc.toTable(conf); case VIEW: return createViewDesc.toTable(conf); default: return null; } }
public void setTableName(String tableName) throws SemanticException { switch (getDescType()) { case TABLE: createTblDesc.setTableName(tableName); break; case VIEW: String[] qualViewName = { dbName, tableName }; String dbDotView = BaseSemanticAnalyzer.getDotName(qualViewName); createViewDesc.setViewName(dbDotView); break; } }
public String getTableName() throws SemanticException { switch (getDescType()) { case TABLE: return createTblDesc.getTableName(); case VIEW: String dbDotView = createViewDesc.getViewName(); String[] names = Utilities.getDbTableName(dbDotView); return names[1]; // names[0] have the Db name and names[1] have the view name } return null; }
public Task<? extends Serializable> getCreateTableTask(HashSet<ReadEntity> inputs, HashSet<WriteEntity> outputs, HiveConf conf) { switch (getDescType()) { case TABLE: return TaskFactory.get(new DDLWork(inputs, outputs, createTblDesc), conf); case VIEW: return TaskFactory.get(new DDLWork(inputs, outputs, createViewDesc), conf); } return null; }
this.table = table; switch (getDescType()) { case TABLE: this.createTblDesc = new CreateTableDesc(dbName,