File tree Expand file tree Collapse file tree 6 files changed +23
-40
lines changed
trino-main/src/test/java/io/trino/connector
src/main/java/io/trino/spi/connector Expand file tree Collapse file tree 6 files changed +23
-40
lines changed Original file line number Diff line number Diff line change 1313 */
1414package io .trino .connector ;
1515
16- import io .trino .spi .Page ;
1716import io .trino .spi .connector .ConnectorPageSource ;
1817import io .trino .spi .connector .SourcePage ;
1918import io .trino .spi .metrics .Metrics ;
@@ -60,13 +59,6 @@ public boolean isFinished()
6059 return delegate .isFinished ();
6160 }
6261
63- @ Override
64- @ SuppressWarnings ("removal" )
65- public Page getNextPage ()
66- {
67- return delegate .getNextPage ();
68- }
69-
7062 @ Override
7163 public SourcePage getNextSourcePage ()
7264 {
Original file line number Diff line number Diff line change 662662 <code >java.annotation.removed</code >
663663 <annotationType >io.trino.spi.Experimental</annotationType >
664664 </item >
665+ <item >
666+ <ignore >true</ignore >
667+ <code >java.method.removed</code >
668+ <old >method io.trino.spi.Page io.trino.spi.connector.EmptyPageSource::getNextPage()</old >
669+ <justification >Deprecated</justification >
670+ </item >
671+ <item >
672+ <ignore >true</ignore >
673+ <code >java.method.removed</code >
674+ <old >method io.trino.spi.Page io.trino.spi.connector.FixedPageSource::getNextPage()</old >
675+ <justification >Deprecated</justification >
676+ </item >
677+ <item >
678+ <ignore >true</ignore >
679+ <code >java.method.removed</code >
680+ <old >method io.trino.spi.Page io.trino.spi.connector.RecordPageSource::getNextPage()</old >
681+ <justification >Deprecated</justification >
682+ </item >
665683 </differences >
666684 </revapi .differences>
667685 </analysisConfiguration >
Original file line number Diff line number Diff line change 1313 */
1414package io .trino .spi .connector ;
1515
16- import io .trino .spi .Page ;
1716import io .trino .spi .metrics .Metrics ;
1817
1918import java .io .Closeable ;
@@ -53,27 +52,12 @@ default OptionalLong getCompletedPositions()
5352 */
5453 boolean isFinished ();
5554
56- /**
57- * Gets the next page of data. This method is allowed to return null.
58- *
59- * @deprecated Use {@link #getNextSourcePage()} instead
60- */
61- @ Deprecated (forRemoval = true )
62- default Page getNextPage ()
63- {
64- throw new UnsupportedOperationException ();
65- }
66-
6755 /**
6856 * Gets the next page of data. This method is allowed to return null.
6957 */
7058 default SourcePage getNextSourcePage ()
7159 {
72- Page nextPage = getNextPage ();
73- if (nextPage == null ) {
74- return null ;
75- }
76- return SourcePage .create (nextPage );
60+ throw new UnsupportedOperationException ();
7761 }
7862
7963 /**
Original file line number Diff line number Diff line change 1313 */
1414package io .trino .spi .connector ;
1515
16- import io .trino .spi .Page ;
17-
1816public class EmptyPageSource
1917 implements ConnectorPageSource
2018{
@@ -36,13 +34,6 @@ public boolean isFinished()
3634 return true ;
3735 }
3836
39- @ Override
40- @ SuppressWarnings ("removal" )
41- public Page getNextPage ()
42- {
43- return null ;
44- }
45-
4637 @ Override
4738 public SourcePage getNextSourcePage ()
4839 {
Original file line number Diff line number Diff line change @@ -74,15 +74,14 @@ public boolean isFinished()
7474 }
7575
7676 @ Override
77- @ SuppressWarnings ("removal" )
78- public Page getNextPage ()
77+ public SourcePage getNextSourcePage ()
7978 {
8079 if (isFinished ()) {
8180 return null ;
8281 }
8382 Page page = pages .next ();
8483 completedBytes += page .getSizeInBytes ();
85- return page ;
84+ return SourcePage . create ( page ) ;
8685 }
8786
8887 @ Override
Original file line number Diff line number Diff line change @@ -81,8 +81,7 @@ public boolean isFinished()
8181 }
8282
8383 @ Override
84- @ SuppressWarnings ("removal" )
85- public Page getNextPage ()
84+ public SourcePage getNextSourcePage ()
8685 {
8786 if (!closed ) {
8887 for (int i = 0 ; i < ROWS_PER_REQUEST && !pageBuilder .isFull (); i ++) {
@@ -125,7 +124,7 @@ else if (javaType == Slice.class) {
125124 if ((closed && !pageBuilder .isEmpty ()) || pageBuilder .isFull ()) {
126125 Page page = pageBuilder .build ();
127126 pageBuilder .reset ();
128- return page ;
127+ return SourcePage . create ( page ) ;
129128 }
130129
131130 return null ;
You can’t perform that action at this time.
0 commit comments