Skip to content

Upstream: 12a315edc194896617aafd50d8ea3c6674a89ea7#748

Merged
kgyrtkirk merged 4 commits intomasterfrom
up-12a315edc194896617aafd50d8ea3c6674a89ea7
Apr 1, 2025
Merged

Upstream: 12a315edc194896617aafd50d8ea3c6674a89ea7#748
kgyrtkirk merged 4 commits intomasterfrom
up-12a315edc194896617aafd50d8ea3c6674a89ea7

Conversation

@kgyrtkirk
Copy link
Copy Markdown
Owner

No description provided.

ektravel and others added 4 commits March 25, 2025 11:53
* Update StringUtils.replace() after fix in JDK9

* Upgrade optimized string replace algorithm

* Update methods by re-using declared StringUtils#replace method

* Replace hard-coded UTF-8 encodings with StandardCharsets
…tionals; cleanup framework init (apache#17829)

* cleans up `SqlTestFramework` initialization to leave the `OverrideModule` empty - so that tests could more easily take over parts
* remove the `QueryComponentSupplier#createEngine`  factory method - instead uses a `Class<SqlEngine>` and use the `injector` to initialize it
* enables the usage of `!disabled <supplier> <message>` - to mark cases which are not yet supported with a specific configuration for some reason
* fixes that `datasets` was not respecting the `rollup` specification of the ingest
* enables to use `MultiComponentSupplier` backed tests - these will turn into matrix tests over multiple componentsuppliers - enabling running the same testcase in different scenarios
}

default Set<String> getTableNames()
default Set<String> getTableNames(BrokerSegmentMetadataCache segmentMetadataCache)

Check notice

Code scanning / CodeQL

Useless parameter Note

The parameter 'segmentMetadataCache' is never used.

Copilot Autofix

AI about 1 year ago

To fix the problem, we need to remove the unused parameter segmentMetadataCache from the getTableNames method. This involves updating the method signature to exclude the parameter and ensuring that any calls to this method are also updated accordingly. Since we are only provided with the interface definition, we will update the method signature in the interface.

Suggested changeset 1
sql/src/main/java/org/apache/druid/sql/calcite/schema/DruidSchemaManager.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/sql/src/main/java/org/apache/druid/sql/calcite/schema/DruidSchemaManager.java b/sql/src/main/java/org/apache/druid/sql/calcite/schema/DruidSchemaManager.java
--- a/sql/src/main/java/org/apache/druid/sql/calcite/schema/DruidSchemaManager.java
+++ b/sql/src/main/java/org/apache/druid/sql/calcite/schema/DruidSchemaManager.java
@@ -62,3 +62,3 @@
 
-  default Set<String> getTableNames(BrokerSegmentMetadataCache segmentMetadataCache)
+  default Set<String> getTableNames()
   {
EOF
@@ -62,3 +62,3 @@

default Set<String> getTableNames(BrokerSegmentMetadataCache segmentMetadataCache)
default Set<String> getTableNames()
{
Copilot is powered by AI and may make mistakes. Always verify output.
}

@SuppressWarnings("unused")
protected void validateFrameworkConfig(SqlTestFrameworkConfig cfg)

Check notice

Code scanning / CodeQL

Useless parameter Note test

The parameter 'cfg' is never used.

Copilot Autofix

AI about 1 year ago

To fix the problem, we should remove the unused parameter cfg from the validateFrameworkConfig method. This will simplify the method's interface and eliminate the unnecessary parameter. The method will remain a no-op, as it currently does not perform any actions.

  • Remove the SqlTestFrameworkConfig cfg parameter from the validateFrameworkConfig method.
  • Update the method signature to reflect the removal of the parameter.
Suggested changeset 1
sql/src/test/java/org/apache/druid/quidem/DruidQuidemTestBase.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/sql/src/test/java/org/apache/druid/quidem/DruidQuidemTestBase.java b/sql/src/test/java/org/apache/druid/quidem/DruidQuidemTestBase.java
--- a/sql/src/test/java/org/apache/druid/quidem/DruidQuidemTestBase.java
+++ b/sql/src/test/java/org/apache/druid/quidem/DruidQuidemTestBase.java
@@ -208,3 +208,3 @@
   @SuppressWarnings("unused")
-  protected void validateFrameworkConfig(SqlTestFrameworkConfig cfg)
+  protected void validateFrameworkConfig()
   {
EOF
@@ -208,3 +208,3 @@
@SuppressWarnings("unused")
protected void validateFrameworkConfig(SqlTestFrameworkConfig cfg)
protected void validateFrameworkConfig()
{
Copilot is powered by AI and may make mistakes. Always verify output.
@kgyrtkirk kgyrtkirk merged commit 12a315e into master Apr 1, 2025
75 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants