Skip to content

Commit

Permalink
clippy-tracing info
Browse files Browse the repository at this point in the history
  • Loading branch information
aditanase committed May 23, 2024
1 parent 018afe8 commit 03e9bed
Show file tree
Hide file tree
Showing 147 changed files with 3,134 additions and 3,134 deletions.
2 changes: 1 addition & 1 deletion datafusion/core/src/bin/print_config_docs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

use datafusion::config::ConfigOptions;

#[tracing::instrument(level = "trace", skip())]
#[tracing::instrument(level = "info", skip())]
fn main() {
let docs = ConfigOptions::generate_config_markdown();
println!("{docs}");
Expand Down
80 changes: 40 additions & 40 deletions datafusion/core/src/catalog/information_schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ pub struct InformationSchemaProvider {
}

impl InformationSchemaProvider {
#[tracing::instrument(level = "trace", skip(catalog_list))]
#[tracing::instrument(level = "info", skip(catalog_list))]
/// Creates a new [`InformationSchemaProvider`] for the provided `catalog_list`
pub fn new(catalog_list: Arc<dyn CatalogProviderList>) -> Self {
Self {
Expand All @@ -79,7 +79,7 @@ struct InformationSchemaConfig {
}

impl InformationSchemaConfig {
#[tracing::instrument(level = "trace", skip(self, builder))]
#[tracing::instrument(level = "info", skip(self, builder))]
/// Construct the `information_schema.tables` virtual table
async fn make_tables(
&self,
Expand Down Expand Up @@ -122,7 +122,7 @@ impl InformationSchemaConfig {
Ok(())
}

#[tracing::instrument(level = "trace", skip(self, builder))]
#[tracing::instrument(level = "info", skip(self, builder))]
async fn make_schemata(&self, builder: &mut InformationSchemataBuilder) {
for catalog_name in self.catalog_list.catalog_names() {
let catalog = self.catalog_list.catalog(&catalog_name).unwrap();
Expand All @@ -138,7 +138,7 @@ impl InformationSchemaConfig {
}
}

#[tracing::instrument(level = "trace", skip(self, builder))]
#[tracing::instrument(level = "info", skip(self, builder))]
async fn make_views(
&self,
builder: &mut InformationSchemaViewBuilder,
Expand Down Expand Up @@ -168,7 +168,7 @@ impl InformationSchemaConfig {
Ok(())
}

#[tracing::instrument(level = "trace", skip(self, builder))]
#[tracing::instrument(level = "info", skip(self, builder))]
/// Construct the `information_schema.columns` virtual table
async fn make_columns(
&self,
Expand Down Expand Up @@ -204,7 +204,7 @@ impl InformationSchemaConfig {
Ok(())
}

#[tracing::instrument(level = "trace", skip(self, config_options, builder))]
#[tracing::instrument(level = "info", skip(self, config_options, builder))]
/// Construct the `information_schema.df_settings` virtual table
fn make_df_settings(
&self,
Expand All @@ -219,20 +219,20 @@ impl InformationSchemaConfig {

#[async_trait]
impl SchemaProvider for InformationSchemaProvider {
#[tracing::instrument(level = "trace", skip(self))]
#[tracing::instrument(level = "info", skip(self))]
fn as_any(&self) -> &dyn Any {
self
}

#[tracing::instrument(level = "trace", skip(self))]
#[tracing::instrument(level = "info", skip(self))]
fn table_names(&self) -> Vec<String> {
INFORMATION_SCHEMA_TABLES
.iter()
.map(|t| t.to_string())
.collect()
}

#[tracing::instrument(level = "trace", skip(self, name))]
#[tracing::instrument(level = "info", skip(self, name))]
async fn table(
&self,
name: &str,
Expand All @@ -252,7 +252,7 @@ impl SchemaProvider for InformationSchemaProvider {
)))
}

#[tracing::instrument(level = "trace", skip(self, name))]
#[tracing::instrument(level = "info", skip(self, name))]
fn table_exist(&self, name: &str) -> bool {
INFORMATION_SCHEMA_TABLES.contains(&name.to_ascii_lowercase().as_str())
}
Expand All @@ -264,7 +264,7 @@ struct InformationSchemaTables {
}

impl InformationSchemaTables {
#[tracing::instrument(level = "trace", skip(config))]
#[tracing::instrument(level = "info", skip(config))]
fn new(config: InformationSchemaConfig) -> Self {
let schema = Arc::new(Schema::new(vec![
Field::new("table_catalog", DataType::Utf8, false),
Expand All @@ -276,7 +276,7 @@ impl InformationSchemaTables {
Self { schema, config }
}

#[tracing::instrument(level = "trace", skip(self))]
#[tracing::instrument(level = "info", skip(self))]
fn builder(&self) -> InformationSchemaTablesBuilder {
InformationSchemaTablesBuilder {
catalog_names: StringBuilder::new(),
Expand All @@ -289,12 +289,12 @@ impl InformationSchemaTables {
}

impl PartitionStream for InformationSchemaTables {
#[tracing::instrument(level = "trace", skip(self))]
#[tracing::instrument(level = "info", skip(self))]
fn schema(&self) -> &SchemaRef {
&self.schema
}

#[tracing::instrument(level = "trace", skip(self, _ctx))]
#[tracing::instrument(level = "info", skip(self, _ctx))]
fn execute(&self, _ctx: Arc<TaskContext>) -> SendableRecordBatchStream {
let mut builder = self.builder();
let config = self.config.clone();
Expand All @@ -321,7 +321,7 @@ struct InformationSchemaTablesBuilder {
}

impl InformationSchemaTablesBuilder {
#[tracing::instrument(level = "trace", skip(self, catalog_name, schema_name, table_name, table_type))]
#[tracing::instrument(level = "info", skip(self, catalog_name, schema_name, table_name, table_type))]
fn add_table(
&mut self,
catalog_name: impl AsRef<str>,
Expand All @@ -340,7 +340,7 @@ impl InformationSchemaTablesBuilder {
});
}

#[tracing::instrument(level = "trace", skip(self))]
#[tracing::instrument(level = "info", skip(self))]
fn finish(&mut self) -> RecordBatch {
RecordBatch::try_new(
self.schema.clone(),
Expand All @@ -361,7 +361,7 @@ struct InformationSchemaViews {
}

impl InformationSchemaViews {
#[tracing::instrument(level = "trace", skip(config))]
#[tracing::instrument(level = "info", skip(config))]
fn new(config: InformationSchemaConfig) -> Self {
let schema = Arc::new(Schema::new(vec![
Field::new("table_catalog", DataType::Utf8, false),
Expand All @@ -373,7 +373,7 @@ impl InformationSchemaViews {
Self { schema, config }
}

#[tracing::instrument(level = "trace", skip(self))]
#[tracing::instrument(level = "info", skip(self))]
fn builder(&self) -> InformationSchemaViewBuilder {
InformationSchemaViewBuilder {
catalog_names: StringBuilder::new(),
Expand All @@ -386,12 +386,12 @@ impl InformationSchemaViews {
}

impl PartitionStream for InformationSchemaViews {
#[tracing::instrument(level = "trace", skip(self))]
#[tracing::instrument(level = "info", skip(self))]
fn schema(&self) -> &SchemaRef {
&self.schema
}

#[tracing::instrument(level = "trace", skip(self, _ctx))]
#[tracing::instrument(level = "info", skip(self, _ctx))]
fn execute(&self, _ctx: Arc<TaskContext>) -> SendableRecordBatchStream {
let mut builder = self.builder();
let config = self.config.clone();
Expand All @@ -418,7 +418,7 @@ struct InformationSchemaViewBuilder {
}

impl InformationSchemaViewBuilder {
#[tracing::instrument(level = "trace", skip(self, catalog_name, schema_name, table_name, definition))]
#[tracing::instrument(level = "info", skip(self, catalog_name, schema_name, table_name, definition))]
fn add_view(
&mut self,
catalog_name: impl AsRef<str>,
Expand All @@ -433,7 +433,7 @@ impl InformationSchemaViewBuilder {
self.definitions.append_option(definition.as_ref());
}

#[tracing::instrument(level = "trace", skip(self))]
#[tracing::instrument(level = "info", skip(self))]
fn finish(&mut self) -> RecordBatch {
RecordBatch::try_new(
self.schema.clone(),
Expand All @@ -454,7 +454,7 @@ struct InformationSchemaColumns {
}

impl InformationSchemaColumns {
#[tracing::instrument(level = "trace", skip(config))]
#[tracing::instrument(level = "info", skip(config))]
fn new(config: InformationSchemaConfig) -> Self {
let schema = Arc::new(Schema::new(vec![
Field::new("table_catalog", DataType::Utf8, false),
Expand All @@ -477,7 +477,7 @@ impl InformationSchemaColumns {
Self { schema, config }
}

#[tracing::instrument(level = "trace", skip(self))]
#[tracing::instrument(level = "info", skip(self))]
fn builder(&self) -> InformationSchemaColumnsBuilder {
// StringBuilder requires providing an initial capacity, so
// pick 10 here arbitrarily as this is not performance
Expand Down Expand Up @@ -506,12 +506,12 @@ impl InformationSchemaColumns {
}

impl PartitionStream for InformationSchemaColumns {
#[tracing::instrument(level = "trace", skip(self))]
#[tracing::instrument(level = "info", skip(self))]
fn schema(&self) -> &SchemaRef {
&self.schema
}

#[tracing::instrument(level = "trace", skip(self, _ctx))]
#[tracing::instrument(level = "info", skip(self, _ctx))]
fn execute(&self, _ctx: Arc<TaskContext>) -> SendableRecordBatchStream {
let mut builder = self.builder();
let config = self.config.clone();
Expand Down Expand Up @@ -549,7 +549,7 @@ struct InformationSchemaColumnsBuilder {
}

impl InformationSchemaColumnsBuilder {
#[tracing::instrument(level = "trace", skip(self, catalog_name, schema_name, table_name, field_position, field))]
#[tracing::instrument(level = "info", skip(self, catalog_name, schema_name, table_name, field_position, field))]
fn add_column(
&mut self,
catalog_name: &str,
Expand Down Expand Up @@ -644,7 +644,7 @@ impl InformationSchemaColumnsBuilder {
self.interval_types.append_null();
}

#[tracing::instrument(level = "trace", skip(self))]
#[tracing::instrument(level = "info", skip(self))]
fn finish(&mut self) -> RecordBatch {
RecordBatch::try_new(
self.schema.clone(),
Expand Down Expand Up @@ -676,7 +676,7 @@ struct InformationSchemata {
}

impl InformationSchemata {
#[tracing::instrument(level = "trace", skip(config))]
#[tracing::instrument(level = "info", skip(config))]
fn new(config: InformationSchemaConfig) -> Self {
let schema = Arc::new(Schema::new(vec![
Field::new("catalog_name", DataType::Utf8, false),
Expand All @@ -690,7 +690,7 @@ impl InformationSchemata {
Self { schema, config }
}

#[tracing::instrument(level = "trace", skip(self))]
#[tracing::instrument(level = "info", skip(self))]
fn builder(&self) -> InformationSchemataBuilder {
InformationSchemataBuilder {
schema: self.schema.clone(),
Expand All @@ -717,7 +717,7 @@ struct InformationSchemataBuilder {
}

impl InformationSchemataBuilder {
#[tracing::instrument(level = "trace", skip(self, catalog_name, schema_name, schema_owner))]
#[tracing::instrument(level = "info", skip(self, catalog_name, schema_name, schema_owner))]
fn add_schemata(
&mut self,
catalog_name: &str,
Expand All @@ -738,7 +738,7 @@ impl InformationSchemataBuilder {
self.sql_path.append_null();
}

#[tracing::instrument(level = "trace", skip(self))]
#[tracing::instrument(level = "info", skip(self))]
fn finish(&mut self) -> RecordBatch {
RecordBatch::try_new(
self.schema.clone(),
Expand All @@ -757,12 +757,12 @@ impl InformationSchemataBuilder {
}

impl PartitionStream for InformationSchemata {
#[tracing::instrument(level = "trace", skip(self))]
#[tracing::instrument(level = "info", skip(self))]
fn schema(&self) -> &SchemaRef {
&self.schema
}

#[tracing::instrument(level = "trace", skip(self, _ctx))]
#[tracing::instrument(level = "info", skip(self, _ctx))]
fn execute(&self, _ctx: Arc<TaskContext>) -> SendableRecordBatchStream {
let mut builder = self.builder();
let config = self.config.clone();
Expand All @@ -783,7 +783,7 @@ struct InformationSchemaDfSettings {
}

impl InformationSchemaDfSettings {
#[tracing::instrument(level = "trace", skip(config))]
#[tracing::instrument(level = "info", skip(config))]
fn new(config: InformationSchemaConfig) -> Self {
let schema = Arc::new(Schema::new(vec![
Field::new("name", DataType::Utf8, false),
Expand All @@ -794,7 +794,7 @@ impl InformationSchemaDfSettings {
Self { schema, config }
}

#[tracing::instrument(level = "trace", skip(self))]
#[tracing::instrument(level = "info", skip(self))]
fn builder(&self) -> InformationSchemaDfSettingsBuilder {
InformationSchemaDfSettingsBuilder {
names: StringBuilder::new(),
Expand All @@ -806,12 +806,12 @@ impl InformationSchemaDfSettings {
}

impl PartitionStream for InformationSchemaDfSettings {
#[tracing::instrument(level = "trace", skip(self))]
#[tracing::instrument(level = "info", skip(self))]
fn schema(&self) -> &SchemaRef {
&self.schema
}

#[tracing::instrument(level = "trace", skip(self, ctx))]
#[tracing::instrument(level = "info", skip(self, ctx))]
fn execute(&self, ctx: Arc<TaskContext>) -> SendableRecordBatchStream {
let config = self.config.clone();
let mut builder = self.builder();
Expand All @@ -835,14 +835,14 @@ struct InformationSchemaDfSettingsBuilder {
}

impl InformationSchemaDfSettingsBuilder {
#[tracing::instrument(level = "trace", skip(self, entry))]
#[tracing::instrument(level = "info", skip(self, entry))]
fn add_setting(&mut self, entry: ConfigEntry) {
self.names.append_value(entry.key);
self.values.append_option(entry.value);
self.descriptions.append_value(entry.description);
}

#[tracing::instrument(level = "trace", skip(self))]
#[tracing::instrument(level = "info", skip(self))]
fn finish(&mut self) -> RecordBatch {
RecordBatch::try_new(
self.schema.clone(),
Expand Down
Loading

0 comments on commit 03e9bed

Please sign in to comment.