Type error message does not include complex type ------------------------------------------------
Key: PIG-1499 URL: https://issues.apache.org/jira/browse/PIG-1499 Project: Pig Issue Type: Improvement Components: impl Affects Versions: 0.7.0 Environment: Hadoop 0.20.104.3.1007030707 Apache Pig version 0.7.0.20.100.1.1006041903 (r951530) Reporter: Sherry Chen Priority: Minor When loading data as a bag, if the schema specification is not correct, error message does not include useful information about bag. For example, input file as "input.txt", working script as "working.pig", non working as "not_working.pig" as following: input.txt {(2, 3)} {(4, 6)} {(5, 7)} not_working.pig A = LOAD 'input.txt' AS (f1:bag[T:tuple(t1, t2)]); describe A; dump A; working .pig A = LOAD 'input.txt' AS (f1:bag{T:tuple(t1, t2)}); describe A; dump A; if run: " pig -latest -x local working.pig", we get result: ({(2, 3)}) ({(4, 6)}) ({(5, 7)}) if run " pig -latest -x local not_working.pig", we get: ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1000: Error during parsing. Encountered " "bag" "bag "" at line 1, column 29. Was expecting one of: "int" ... "long" ... "float" ... "double" ... "chararray" ... "bytearray" ... "int" ... "long" ... "float" ... "double" ... "chararray" ... "bytearray" ... Please include bag{} map[] tuple() in Error message for better addressing the error. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.