[jira] [Commented] (DRILL-8474) Add Daffodil Format Plugin
[ https://issues.apache.org/jira/browse/DRILL-8474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17841807#comment-17841807 ] ASF GitHub Bot commented on DRILL-8474: --- mbeckerle commented on PR #2909: URL: https://github.com/apache/drill/pull/2909#issuecomment-2081781546 Tests are now failing due to these two things in TestDaffodilReader.scala ``` String schemaURIRoot = "file:///opt/drill/contrib/format-daffodil/src/test/resources/"; ``` That's an absolute URI that is used to obtain access to the schema files in this statement: ``` private String selectRow(String schema, String file) { return "SELECT * FROM table(dfs.`data/" + file + "` " + " (type => 'daffodil'," + " " + "validationMode => 'true', " + " schemaURI => '" + schemaURIRoot + "schema/" + schema + ".dfdl.xsd'," + " rootName => 'row'," + " rootNamespace => null " + "))"; } ``` This is assembling a select statement, and puts this absolute schemaURI into the schemaURI part of the select. What should I be doing to arrange for these schema URIs to be found. The schemas are a large complex set of files, not just a single file. Many files must be found relative to the initial root schema file. (Hundreds of files potentially). As they include/import other schema files using relative paths. > Add Daffodil Format Plugin > -- > > Key: DRILL-8474 > URL: https://issues.apache.org/jira/browse/DRILL-8474 > Project: Apache Drill > Issue Type: New Feature >Affects Versions: 1.21.1 >Reporter: Charles Givre >Priority: Major > Fix For: 1.22.0 > > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (DRILL-8474) Add Daffodil Format Plugin
[ https://issues.apache.org/jira/browse/DRILL-8474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17841775#comment-17841775 ] ASF GitHub Bot commented on DRILL-8474: --- cgivre commented on code in PR #2909: URL: https://github.com/apache/drill/pull/2909#discussion_r1582375084 ## exec/vector/src/main/java/org/apache/drill/exec/record/metadata/MapBuilder.java: ## @@ -185,6 +192,26 @@ public MapBuilder resumeMap() { return (MapBuilder) parent; } + /** + * Depending on whether the parent is a schema builder or map builder + * we resume appropriately. + */ + @Override + public void resume() { +if (Objects.isNull(parent)) Review Comment: I just built Drill using the following command: ```sh mvn clean install -DskipTests ``` When I did that, I was getting the same error as on GitHub. After adding the braces as described above, it built without issues. With that said, I think you can do just run the check style with: ```sh mvn checkstyle:checkstyle ``` > Add Daffodil Format Plugin > -- > > Key: DRILL-8474 > URL: https://issues.apache.org/jira/browse/DRILL-8474 > Project: Apache Drill > Issue Type: New Feature >Affects Versions: 1.21.1 >Reporter: Charles Givre >Priority: Major > Fix For: 1.22.0 > > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (DRILL-8474) Add Daffodil Format Plugin
[ https://issues.apache.org/jira/browse/DRILL-8474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17841774#comment-17841774 ] ASF GitHub Bot commented on DRILL-8474: --- cgivre commented on code in PR #2909: URL: https://github.com/apache/drill/pull/2909#discussion_r1582375084 ## exec/vector/src/main/java/org/apache/drill/exec/record/metadata/MapBuilder.java: ## @@ -185,6 +192,26 @@ public MapBuilder resumeMap() { return (MapBuilder) parent; } + /** + * Depending on whether the parent is a schema builder or map builder + * we resume appropriately. + */ + @Override + public void resume() { +if (Objects.isNull(parent)) Review Comment: I just built Drill using the following command: ```sh mvn clean install -DskipTests ``` I think you can do just run the check style with: ```sh mvn checkstyle:checkstyle ``` > Add Daffodil Format Plugin > -- > > Key: DRILL-8474 > URL: https://issues.apache.org/jira/browse/DRILL-8474 > Project: Apache Drill > Issue Type: New Feature >Affects Versions: 1.21.1 >Reporter: Charles Givre >Priority: Major > Fix For: 1.22.0 > > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (DRILL-8474) Add Daffodil Format Plugin
[ https://issues.apache.org/jira/browse/DRILL-8474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17841768#comment-17841768 ] ASF GitHub Bot commented on DRILL-8474: --- mbeckerle commented on code in PR #2909: URL: https://github.com/apache/drill/pull/2909#discussion_r1582367382 ## exec/vector/src/main/java/org/apache/drill/exec/record/metadata/MapBuilder.java: ## @@ -185,6 +192,26 @@ public MapBuilder resumeMap() { return (MapBuilder) parent; } + /** + * Depending on whether the parent is a schema builder or map builder + * we resume appropriately. + */ + @Override + public void resume() { +if (Objects.isNull(parent)) Review Comment: What is the maven command line to just make it run this checkstyle? > Add Daffodil Format Plugin > -- > > Key: DRILL-8474 > URL: https://issues.apache.org/jira/browse/DRILL-8474 > Project: Apache Drill > Issue Type: New Feature >Affects Versions: 1.21.1 >Reporter: Charles Givre >Priority: Major > Fix For: 1.22.0 > > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (DRILL-8474) Add Daffodil Format Plugin
[ https://issues.apache.org/jira/browse/DRILL-8474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17841667#comment-17841667 ] ASF GitHub Bot commented on DRILL-8474: --- cgivre commented on code in PR #2909: URL: https://github.com/apache/drill/pull/2909#discussion_r1582206247 ## exec/vector/src/main/java/org/apache/drill/exec/record/metadata/MapBuilder.java: ## @@ -185,6 +192,26 @@ public MapBuilder resumeMap() { return (MapBuilder) parent; } + /** + * Depending on whether the parent is a schema builder or map builder + * we resume appropriately. + */ + @Override + public void resume() { +if (Objects.isNull(parent)) Review Comment: @mbeckerle Confirmed. I successfully built your branch by adding the aforementioned braces. I'll save you some additional trouble. There's another check style violation in `DaffodilBatchReader`. Drill doesn't like star imports for some reason. > Add Daffodil Format Plugin > -- > > Key: DRILL-8474 > URL: https://issues.apache.org/jira/browse/DRILL-8474 > Project: Apache Drill > Issue Type: New Feature >Affects Versions: 1.21.1 >Reporter: Charles Givre >Priority: Major > Fix For: 1.22.0 > > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (DRILL-8474) Add Daffodil Format Plugin
[ https://issues.apache.org/jira/browse/DRILL-8474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17841663#comment-17841663 ] ASF GitHub Bot commented on DRILL-8474: --- cgivre commented on code in PR #2909: URL: https://github.com/apache/drill/pull/2909#discussion_r1582202511 ## exec/vector/src/main/java/org/apache/drill/exec/record/metadata/MapBuilder.java: ## @@ -185,6 +192,26 @@ public MapBuilder resumeMap() { return (MapBuilder) parent; } + /** + * Depending on whether the parent is a schema builder or map builder + * we resume appropriately. + */ + @Override + public void resume() { +if (Objects.isNull(parent)) Review Comment: @mbeckerle I don't know why the checkstyle is telling you the wrong file, but here, you'll need braces as well as at line 203. ie: ```java if (parent instanceof MapBuilder) { resumeMap(); } ``` > Add Daffodil Format Plugin > -- > > Key: DRILL-8474 > URL: https://issues.apache.org/jira/browse/DRILL-8474 > Project: Apache Drill > Issue Type: New Feature >Affects Versions: 1.21.1 >Reporter: Charles Givre >Priority: Major > Fix For: 1.22.0 > > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (DRILL-8474) Add Daffodil Format Plugin
[ https://issues.apache.org/jira/browse/DRILL-8474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17841637#comment-17841637 ] ASF GitHub Bot commented on DRILL-8474: --- shfshihuafeng commented on PR #2909: URL: https://github.com/apache/drill/pull/2909#issuecomment-2081475418 > This fails its tests due to a maven checkstyle failure. It's complaining about Drill:Exec:Vectors, which my code has no changes to. > > Can someone advise on what is wrong here? if (Objects.isNull(parent)) { throw new IllegalStateException("Call to resume() on MapBuilder with no parent."); } > Add Daffodil Format Plugin > -- > > Key: DRILL-8474 > URL: https://issues.apache.org/jira/browse/DRILL-8474 > Project: Apache Drill > Issue Type: New Feature >Affects Versions: 1.21.1 >Reporter: Charles Givre >Priority: Major > Fix For: 1.22.0 > > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (DRILL-8474) Add Daffodil Format Plugin
[ https://issues.apache.org/jira/browse/DRILL-8474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17841636#comment-17841636 ] ASF GitHub Bot commented on DRILL-8474: --- shfshihuafeng commented on PR #2909: URL: https://github.com/apache/drill/pull/2909#issuecomment-2081475241 > This fails its tests due to a maven checkstyle failure. It's complaining about Drill:Exec:Vectors, which my code has no changes to. > > Can someone advise on what is wrong here? /home/runner/work/drill/drill/exec/vector/src/main/java/org/apache/drill/exec/record/metadata/MapBuilder.java:201:5 you need add if' construct must use '{}',like following ? if (Objects.isNull(parent)) { throw new IllegalStateException("Call to resume() on MapBuilder with no parent."); } > This fails its tests due to a maven checkstyle failure. It's complaining about Drill:Exec:Vectors, which my code has no changes to. > > Can someone advise on what is wrong here? exec/vector/src/main/java/org/apache/drill/exec/record/metadata/MapBuilder.java 201 i think you need add {} for if ``` if (Objects.isNull(parent)) { throw new IllegalStateException("Call to resume() on MapBuilder with no parent."); } ``` > Add Daffodil Format Plugin > -- > > Key: DRILL-8474 > URL: https://issues.apache.org/jira/browse/DRILL-8474 > Project: Apache Drill > Issue Type: New Feature >Affects Versions: 1.21.1 >Reporter: Charles Givre >Priority: Major > Fix For: 1.22.0 > > -- This message was sent by Atlassian Jira (v8.20.10#820010)