Bug 191627 [Regression]Exception occurs when first preview the joint dataset[0706]
Description: [Regression]Exception occurs when preview the flatfile and sampledb joint dataset[0706] Build number: 2.2.0.v20070608-0630 Steps to reproduce: 1, New a flatfile dataset 2, New a CUSTOMER dataset 3, Join two datasets with STATE column 4, Preview in dataset Expected result: Preview successfully Actual result: Exception occurs Error log: A BIRT exception occurred. Plug-in Provider:Eclipse.org Plug-in Name:BIRT Data Engine Plug-in ID:org.eclipse.birt.data Version:2.2.0.v20070607-1421 Error Code:data.engine.ColumnBindingReferToInexistColumn Error Message:Column binding "Employee::CUSTOMERNUMBER" has referred to a data set column "Employee::CUSTOMERNUMBER" which is not exist.
data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/impl/PreparedJointDataSourceQuery.java
{
			int leftTempColumnSize = getTempColumnSize( left );
			int rightTempColumnSize = getTempColumnSize( right );
			int length = ( left.getColumnCount( ) - leftTempColumnSize )
					+ ( right.getColumnCount( ) - rightTempColumnSize )
					+ ( ( dataSet.getComputedColumns( ) == null ) ? 0
							: dataSet.getComputedColumns( ).size( ) );
			int[] index = new int[length];
			int[] columnSource = new int[length];
			List projectedColumns = new ArrayList( );
			for ( int i = 1; i <= ( left.getColumnCount( ) - leftTempColumnSize ); i++ )
			{
				index[i - 1] = i;
				columnSource[i - 1] = JointResultMetadata.COLUMN_TYPE_LEFT;
				projectedColumns.add( new ResultFieldMetadata( i,
						leftPrefix + left.getColumnName( i ),
						leftPrefix + left.getColumnName( i ),
						getTypeClass( left.getColumnType( i ) ),
						left.getColumnNativeTypeName( i ),
						false ) );
			}
			for ( int i = ( left.getColumnCount( ) - leftTempColumnSize ) + 1; i <= ( left.getColumnCount( ) - leftTempColumnSize )
					+ ( right.getColumnCount( ) - rightTempColumnSize ); i++ )
			{
				index[i - 1] = i
						- ( left.getColumnCount( ) - leftTempColumnSize );
				columnSource[i - 1] = JointResultMetadata.COLUMN_TYPE_RIGHT;
				projectedColumns.add( new ResultFieldMetadata( i,
						rightPrefix
								+ right.getColumnName( i