public org.apache.thrift.TBase<org.apache.carbondata.format.TableInfo, org.apache.carbondata.format.TableInfo._Fields> create() { return new org.apache.carbondata.format.TableInfo(); } };
public TableInfo deepCopy() { return new TableInfo(this); }
@Override public org.apache.carbondata.format.TableInfo fromWrapperToExternalTableInfo( TableInfo wrapperTableInfo, String dbName, String tableName) { org.apache.carbondata.format.TableSchema thriftFactTable = fromWrapperToExternalTableSchema(wrapperTableInfo.getFactTable()); org.apache.carbondata.format.TableInfo tableInfo = new org.apache.carbondata.format.TableInfo(thriftFactTable, new ArrayList<org.apache.carbondata.format.TableSchema>()); List<DataMapSchema> wrapperChildSchemaList = wrapperTableInfo.getDataMapSchemaList(); if (null != wrapperChildSchemaList) { List<org.apache.carbondata.format.DataMapSchema> thriftChildSchemas = fromWrapperToExternalChildSchemaList(wrapperChildSchemaList); tableInfo.setDataMapSchemas(thriftChildSchemas); } return tableInfo; }
thriftWrapperSchemaConverter.fromWrapperToExternalTableSchema(tableSchema); org.apache.carbondata.format.TableInfo tableInfo = new org.apache.carbondata.format.TableInfo(thriftFactTable, new ArrayList<org.apache.carbondata.format.TableSchema>());
/** * This method will prepare dummy tableInfo * * @param carbonDataFilePath * @param tableName * @return */ public static TableInfo buildDummyTableInfo(String carbonDataFilePath, String tableName, String dbName) { // During SDK carbon Reader, This method will be called. // This API will avoid IO operation to get the columnSchema list. // ColumnSchema list will be filled during blocklet loading (where actual IO happens) List<ColumnSchema> columnSchemaList = new ArrayList<>(); TableSchema tableSchema = getDummyTableSchema(tableName,columnSchemaList); ThriftWrapperSchemaConverterImpl thriftWrapperSchemaConverter = new ThriftWrapperSchemaConverterImpl(); org.apache.carbondata.format.TableSchema thriftFactTable = thriftWrapperSchemaConverter.fromWrapperToExternalTableSchema(tableSchema); org.apache.carbondata.format.TableInfo tableInfo = new org.apache.carbondata.format.TableInfo(thriftFactTable, new ArrayList<org.apache.carbondata.format.TableSchema>()); tableInfo.setDataMapSchemas(null); SchemaConverter schemaConverter = new ThriftWrapperSchemaConverterImpl(); TableInfo wrapperTableInfo = schemaConverter.fromExternalToWrapperTableInfo( tableInfo, dbName, tableName, carbonDataFilePath); wrapperTableInfo.setTransactionalTable(false); return wrapperTableInfo; }
thriftWrapperSchemaConverter.fromWrapperToExternalTableSchema(tableSchema); org.apache.carbondata.format.TableInfo tableInfo = new org.apache.carbondata.format.TableInfo(thriftFactTable, new ArrayList<org.apache.carbondata.format.TableSchema>());