language-extensions/python/test/src/PythonGetResultColumnTests.cpp
// Name: AllNonesColumnTest
//
// Description:
//  Test GetResultColumn with a script that returns a dataset with a column of all Nones.
//  We expect the output to be of type CHAR and have the minimum columnSize of 1.
//

AllNonesColumnTest
Description:
Test GetResultColumn with a script that returns a dataset with a column of all Nones.
We expect the output to be of type CHAR and have the minimum columnSize of 1.
AllNonesColumnTest Description : Test GetResultColumn with a script that returns a dataset with a column of all Nones . We expect the output to be of type CHAR and have the minimum columnSize of 1 .
TEST_F(PythonExtensionApiTests, AllNonesColumnTest)
	{
		string scriptString = "from pandas import DataFrame;"
			"OutputDataSet = DataFrame({'noneColumn': [None, None, None, None, None]});"
			"print(OutputDataSet)";
		InitializeSession(0, 
			0,               
			scriptString);
		SQLUSMALLINT outputschemaColumnsNumber = 0;
		SQLRETURN result = Execute(
			*m_sessionId,
			m_taskId,
			0,
			nullptr,
			nullptr,
			&outputschemaColumnsNumber);
		ASSERT_EQ(result, SQL_SUCCESS);
		EXPECT_EQ(outputschemaColumnsNumber, 1);
		TestGetResultColumn(0,  
			SQL_C_CHAR,         
			sizeof(SQLCHAR),    
			0,                  
			SQL_NULLABLE);      
	}
TEST_F ( PythonExtensionApiTests , AllNonesColumnTest ) { string scriptString = " " " " " " ; InitializeSession ( 0 , 0 , scriptString ) ; SQLUSMALLINT outputschemaColumnsNumber = 0 ; SQLRETURN result = Execute ( * m_sessionId , m_taskId , 0 , nullptr , nullptr , & outputschemaColumnsNumber ) ; ASSERT_EQ ( result , SQL_SUCCESS ) ; EXPECT_EQ ( outputschemaColumnsNumber , 1 ) ; TestGetResultColumn ( 0 , SQL_C_CHAR , sizeof ( SQLCHAR ) , 0 , SQL_NULLABLE ) ; }
Name: AllNonesColumnTest
Description:
Test GetResultColumn with a script that returns a dataset with a column of all Nones.
Name : AllNonesColumnTest Description : Test GetResultColumn with a script that returns a dataset with a column of all Nones .
// With this script, we create a DataFrame with column of Nones.
 //
 // Initialize with a Session that executes the above script
 // that creates an OutputDataSet with column of Nones.
 //
 // parametersNumber
 // inputSchemaColumnsNumber
 // columnNumber
 // dataType
 // columnSize
 // decimalDigits
 // nullable
