You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
forref record in record_reader.merged_iter(schema.clone(), time_partition.cloned()){
734
731
writer.write(record)?;
735
-
// Collect record batches for finding statistics later
736
-
record_batches.push(record.clone());
732
+
// Collect record batches for finding statistics later
733
+
record_batches.push(record.clone());
737
734
}
738
735
writer.close()?;
739
736
@@ -1033,11 +1030,10 @@ impl Stream {
1033
1030
record_batches:Vec<RecordBatch>,
1034
1031
schema:Arc<Schema>,
1035
1032
) -> Result<(),PostError>{
1036
-
let stats_dataset_name = format!("dataset_{INTERNAL_STREAM_NAME}");
1037
1033
let log_source_entry = LogSourceEntry::new(LogSource::Json,HashSet::new());
1038
1034
PARSEABLE
1039
1035
.create_stream_if_not_exists(
1040
-
&stats_dataset_name,
1036
+
DATASET_STATS_STREAM_NAME,
1041
1037
StreamType::Internal,
1042
1038
vec![log_source_entry],
1043
1039
)
@@ -1061,7 +1057,7 @@ impl Stream {
1061
1057
1062
1058
flatten_and_push_logs(
1063
1059
stats_value,
1064
-
&stats_dataset_name,
1060
+
DATASET_STATS_STREAM_NAME,
1065
1061
&LogSource::Json,
1066
1062
&HashMap::new(),
1067
1063
)
@@ -1189,7 +1185,7 @@ impl Stream {
1189
1185
field_name:&str,
1190
1186
) -> Vec<DistinctStat>{
1191
1187
let sql = format!(
1192
-
"select count(*) as distinct_count, \"{field_name}\" from \"{stream_name}\"where \"{field_name}\" is not null group by \"{field_name}\" order by distinct_count desc limit {}",
1188
+
"select count(*) as distinct_count, \"{field_name}\" from \"{stream_name}\" group by \"{field_name}\" order by distinct_count desc limit {}",
0 commit comments