You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2021/09/07 07:24:20 UTC

[GitHub] [iceberg] GrigorievNick opened a new pull request #3083: iceberg-data, Row level Java API do not have any examples or descript…

GrigorievNick opened a new pull request #3083:
URL: https://github.com/apache/iceberg/pull/3083


   
   Fix for https://github.com/apache/iceberg/issues/3082
   iceberg-data, Row-level Java API do not have any examples or descriptions on-site doc. 
   So I add few very simple examples here.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] rdblue commented on a change in pull request #3083: iceberg-data, Row level Java API do not have any examples or descript…

Posted by GitBox <gi...@apache.org>.
rdblue commented on a change in pull request #3083:
URL: https://github.com/apache/iceberg/pull/3083#discussion_r706860133



##########
File path: site/docs/api.md
##########
@@ -70,6 +72,27 @@ Iterable<CombinedScanTask> tasks = scan.planTasks();
 
 Use `asOfTime` or `useSnapshot` to configure the table snapshot for time travel queries.
 
+#### Row level
+
+Iceberg table scans start by creating a `ScanBuilder` object with `IcebergGenerics.read`.
+
+```java
+ScanBuilder scanBuilder = IcebergGenerics.read(table)
+```
+
+To configure a scan, call `where` and `select` on the `ScanBuilder` to get a new `ScanBuilder` with those changes.
+
+```java
+scanBuilder.where(Expressions.equal("id", 5))
+```
+
+When a scan is configured, call method `build` to execute scan. `build` return `CloseableIterable<Record>`

Review comment:
       Should this mention that it is Iceberg's `Record` class?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] GrigorievNick commented on a change in pull request #3083: iceberg-data, Row level Java API do not have any examples or descript…

Posted by GitBox <gi...@apache.org>.
GrigorievNick commented on a change in pull request #3083:
URL: https://github.com/apache/iceberg/pull/3083#discussion_r707382240



##########
File path: site/docs/api.md
##########
@@ -70,6 +72,27 @@ Iterable<CombinedScanTask> tasks = scan.planTasks();
 
 Use `asOfTime` or `useSnapshot` to configure the table snapshot for time travel queries.
 
+#### Row level
+
+Iceberg table scans start by creating a `ScanBuilder` object with `IcebergGenerics.read`.
+
+```java
+ScanBuilder scanBuilder = IcebergGenerics.read(table)
+```
+
+To configure a scan, call `where` and `select` on the `ScanBuilder` to get a new `ScanBuilder` with those changes.
+
+```java
+scanBuilder.where(Expressions.equal("id", 5))
+```
+
+When a scan is configured, call method `build` to execute scan. `build` return `CloseableIterable<Record>`

Review comment:
       Yep, I will add details.

##########
File path: site/docs/api.md
##########
@@ -70,6 +72,27 @@ Iterable<CombinedScanTask> tasks = scan.planTasks();
 
 Use `asOfTime` or `useSnapshot` to configure the table snapshot for time travel queries.
 
+#### Row level
+
+Iceberg table scans start by creating a `ScanBuilder` object with `IcebergGenerics.read`.
+
+```java
+ScanBuilder scanBuilder = IcebergGenerics.read(table)
+```
+
+To configure a scan, call `where` and `select` on the `ScanBuilder` to get a new `ScanBuilder` with those changes.
+
+```java
+scanBuilder.where(Expressions.equal("id", 5))
+```
+
+When a scan is configured, call method `build` to execute scan. `build` return `CloseableIterable<Record>`
+
+```java
+Iterable<Record> result = IcebergGenerics.read(table)

Review comment:
       fixed.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] rdblue commented on a change in pull request #3083: iceberg-data, Row level Java API do not have any examples or descript…

Posted by GitBox <gi...@apache.org>.
rdblue commented on a change in pull request #3083:
URL: https://github.com/apache/iceberg/pull/3083#discussion_r706860066



##########
File path: site/docs/api.md
##########
@@ -70,6 +72,27 @@ Iterable<CombinedScanTask> tasks = scan.planTasks();
 
 Use `asOfTime` or `useSnapshot` to configure the table snapshot for time travel queries.
 
+#### Row level
+
+Iceberg table scans start by creating a `ScanBuilder` object with `IcebergGenerics.read`.
+
+```java
+ScanBuilder scanBuilder = IcebergGenerics.read(table)
+```
+
+To configure a scan, call `where` and `select` on the `ScanBuilder` to get a new `ScanBuilder` with those changes.
+
+```java
+scanBuilder.where(Expressions.equal("id", 5))
+```
+
+When a scan is configured, call method `build` to execute scan. `build` return `CloseableIterable<Record>`
+
+```java
+Iterable<Record> result = IcebergGenerics.read(table)

Review comment:
       Nit: this should be `CloseableIterable`.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] rdblue merged pull request #3083: iceberg-data, Row level Java API do not have any examples or descript…

Posted by GitBox <gi...@apache.org>.
rdblue merged pull request #3083:
URL: https://github.com/apache/iceberg/pull/3083


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] rdblue commented on pull request #3083: iceberg-data, Row level Java API do not have any examples or descript…

Posted by GitBox <gi...@apache.org>.
rdblue commented on pull request #3083:
URL: https://github.com/apache/iceberg/pull/3083#issuecomment-918336221


   Thanks for adding this, @GrigorievNick! I merged it.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org