-
Notifications
You must be signed in to change notification settings - Fork 169
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
chore: Fix warnings in both compiler and test environments #164
Conversation
@@ -517,6 +517,7 @@ public void close() throws IOException { | |||
} | |||
} | |||
|
|||
@SuppressWarnings("deprecation") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FileSystem.getAllStatistics
is deprecated.
@@ -99,6 +99,7 @@ const LOG_PATTERN: &str = "{d(%y/%m/%d %H:%M:%S)} {l} {f}: {m}{n}"; | |||
// Creates a default log4rs config, which logs to console with `INFO` level. | |||
fn default_logger_config() -> CometResult<Config> { | |||
let console_append = ConsoleAppender::builder() | |||
.target(Target::Stderr) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Logging to stderr, so that surefire will not complain about: Corrupted channel by directly writing to native stream in forked JVM
.
@@ -711,9 +711,9 @@ under the License. | |||
<artifactId>maven-surefire-plugin</artifactId> | |||
<version>3.1.0</version> | |||
<configuration> | |||
<systemProperties> | |||
<systemPropertyVariables> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
systemProperties
is deprecated.
@@ -115,7 +115,7 @@ class CometSparkSessionExtensions | |||
// data source V1 | |||
case scanExec @ FileSourceScanExec( | |||
HadoopFsRelation(_, partitionSchema, _, _, _: ParquetFileFormat, _), | |||
_: Seq[AttributeReference], | |||
_: Seq[_], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
type erasure.
_: StringType, | ||
"readSidePadding", | ||
arguments, | ||
_, | ||
true, | ||
false, | ||
true) if arguments.size == 2 => | ||
true) if clz == classOf[CharVarcharCodegenUtils] && arguments.size == 2 => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
type erasure. Should check clz instead.
@@ -29,6 +27,8 @@ import org.apache.spark.sql.execution.{ColumnarToRowExec, SparkPlan, UnaryExecNo | |||
import org.apache.spark.sql.execution.metric.{SQLMetric, SQLMetrics, SQLShuffleReadMetricsReporter, SQLShuffleWriteMetricsReporter} | |||
import org.apache.spark.sql.vectorized.ColumnarBatch | |||
|
|||
import com.google.common.base.Objects |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was wrong to use java.util.Objects
@@ -271,7 +271,7 @@ class CometTPCHQuerySuite extends QueryTest with CometTPCBase with SQLQueryTestH | |||
} | |||
|
|||
// TODO: remove once Spark 3.2 & 3.3 is no longer supported | |||
private val shouldRegenerateGoldenFiles: Boolean = | |||
private def shouldRegenerateGoldenFiles: Boolean = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
forward reference in L227, which is incorrect in runtime.
Merged, thanks |
Which issue does this PR close?
Closes #.
Rationale for this change
When build comet locally, I noticed various warnings. Some are compiler warnings, some are test environment warnings.
Related code should be refactored for better code quality
What changes are included in this PR?
Fixes various warning in the compiler and test environments
How are these changes tested?
Manually verify the output of maven test