[Bug] Aggregation as a derived field

Đang mở
#5,826 4 bình luận 0 reaction 1 người được giao Xem trên GitHub

@lutter đang làm issue này rồi.

Từ ngày 18/2/2025.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

area/aggregations bug Stale
Bug report

I have a timeseries with an aggregation for hours and days. The schema looks like:

type InterestRate @entity {
  id: ID!
  rate: BigDecimal!
  rateTimeseries: [RateTimeseries!]! @derivedFrom(field: "interestRate")
}

type RateTimeseries @aggregation(intervals: ["hour", "day"], source: "IRTimeseriesData") {
  id: Int8!
  timestamp: Timestamp!
  interestRate: InterestRate!
  rateLast: BigDecimal! @aggregate(fn: "last", arg: "rate")
}

When I attempt to run this query I get the below error message.

{
  interestRates {
    rateTimeseries(interval: hour
      , where: {timestamp_gte: "1739764800"}) {
      rateLast
    }
  }
}

Failed to get entities from store: column c.timestamp does not exist, query = /* controller='filter',application='sgd795204',route='2e94a8f832bfa4fd-7e11bf1ea2d8f256',action='5507583' /\nselect 'RateTimeseries_hour' as entity, to_jsonb(c.) as data from (select c."block$", c."id", c."rate_last", c."vid", p.id::text as g$parent_id\n/* children_type_b */ from unnest($1) as p(id) cross join lateral (select "block$", "id", "rate_last", "vid" from "sgd795204"."rate_timeseries_hour" as c where c.block$ <= $2 and p.id = c."interest_rate"\n and (c."timestamp" >= $3) order by c."timestamp" desc, "id" desc\n limit 100) c) c\n order by g$parent_id, c."timestamp" desc, "id" desc

Relevant log output

IPFS hash

No response

Subgraph name or link to explorer

No response

Some information to help us out
  • Tick this box if this bug is caused by a regression found in the latest release.
  • Tick this box if this bug is specific to the hosted service.
  • I have searched the issue tracker to make sure this issue is not a duplicate.
OS information

None

Ngôn ngữ chính
Rust
Star
3.2k
Fork
1.1k
Merge trung bình
4 ngày 1 giờ
Pull request đã merge (30 ngày)
1

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của graphprotocol/graph-node

Tất cả issue của graphprotocol/graph-node

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.