Prathamesh9284 commented on code in PR #692:
URL: https://github.com/apache/wayang/pull/692#discussion_r2839637388


##########
wayang-api/wayang-api-sql/src/main/java/org/apache/wayang/api/sql/sources/fs/JavaCSVTableSource.java:
##########
@@ -176,6 +182,50 @@ private static Stream<String> streamLines(final String 
path) {
 
     }
 
+    /**
+     * Validates the CSV header for Calcite compatibility.
+     * Checks that the header is present, uses comma separators (not the data
+     * delimiter), and each column follows the 'name:type' format
+     * (e.g., 'id:int,name:string,email:string'). Note that Calcite hardcodes
+     * commas for header parsing, while data rows use Wayang's configurable
+     * separator (default ';').
+     *
+     * @param path the filesystem path to the CSV file
+     */
+    private void validateHeaderLine(final String path) {
+        final FileSystem fileSystem = 
FileSystems.getFileSystem(path).orElseThrow(

Review Comment:
   You're right, I got confused here the header separator is always a comma, so 
the core validation doesn't actually need the instance-level separator. I was 
using it only for a more descriptive error message, but that's not essential.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to