Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/test_head.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,14 @@ jobs:
java-version: '17'
distribution: 'temurin'
architecture: x64
- name: Build
run: |
mvn --also-make --batch-mode --no-transfer-progress --projects ${{ matrix.project }} -Dmaven.javadoc.skip=true -DskipTests=true clean install
Comment thread
chernser marked this conversation as resolved.
- name: Test Java client
env:
TEST_CLICKHOUSE_IMAGE_VERSION: ${{ env.CH_VERSION }}
run: |
mvn --also-make --batch-mode --no-transfer-progress --projects ${{ matrix.project }} -Dmaven.javadoc.skip=true clean install
mvn --batch-mode --no-transfer-progress --projects ${{ matrix.project }} -Dmaven.javadoc.skip=true clean install
- name: Upload test results
uses: actions/upload-artifact@v4
if: failure()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1033,10 +1033,14 @@ private ResultSet getTablesImpl(String schemaPattern, String tableNamePattern, S
filterConditions.add("(t.is_temporary = 1)");
}

String engineFilter = filterConditions.isEmpty() ? "" : " AND ( " + String.join(" OR ", filterConditions) + ")";
List<String> tableConditions = new ArrayList<>();
tableConditions.add("t.name LIKE ?");
if (!filterConditions.isEmpty()) {
tableConditions.add("(" + String.join(" OR ", filterConditions) + ")");
}
// Exclude temporary tables when not requested (they would otherwise match engine-based conditions)
if (!requestedTypes.contains(TableType.TEMPORARY_TABLE.getTypeName())) {
engineFilter += " AND (t.is_temporary = 0)";
tableConditions.add("t.is_temporary = 0");
}

String sql = "SELECT " +
Expand All @@ -1053,8 +1057,7 @@ private ResultSet getTablesImpl(String schemaPattern, String tableNamePattern, S
" FROM system.tables t" +
" JOIN system.databases d ON system.tables.database = system.databases.name" +
" WHERE t.database LIKE ?" +
" AND t.name LIKE ?"
+ engineFilter;
" AND (" + String.join(" AND ", tableConditions) + ")";

try (PreparedStatement stmt = prepareStatement(sql)) {
stmt.setString(1, (schemaPattern == null ? "%" : schemaPattern));
Expand Down
Loading