Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id E2E14200D4C for ; Thu, 30 Nov 2017 11:50:04 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id E14BF160BF4; Thu, 30 Nov 2017 10:50:04 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 0B25B160BEA for ; Thu, 30 Nov 2017 11:50:03 +0100 (CET) Received: (qmail 84804 invoked by uid 500); 30 Nov 2017 10:50:03 -0000 Mailing-List: contact issues-help@flink.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flink.apache.org Delivered-To: mailing list issues@flink.apache.org Received: (qmail 84787 invoked by uid 99); 30 Nov 2017 10:50:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Nov 2017 10:50:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id BF4A9C53A5 for ; Thu, 30 Nov 2017 10:50:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.011 X-Spam-Level: X-Spam-Status: No, score=-99.011 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KB_WAM_FROM_NAME_SINGLEWORD=0.2, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id frxbMG5GevWo for ; Thu, 30 Nov 2017 10:50:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 395475F1ED for ; Thu, 30 Nov 2017 10:50:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 59889E0044 for ; Thu, 30 Nov 2017 10:50:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 10C6321056 for ; Thu, 30 Nov 2017 10:50:00 +0000 (UTC) Date: Thu, 30 Nov 2017 10:50:00 +0000 (UTC) From: "Fabian Hueske (JIRA)" To: issues@flink.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (FLINK-8173) InvalidProgramException: Table program cannot be compiled. This is a bug. Please file an issue. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 30 Nov 2017 10:50:05 -0000 [ https://issues.apache.org/jira/browse/FLINK-8173?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1627= 2512#comment-16272512 ]=20 Fabian Hueske commented on FLINK-8173: -------------------------------------- Yes, you should change {{toAppendStream[org.apache.avro.util.Utf8]}} to {{t= oAppendStream\[java.lang.CharSequence\]}} or perform a manual casting with = a scalar UDF.=20 The support for Avro objects should be improved by converting `CharSequence= ` to `String` to be able to use it as a VARCHAR (String) field, but then yo= u'd get the same error message but with String instead of CharSequence (see= FLINK-8175) Btw. I tried to reproduce the error with Flink 1.4.0 and got a much better = error message. > InvalidProgramException: Table program cannot be compiled. This is a bug.= Please file an issue. > -------------------------------------------------------------------------= ---------------------- > > Key: FLINK-8173 > URL: https://issues.apache.org/jira/browse/FLINK-8173 > Project: Flink > Issue Type: Bug > Reporter: Tao Xia > > It is a stream of Avro objects, simply select a String field and trying t= o print out > val query =3D "SELECT nd_key FROM table1" > val result =3D tableEnv.sql(query) > tableEnv.toAppendStream[org.apache.avro.util.Utf8](result).print() > 11/29/2017 16:07:36=09Source: Custom Source -> from: (accepted_cohort_id,= admin_id, after_submission, amount_paid, anonymous_id, application_id, ato= m_key, bd_group_key, biz_geo, braavos_purchase_id, category, cohort_id, con= cept_key, concept_rank, context, context_campaign, context_experiment, coup= on_code, course_key, course_rank, cta_destination, cta_location, cta_messag= e, cta_type, currency, decision_group_id, device_browser, device_os, device= _os_version, device_type, duration, evaluation_id, event_type, fin_geo, in_= collaboration_with, lab_id, lab_rank, label, lesson_key, lesson_rank, local= e, max_pause_duration, message, message_id, module_key, module_rank, nd_key= , nd_unit_id, nd_unit_rank, new_cohort_id, notification_id, num_concepts_co= mpleted, num_interactions, num_lessons_completed, old_cohort_id, part_key, = part_rank, pause_duration, pause_reason, payment_plan, payment_provider, po= ints_earned, points_possible, price, price_sheet, product_key, product_type= , provider_charge_id, provider_refund_id, quiz_type, referrer, refund_amoun= t, requested_cohort_id, results, scholarship_group_key, search_term, skill_= level, subscription_id, suspension_length, suspension_reason, technology, t= imestamp, total_concepts, total_lessons, total_time_sec, type, unenroll_rea= son, user_id, user_locale, user_response, variant, version, workspace_id, w= orkspace_session, workspace_type) -> select: (nd_key) -> to: Utf8 -> Sink: = Unnamed(5/8) switched to FAILED=20 > org.apache.flink.api.common.InvalidProgramException: Table program cannot= be compiled. This is a bug. Please file an issue. > =09at org.apache.flink.table.codegen.Compiler$class.compile(Compiler.scal= a:36) > =09at org.apache.flink.table.runtime.CRowOutputMapRunner.compile(CRowOutp= utMapRunner.scala:33) > =09at org.apache.flink.table.runtime.CRowOutputMapRunner.open(CRowOutputM= apRunner.scala:48) > =09at org.apache.flink.api.common.functions.util.FunctionUtils.openFuncti= on(FunctionUtils.java:36) > =09at org.apache.flink.streaming.api.operators.AbstractUdfStreamOperator.= open(AbstractUdfStreamOperator.java:111) > =09at org.apache.flink.streaming.runtime.tasks.StreamTask.openAllOperator= s(StreamTask.java:376) > =09at org.apache.flink.streaming.runtime.tasks.StreamTask.invoke(StreamTa= sk.java:253) > =09at org.apache.flink.runtime.taskmanager.Task.run(Task.java:702) > =09at java.lang.Thread.run(Thread.java:748) > Caused by: org.codehaus.commons.compiler.CompileException: Line 790, Colu= mn 15: Assignment conversion not possible from type "java.lang.CharSequence= " to type "org.apache.avro.util.Utf8" > =09at org.codehaus.janino.UnitCompiler.compileError(UnitCompiler.java:116= 72) > =09at org.codehaus.janino.UnitCompiler.assignmentConversion(UnitCompiler.= java:10528) > =09at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:2534) > =09at org.codehaus.janino.UnitCompiler.access$2600(UnitCompiler.java:212) > =09at org.codehaus.janino.UnitCompiler$6.visitLocalVariableDeclarationSta= tement(UnitCompiler.java:1459) > =09at org.codehaus.janino.UnitCompiler$6.visitLocalVariableDeclarationSta= tement(UnitCompiler.java:1443) > =09at org.codehaus.janino.Java$LocalVariableDeclarationStatement.accept(J= ava.java:3348) > =09at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:1443) > =09at org.codehaus.janino.UnitCompiler.compileStatements(UnitCompiler.jav= a:1523) > =09at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:3052) > =09at org.codehaus.janino.UnitCompiler.compileDeclaredMethods(UnitCompile= r.java:1313) > =09at org.codehaus.janino.UnitCompiler.compileDeclaredMethods(UnitCompile= r.java:1286) > =09at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:785) > =09at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:436) > =09at org.codehaus.janino.UnitCompiler.access$400(UnitCompiler.java:212) > =09at org.codehaus.janino.UnitCompiler$2.visitPackageMemberClassDeclarati= on(UnitCompiler.java:390) > =09at org.codehaus.janino.UnitCompiler$2.visitPackageMemberClassDeclarati= on(UnitCompiler.java:385) > =09at org.codehaus.janino.Java$PackageMemberClassDeclaration.accept(Java.= java:1405) > =09at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:385) > =09at org.codehaus.janino.UnitCompiler.compileUnit(UnitCompiler.java:357) > =09at org.codehaus.janino.SimpleCompiler.cook(SimpleCompiler.java:234) > =09at org.codehaus.janino.SimpleCompiler.compileToClassLoader(SimpleCompi= ler.java:446) > =09at org.codehaus.janino.SimpleCompiler.cook(SimpleCompiler.java:213) > =09at org.codehaus.janino.SimpleCompiler.cook(SimpleCompiler.java:204) > =09at org.codehaus.commons.compiler.Cookable.cook(Cookable.java:80) > =09at org.codehaus.commons.compiler.Cookable.cook(Cookable.java:75) > =09at org.apache.flink.table.codegen.Compiler$class.compile(Compiler.scal= a:33) > =09... 8 more -- This message was sent by Atlassian JIRA (v6.4.14#64029)