Skip to content

Commit

Permalink
Ban functions with the same name to register
Browse files Browse the repository at this point in the history
  • Loading branch information
NicoLaval committed Jul 3, 2024
1 parent 838fa29 commit c005d69
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/main/java/fr/insee/trevas/jupyter/VtlKernel.java
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ public static Object showMetadata(Object o) {
return o;
}

public static Dataset loadSDMXSource(String path, String id) {
public static Dataset loadSDMXEmptySource(String path, String id) {
Structured.DataStructure structure = TrevasSDMXUtils.buildStructureFromSDMX3(path, id);
return new InMemoryDataset(List.of(List.of()), structure);
}
Expand Down Expand Up @@ -270,8 +270,8 @@ private void registerGlobalMethods() throws NoSuchMethodException {

// SDMX
this.engine.registerGlobalMethod(
"loadSDMXSource",
VtlKernel.class.getMethod("loadSDMXSource", String.class, String.class));
"loadSDMXEmptySource",
VtlKernel.class.getMethod("loadSDMXEmptySource", String.class, String.class));
this.engine.registerGlobalMethod(
"loadSDMXSource",
VtlKernel.class.getMethod(
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/fr/insee/trevas/jupyter/SDMXTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class SDMXTest {
@Test
public void testLoadSDMXSource() {
Dataset ds =
VtlKernel.loadSDMXSource(
VtlKernel.loadSDMXEmptySource(
"src/test/resources/sdmx/DSD_BPE_CENSUS.xml", "BPE_DETAIL_VTL");
assertThat(ds.getDataStructure().size()).isEqualTo(6);
}
Expand Down

0 comments on commit c005d69

Please sign in to comment.