Skip to content

Commit

Permalink
TEIID-5541 correcting the no projection, but a streaming path case
Browse files Browse the repository at this point in the history
  • Loading branch information
shawkins committed Nov 16, 2018
1 parent 120d6e9 commit 78fa6cc
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -575,8 +575,12 @@ public static void showArcs(StringBuilder sb, PathMapNode node, int level) {
}
}

/**
* Streaming eligible if using document projection and
* the context path is streamable.
*/
public boolean isStreaming() {
return streamingPath != null;
return streamingPath != null && contextRoot != null;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -1063,4 +1063,19 @@ public static BlobType blobFromFile(final String file) {
process(sql, expected);
}

@Test public void testJustRoot() throws Exception {
String sql = "Select * From XmlTable (\n" +
" '/root/abc'\n" +
" Passing convert('<root><def><test1>10</test1><test1>20</test1></def><abc>22</abc></root>', xml)\n" +
" Columns\n" +
" b string Path 'root()'\n" +
" )xx;";

List<?>[] expected = new List<?>[] {
Arrays.asList("102022"),
};

process(sql, expected);
}

}

0 comments on commit 78fa6cc

Please sign in to comment.