@@ -1200,61 +1200,28 @@ public Promise<JsTable> snapshot(JsTable baseTable, @JsOptional Boolean doInitia
1200
1200
.then (state -> Promise .resolve (new JsTable (workerConnection , state )));
1201
1201
}
1202
1202
1203
+ // inheritDoc lets us implement the inherited method, but still keep docs for TS
1203
1204
/**
1204
- * @deprecated a promise that will be resolved with a newly created table holding the results of the join operation.
1205
- * The last parameter is optional, and if not specified or empty, all columns from the right table will
1206
- * be added to the output. Callers are responsible for ensuring that there are no duplicates - a match
1207
- * pair can be passed instead of a name to specify the new name for the column. Supported `joinType`
1208
- * values (consult Deephaven's "Joining Data from Multiple Tables for more detail): "Join" <a href=
1209
- * 'https://docs.deephaven.io/latest/Content/writeQueries/tableOperations/joins.htm#Joining_Data_from_Multiple_Tables'>Joining_Data_from_Multiple_Tables</a>
1210
- * "Natural" "AJ" "ReverseAJ" "ExactJoin" "LeftJoin"
1211
- * @param joinType
1212
- * @param rightTable
1213
- * @param columnsToMatch
1214
- * @param columnsToAdd
1215
- * @param asOfMatchRule
1216
- * @return Promise of dh.Table
1205
+ * @inheritDoc
1217
1206
*/
1218
1207
@ Override
1219
1208
@ JsMethod
1220
1209
@ Deprecated
1221
- public Promise <JsTable > join (Object joinType , JoinableTable rightTable , JsArray <String > columnsToMatch ,
1222
- @ JsOptional @ JsNullable JsArray <String > columnsToAdd , @ JsOptional @ JsNullable Object asOfMatchRule ) {
1223
- if (joinType .equals ("AJ" ) || joinType .equals ("RAJ" )) {
1224
- return asOfJoin (rightTable , columnsToMatch , columnsToAdd , ( String ) asOfMatchRule );
1225
- } else if (joinType .equals ("CROSS_JOIN" )) {
1210
+ public Promise <JsTable > join (String joinType , JoinableTable rightTable , JsArray <String > columnsToMatch ,
1211
+ @ JsOptional @ JsNullable JsArray <String > columnsToAdd , @ JsOptional @ JsNullable String asOfMatchRule ) {
1212
+ if (joinType .equals ("AJ" ) || joinType .equals ("RAJ" ) || joinType . equals ( "ReverseAJ" ) ) {
1213
+ return asOfJoin (rightTable , columnsToMatch , columnsToAdd , asOfMatchRule );
1214
+ } else if (joinType .equals ("CROSS_JOIN" ) || joinType . equals ( "Join" ) ) {
1226
1215
return crossJoin (rightTable , columnsToMatch , columnsToAdd , null );
1227
- } else if (joinType .equals ("EXACT_JOIN" )) {
1216
+ } else if (joinType .equals ("EXACT_JOIN" ) || joinType . equals ( "ExactJoin" ) ) {
1228
1217
return exactJoin (rightTable , columnsToMatch , columnsToAdd );
1229
- } else if (joinType .equals ("NATURAL_JOIN" )) {
1218
+ } else if (joinType .equals ("NATURAL_JOIN" ) || joinType . equals ( "Natural" ) ) {
1230
1219
return naturalJoin (rightTable , columnsToMatch , columnsToAdd );
1231
1220
} else {
1232
1221
throw new IllegalArgumentException ("Unsupported join type " + joinType );
1233
1222
}
1234
1223
}
1235
1224
1236
- /**
1237
- * a promise that will be resolved with the newly created table holding the results of the specified as-of join
1238
- * operation. The <b>columnsToAdd</b> parameter is optional, not specifying it will result in all columns from the
1239
- * right table being added to the output. The <b>asOfMatchRule</b> is optional, defaults to <b>LESS_THAN_EQUAL</b>
1240
- *
1241
- * <p>
1242
- * the allowed values are:
1243
- * </p>
1244
- *
1245
- * <ul>
1246
- * <li>LESS_THAN_EQUAL</li>
1247
- * <li>LESS_THAN</li>
1248
- * <li>GREATER_THAN_EQUAL</li>
1249
- * <li>GREATER_THAN</li>
1250
- * </ul>
1251
- *
1252
- * @param rightTable
1253
- * @param columnsToMatch
1254
- * @param columnsToAdd
1255
- * @param asOfMatchRule
1256
- * @return Promise og dh.Table
1257
- */
1258
1225
@ Override
1259
1226
@ JsMethod
1260
1227
public Promise <JsTable > asOfJoin (JoinableTable rightTable , JsArray <String > columnsToMatch ,
@@ -1280,23 +1247,10 @@ public Promise<JsTable> asOfJoin(JoinableTable rightTable, JsArray<String> colum
1280
1247
.then (state -> Promise .resolve (new JsTable (workerConnection , state )));
1281
1248
}
1282
1249
1283
- /**
1284
- * a promise that will be resolved with the newly created table holding the results of the specified cross join
1285
- * operation. The <b>columnsToAdd</b> parameter is optional, not specifying it will result in all columns from the
1286
- * right table being added to the output. The <b>reserveBits</b> optional parameter lets the client control how the
1287
- * key space is distributed between the rows in the two tables, see the Java <b>Table</b> class for details.
1288
- *
1289
- * @param rightTable
1290
- * @param columnsToMatch
1291
- * @param columnsToAdd
1292
- * @param reserve_bits
1293
- *
1294
- * @return Promise of dh.Table
1295
- */
1296
1250
@ Override
1297
1251
@ JsMethod
1298
1252
public Promise <JsTable > crossJoin (JoinableTable rightTable , JsArray <String > columnsToMatch ,
1299
- @ JsOptional JsArray <String > columnsToAdd , @ JsOptional Double reserve_bits ) {
1253
+ @ JsOptional @ JsNullable JsArray <String > columnsToAdd , @ JsOptional @ JsNullable Double reserveBits ) {
1300
1254
if (rightTable .state ().getConnection () != workerConnection ) {
1301
1255
throw new IllegalStateException (
1302
1256
"Table argument passed to join is not from the same worker as current table" );
@@ -1308,26 +1262,15 @@ public Promise<JsTable> crossJoin(JoinableTable rightTable, JsArray<String> colu
1308
1262
request .setResultId (state .getHandle ().makeTicket ());
1309
1263
request .setColumnsToMatchList (columnsToMatch );
1310
1264
request .setColumnsToAddList (columnsToAdd );
1311
- if (reserve_bits != null ) {
1312
- request .setReserveBits (reserve_bits );
1265
+ if (reserveBits != null ) {
1266
+ request .setReserveBits (reserveBits );
1313
1267
}
1314
1268
workerConnection .tableServiceClient ().crossJoinTables (request , metadata , c ::apply );
1315
- }, "join(" + rightTable + ", " + columnsToMatch + ", " + columnsToAdd + "," + reserve_bits + ")" )
1269
+ }, "join(" + rightTable + ", " + columnsToMatch + ", " + columnsToAdd + "," + reserveBits + ")" )
1316
1270
.refetch (this , workerConnection .metadata ())
1317
1271
.then (state -> Promise .resolve (new JsTable (workerConnection , state )));
1318
1272
}
1319
1273
1320
- /**
1321
- * a promise that will be resolved with the newly created table holding the results of the specified exact join
1322
- * operation. The `columnsToAdd` parameter is optional, not specifying it will result in all columns from the right
1323
- * table being added to the output.
1324
- *
1325
- * @param rightTable
1326
- * @param columnsToMatch
1327
- * @param columnsToAdd
1328
- *
1329
- * @return Promise of dh.Table
1330
- */
1331
1274
@ Override
1332
1275
@ JsMethod
1333
1276
public Promise <JsTable > exactJoin (JoinableTable rightTable , JsArray <String > columnsToMatch ,
@@ -1349,17 +1292,6 @@ public Promise<JsTable> exactJoin(JoinableTable rightTable, JsArray<String> colu
1349
1292
.then (state -> Promise .resolve (new JsTable (workerConnection , state )));
1350
1293
}
1351
1294
1352
- /**
1353
- * a promise that will be resolved with the newly created table holding the results of the specified natural join
1354
- * operation. The <b>columnsToAdd</b> parameter is optional, not specifying it will result in all columns from the
1355
- * right table being added to the output.
1356
- *
1357
- * @param rightTable
1358
- * @param columnsToMatch
1359
- * @param columnsToAdd
1360
- *
1361
- * @return Promise of dh.Table
1362
- */
1363
1295
@ Override
1364
1296
@ JsMethod
1365
1297
public Promise <JsTable > naturalJoin (JoinableTable rightTable , JsArray <String > columnsToMatch ,
0 commit comments