zkaoudi commented on code in PR #692:
URL: https://github.com/apache/wayang/pull/692#discussion_r2839616198
##########
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:
why do we need to access the separator? the separator for the header should
always be a comma, right?
--
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]