Skip to content

Conversation

bchapuis
Copy link
Member

No description provided.

// Initialize the type factory
Properties props = new Properties();
props.setProperty(CalciteConnectionProperty.CASE_SENSITIVE.camelName(), "false");
CalciteConnectionConfig config = new CalciteConnectionConfigImpl(props);

Check notice

Code scanning / CodeQL

Unread local variable Note test

Variable 'CalciteConnectionConfig config' is never read.

Copilot Autofix

AI 6 months ago

To fix the issue, the unused variable config should be removed. The assignment of props to config on line 78 can be safely deleted, as props is directly used in the subsequent code. This will eliminate the "unread local variable" error without altering the functionality of the code.


Suggested changeset 1
baremaps-calcite/src/test/java/org/apache/baremaps/calcite/data/DataSchemaTest.java

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/baremaps-calcite/src/test/java/org/apache/baremaps/calcite/data/DataSchemaTest.java b/baremaps-calcite/src/test/java/org/apache/baremaps/calcite/data/DataSchemaTest.java
--- a/baremaps-calcite/src/test/java/org/apache/baremaps/calcite/data/DataSchemaTest.java
+++ b/baremaps-calcite/src/test/java/org/apache/baremaps/calcite/data/DataSchemaTest.java
@@ -77,3 +77,2 @@
     props.setProperty(CalciteConnectionProperty.CASE_SENSITIVE.camelName(), "false");
-    CalciteConnectionConfig config = new CalciteConnectionConfigImpl(props);
 
EOF
@@ -77,3 +77,2 @@
props.setProperty(CalciteConnectionProperty.CASE_SENSITIVE.camelName(), "false");
CalciteConnectionConfig config = new CalciteConnectionConfigImpl(props);

Copilot is powered by AI and may make mistakes. Always verify output.
Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

@bchapuis bchapuis force-pushed the calcite-schema-ddl branch from 14e651e to dc8a684 Compare April 19, 2025 19:33
@bchapuis bchapuis force-pushed the calcite-schema-ddl branch from dc8a684 to eec70db Compare April 19, 2025 19:42
@bchapuis bchapuis force-pushed the calcite-schema-ddl branch from e469e6b to 18454ff Compare April 28, 2025 08:21
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
6 Security Hotspots
6.2% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@bchapuis bchapuis merged commit 046a5e6 into main Apr 28, 2025
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant