googleapis / googleapis/google-cloud-java

[java-firestore] whereHavingExample sample throws error

オープン
#13,093 コメント 1 件 リアクション 0 件 担当者 1 名 @morganchen12 が担当を希望しています GitHub で見る
api: firestore samples
主要言語
Java
スター
2.1k
フォーク
1.2k
平均マージ
1日 23時間
マージ済み PR(30日)
154

説明

https://github.com/googleapis/java-firestore/blob/be110eedb85ea5e83740057a7771ddb238dfa64d/samples/preview-snippets/src/main/java/com/example/firestore/PipelineSnippets.java#L1823-L1837

throws error

```java
Caused by: io.grpc.StatusRuntimeException: INVALID_ARGUMENT: The nested field reference 'location.state' is not supported in its current use case.

Certain stages like `aggregate(...)` or `unnest(...)` only support assigning to top-level fields. This means you cannot use an alias like 'foo.bar' to assign the result to a nested field. If you want to use an alias that has a dot in it, escape the path with backticks, like `foo.bar`.

Depending on the SDK, this can be done like so:`.distinct(field("address.city").as("`address.city`"))`
at io.grpc.Status.asRuntimeException(Status.java:532)
```

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。