id
stringlengths
29
30
content
stringlengths
152
2.6k
codereview_new_java_data_14781
public TiDAGRequest buildTiDAGReq( TiKVScanPlan plan = buildIndexScan(columnList, conditions, index, table, tableStatistics, false); if (plan.getCost() < minIndexCost) { - minIndexPlan = plan; minIndexCost = plan.getCost(); ...
codereview_new_java_data_14782
public TiDAGRequest buildTiDAGReq( && dagRequest.getEncodeType() == EncodeType.TypeCHBlock) { dagRequest.setEncodeType(EncodeType.TypeChunk); } - // Set DAG Request's store type as minPlan's store type. dagRequest.setStoreType(minPlanStoreType); dagRequest.addRanges(minCostPlan.getK...
codereview_new_java_data_14783
// TODO: more refactoring on the way public class ClusterIndexScanKeyRangeBuilder extends KeyRangeBuilder { - private final long id; - public ClusterIndexScanKeyRangeBuilder(long id, IndexRange ir) { super(ir); - this.id = id; } private KeyRange toPairKey() { Key lbsKey = Key.toRawKey(lPoi...
codereview_new_java_data_14784
public static RowKey decode(byte[] value) { } public static byte[] encode(long tableId, Handle handle) { - CodecDataOutput cdo = new CodecDataOutput(); - encodePrefix(cdo, tableId); - cdo.write(handle.encoded()); - return cdo.toBytes(); } public static byte[] encode(long tableId, byte[] key...
codereview_new_java_data_14785
public List<TiIndexColumn> convertIndexColToPrefixCols(TiIndexInfo indexInfo) { for (TiIndexColumn tiIndexColumn : tiIndexColumns) { /** * We need to consider the prefix index. For example: when we have 'a varchar(50), index - * idx(a(10))' So we will get 'columnInfo.getLength() = 50' and - ...
codereview_new_java_data_14786
public TiIndexInfo( this.isInvisible = isInvisible; } public static TiIndexInfo genClusterIndex(TiTableInfo table) { if (table.isPkHandle() || table.isCommonHandle()) { ImmutableList<TiIndexColumn> columns; if (table.isPkHandle()) { TiColumnInfo pkColumn = table.getPKIsHandleCo...
codereview_new_java_data_14787
public TiIndexInfo( this.isInvisible = isInvisible; } public static TiIndexInfo genClusterIndex(TiTableInfo table) { if (table.isPkHandle() || table.isCommonHandle()) { ImmutableList<TiIndexColumn> columns; if (table.isPkHandle()) { TiColumnInfo pkColumn = table.getPKIsHandleCo...
codereview_new_java_data_14788
public TiIndexInfo( this.isInvisible = isInvisible; } public static TiIndexInfo genClusterIndex(TiTableInfo table) { if (table.isPkHandle() || table.isCommonHandle()) { ImmutableList<TiIndexColumn> columns; if (table.isPkHandle()) { TiColumnInfo pkColumn = table.getPKIsHandleCo...
codereview_new_java_data_14789
public static TiSession getInstance(TiConfiguration conf) { } // if NewCollationEnabled is not set in configuration file, - // we will set it to true when TiDB version is greater than or equal to v6.0.0. // Otherwise, we will set it to false private void refreshNewCollationEnabled() { if (!conf.ge...