@@ -135,12 +135,13 @@ public void checkArgumentBeforeExec() throws Exception {
135
135
throw new IllegalArgumentException ("table name is null" );
136
136
} else if (tableQuery .isFTSQuery ()) {
137
137
if (!ObGlobal .isFtsQuerySupport ()) {
138
- throw new FeatureNotSupportedException ("full text query is not supported in " +ObGlobal .obVsnString ());
138
+ throw new FeatureNotSupportedException ("full text query is not supported in "
139
+ + ObGlobal .obVsnString ());
139
140
}
140
141
if (tableQuery .getIndexName () == null || tableQuery .getIndexName ().isEmpty ()
141
- || tableQuery .getIndexName ().equalsIgnoreCase ("primary" )) {
142
+ || tableQuery .getIndexName ().equalsIgnoreCase ("primary" )) {
142
143
throw new IllegalArgumentException (
143
- "use fulltext search but specified index name is not fulltext index" );
144
+ "use fulltext search but specified index name is not fulltext index" );
144
145
}
145
146
}
146
147
}
@@ -178,15 +179,16 @@ private AbstractQueryStreamResult commonExecute(InitQueryResultCallback<Abstract
178
179
if (obTableClient .isOdpMode ()) {
179
180
if (tableQuery .getScanRangeColumns ().isEmpty ()) {
180
181
if (tableQuery .getIndexName () != null
181
- && !tableQuery .getIndexName ().equalsIgnoreCase ("primary" ) && !tableQuery .isFTSQuery ()) {
182
+ && !tableQuery .getIndexName ().equalsIgnoreCase ("primary" )
183
+ && !tableQuery .isFTSQuery ()) {
182
184
throw new ObTableException ("key range columns must be specified when use index" );
183
185
}
184
186
}
185
- if (entityType != ObTableEntityType .HKV &&
186
- getPartId () != null && tableQuery .getIndexName () == null ) {
187
+ if (entityType != ObTableEntityType .HKV && getPartId () != null
188
+ && tableQuery .getIndexName () == null ) {
187
189
try {
188
190
ObPair <Long , ObTableParam > odpTable = obTableClient .getODPTableWithPartId (
189
- tableName , getPartId (), false );
191
+ tableName , getPartId (), false );
190
192
partitionObTables .put (odpTable .getLeft (), odpTable );
191
193
} catch (Exception e ) {
192
194
if (e instanceof ObTableException ) {
@@ -208,7 +210,7 @@ private AbstractQueryStreamResult commonExecute(InitQueryResultCallback<Abstract
208
210
}
209
211
} else {
210
212
partitionObTables .put (0L , new ObPair <Long , ObTableParam >(0L , new ObTableParam (
211
- obTableClient .getOdpTable ())));
213
+ obTableClient .getOdpTable ())));
212
214
}
213
215
} else {
214
216
if (getPartId () == null ) {
@@ -222,12 +224,15 @@ private AbstractQueryStreamResult commonExecute(InitQueryResultCallback<Abstract
222
224
false );
223
225
}
224
226
try {
225
- ObPair <Long , ObTableParam > table = obTableClient .getTableWithPartId (indexTableName , getPartId (),
226
- false , false , false , obTableClient .getRoute (false ));
227
+ ObPair <Long , ObTableParam > table = obTableClient .getTableWithPartId (
228
+ indexTableName , getPartId (), false , false , false ,
229
+ obTableClient .getRoute (false ));
227
230
partitionObTables .put (table .getLeft (), table );
228
231
} catch (ObTableNotExistException e ) {
229
- if (this .entityType == ObTableEntityType .HKV && obTableClient .isTableGroupName (tableName )) {
230
- indexTableName = obTableClient .tryGetTableNameFromTableGroupCache (tableName , true );
232
+ if (this .entityType == ObTableEntityType .HKV
233
+ && obTableClient .isTableGroupName (tableName )) {
234
+ indexTableName = obTableClient .tryGetTableNameFromTableGroupCache (
235
+ tableName , true );
231
236
ObPair <Long , ObTableParam > table = obTableClient .getTableWithPartId (
232
237
indexTableName , getPartId (), false , false , false ,
233
238
obTableClient .getRoute (false ));
@@ -337,11 +342,10 @@ public Map<Long, ObPair<Long, ObTableParam>> initPartitions(ObTableQuery tableQu
337
342
indexTableName = obTableClient .tryGetTableNameFromTableGroupCache (tableName , true );
338
343
pairs = this .obTableClient .getTables (indexTableName , tableQuery , start ,
339
344
borderFlag .isInclusiveStart (), end , borderFlag .isInclusiveEnd (), false , false );
345
+ } else {
346
+ throw e ;
340
347
}
341
348
}
342
- if (pairs == null ) {
343
- throw new ObTableUnexpectedException ("Query meets exception, pairs is null, tableName: " + tableName );
344
- }
345
349
if (tableQuery .getScanOrder () == ObScanOrder .Reverse ) {
346
350
for (int i = pairs .size () - 1 ; i >= 0 ; i --) {
347
351
partitionObTables .put (pairs .get (i ).getLeft (), pairs .get (i ));
0 commit comments