You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafodion.apache.org by "Suresh Subbiah (JIRA)" <ji...@apache.org> on 2015/10/05 18:09:26 UTC

[jira] [Assigned] (TRAFODION-1474) external_file field is empty in explain for Java TMUDF

     [ https://issues.apache.org/jira/browse/TRAFODION-1474?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Suresh Subbiah reassigned TRAFODION-1474:
-----------------------------------------

    Assignee: Suresh Subbiah

> external_file field is empty in explain for Java TMUDF
> ------------------------------------------------------
>
>                 Key: TRAFODION-1474
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-1474
>             Project: Apache Trafodion
>          Issue Type: Bug
>          Components: sql-cmp
>            Reporter: Weishiun Tsai
>            Assignee: Suresh Subbiah
>            Priority: Minor
>         Attachments: bug.tar
>
>
> For the Java version of TMUDF, the external_file field is empty for the TMUDF node in the explain output.   This field is filled in correctly for the C++ version of the TMUDF.  This problem was seen on the v0825 build installed on a single-node VM.
> To reproduce this problem will require building TMUDF first:
> (1)	Download the attached bug.tar and untar the entire directory to <mydir>
> (2)	Make sure that you have sourced in sqenv.sh from your Trafodion installation.
> (3)	cd <mydir>
> (4)	Edit mytest.sql and fill in <mydir> with your actual directory.
> (5)	Run mybuild.sh to build your TMUDF jar file
> (6)	Sqlci mytest.sh
> (7)	Search for ‘external_file’ in the output.  It should contain the jar file information but it is empty now.
> Here is the execution output:
> $ sqlci -i mytest.sql
> Trafodion Conversational Interface 1.2.0
> (c) Copyright 2014 Hewlett-Packard Development Company, LP.
> >>log mytest.log clear;
> >>drop schema mytest cascade;
> *** ERROR[1003] Schema TRAFODION.MYTEST does not exist.
> --- SQL operation failed with errors.
> >>create schema mytest;
> --- SQL operation complete.
> >>set schema mytest;
> --- SQL operation complete.
> >>
> >>drop library mytmudflib cascade;
> *** ERROR[1389] Object TRAFODION.MYTEST.MYTMUDFLIB does not exist in Trafodion.
> --- SQL operation failed with errors.
> >>create library mytmudflib file '/home/wtsai/tmudf_bugs/bug/mytmudf.jar';
> --- SQL operation complete.
> >>
> >>create table mytable (c1 int, c2 int);
> --- SQL operation complete.
> >>insert into mytable values (1,2);
> --- 1 row(s) inserted.
> >>select * from mytable;
> C1           C2
> -----------  -----------
>           1            2
> --- 1 row(s) selected.
> >>
> >>create table_mapping function myfunc()
> +>external name 'mytmudf'
> +>language java
> +>library mytmudflib;
> --- SQL operation complete.
> >>
> >>prepare xx from select * from UDF(myfunc(TABLE(select * from mytable))) XO;
> --- SQL command prepared.
> >>explain xx;
> ------------------------------------------------------------------ PLAN SUMMARY
> MODULE_NAME .............. DYNAMICALLY COMPILED
> STATEMENT_NAME ........... XX
> PLAN_ID .................. 212307799008895087
> ROWS_OUT ............... 100
> EST_TOTAL_COST ........... 0.01
> STATEMENT ................ select * from UDF(myfunc(TABLE(select * from
>                              mytable))) XO;
> ------------------------------------------------------------------ NODE LISTING
> ROOT ======================================  SEQ_NO 3        ONLY CHILD 2
> REQUESTS_IN .............. 1
> ROWS_OUT ............... 100
> EST_OPER_COST ............ 0
> EST_TOTAL_COST ........... 0.01
> DESCRIPTION
>   max_card_est ......... 100
>   fragment_id ............ 0
>   parent_frag ............ (none)
>   fragment_type .......... master
>   statement_index ........ 0
>   affinity_value ......... 0
>   max_max_cardinality    100
>   total_overflow_size .... 0.00 KB
>   xn_access_mode ......... read_only
>   xn_autoabort_interval    0
>   auto_query_retry ....... enabled for privilege checks
>   plan_version ....... 2,600
>   embedded_arkcmp ........ used
>   IS_SQLCI ............... ON
>   LDAP_USERNAME
>   SCHEMA ................. MYTEST
>   ObjectUIDs ............. 945831588301376744, 945831588301377054
>   select_list ............ C1, C2
> TMUDF =====================================  SEQ_NO 2        ONLY CHILD 1
> TABLE_NAME ............... XO
> REQUESTS_IN .............. 1
> ROWS_OUT ............... 100
> EST_OPER_COST ............ 0.01
> EST_TOTAL_COST ........... 0.01
> DESCRIPTION
>   max_card_est ........... -1
>   fragment_id ............ 0
>   parent_frag ............ (none)
>   fragment_type .......... master
>   TMUDF_name ............. XO
>   input_parameters
>   result_columns ......... C1, C2
>   external_name .......... mytmudf
>   external_file
>   child_outputs .......... TRAFODION.MYTEST.MYTABLE.C1,
>                              TRAFODION.MYTEST.MYTABLE.C2
> TRAFODION_SCAN ============================  SEQ_NO 1        NO CHILDREN
> TABLE_NAME ............... MYTABLE
> REQUESTS_IN .............. 1
> ROWS_OUT ............... 100
> EST_OPER_COST ............ 0.01
> EST_TOTAL_COST ........... 0.01
> DESCRIPTION
>   max_card_est ......... 100
>   fragment_id ............ 0
>   parent_frag ............ (none)
>   fragment_type .......... master
>   scan_type .............. subset scan of table TRAFODION.MYTEST.MYTABLE
>   object_type ............ Trafodion
>   columns ................ all
>   begin_keys(incl)
>   end_keys(incl)
>   cache_size ........... 100
>   probes ................. 1
>   rows_accessed ........ 100
>   key_columns ............ SYSKEY
> --- SQL operation complete.
> >>
> >>drop function myfunc cascade;
> --- SQL operation complete.
> >>drop library mytmudflib cascade;
> --- SQL operation complete.
> >>drop schema mytest cascade;
> --- SQL operation complete.
> >>
> >>exit;
> End of MXCI Session



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)