Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hbase uppercase table #2019

Merged
merged 11 commits into from
Jun 26, 2024
Prev Previous commit
Next Next commit
remove extra caseInsensitiveSearches
  • Loading branch information
aimethed committed Jun 14, 2024
commit 252e1e1348192934149aeae779d9d4545ae2fe96
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ public ListTablesResponse doListTables(BlockAllocator blockAllocator, ListTables
for (int i = 0; i < tables.length; i++) {
TableName tableName = tables[i];
tableNames.add(new com.amazonaws.athena.connector.lambda.domain.TableName(request.getSchemaName(),
tableName.getNameAsString().toLowerCase(Locale.ENGLISH).replace(request.getSchemaName() + ":", "")));
tableName.getNameAsString().replace(request.getSchemaName() + ":", "")));
}
return new ListTablesResponse(request.getCatalogName(), tableNames, null);
}
Expand Down Expand Up @@ -289,7 +289,7 @@ public GetSplitsResponse doGetSplits(BlockAllocator blockAllocator, GetSplitsReq
Set<Split> splits = new HashSet<>();

//We can read each region in parallel
for (HRegionInfo info : getOrCreateConn(request).getTableRegions(HbaseTableNameUtils.getHbaseTableName(getOrCreateConn(request), request.getTableName()))) {
for (HRegionInfo info : getOrCreateConn(request).getTableRegions(HbaseTableNameUtils.getQualifiedTable(request.getTableName()))) {
Split.Builder splitBuilder = Split.newBuilder(makeSpillLocation(request), makeEncryptionKey())
.add(HBASE_CONN_STR, getConnStr(request))
.add(START_KEY_FIELD, new String(info.getStartKey()))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ protected void readWithConstraint(BlockSpiller blockSpiller, ReadRecordsRequest
addToProjection(scan, next);
}

getOrCreateConn(conStr).scanTable(HbaseTableNameUtils.getHbaseTableName(getOrCreateConn(conStr), tableNameObj),
getOrCreateConn(conStr).scanTable(HbaseTableNameUtils.getQualifiedTable(tableNameObj),
scan,
(ResultScanner scanner) -> scanFilterProject(scanner, request, blockSpiller, queryStatusChecker));
}
Expand Down