@@ -123,15 +123,21 @@ void CArrowChunkIterator::initColumnConverters()
123123 int returnCode = ArrowArrayViewInitFromSchema (
124124 m_arrowArrayView.get (), m_arrowSchema.get (), &error);
125125 if (returnCode != NANOARROW_OK) {
126- std::string errorInfo = Logger::formatString (ArrowErrorMessage (&error));
126+ std::string errorInfo = Logger::formatString (
127+ " [Snowflake Exception] error initializing ArrowArrayView from schema : %s" ,
128+ ArrowErrorMessage (&error)
129+ );
127130 logger->error (__FILE__, __func__, __LINE__, errorInfo.c_str ());
128131 PyErr_SetString (PyExc_Exception, errorInfo.c_str ());
129132 }
130133
131134 returnCode = ArrowArrayViewSetArray (
132135 m_arrowArrayView.get (), m_arrowArray.get (), &error);
133136 if (returnCode != NANOARROW_OK) {
134- std::string errorInfo = Logger::formatString (ArrowErrorMessage (&error));
137+ std::string errorInfo = Logger::formatString (
138+ " [Snowflake Exception] error setting ArrowArrayView from array : %s" ,
139+ ArrowErrorMessage (&error)
140+ );
135141 logger->error (__FILE__, __func__, __LINE__, errorInfo.c_str ());
136142 PyErr_SetString (PyExc_Exception, errorInfo.c_str ());
137143 }
@@ -145,7 +151,10 @@ void CArrowChunkIterator::initColumnConverters()
145151 returnCode = ArrowSchemaViewInit (
146152 &columnSchemaView, columnSchema, &error);
147153 if (returnCode != NANOARROW_OK) {
148- std::string errorInfo = Logger::formatString (ArrowErrorMessage (&error));
154+ std::string errorInfo = Logger::formatString (
155+ " [Snowflake Exception] error initializing ArrowSchemaView : %s" ,
156+ ArrowErrorMessage (&error)
157+ );
149158 logger->error (__FILE__, __func__, __LINE__, errorInfo.c_str ());
150159 PyErr_SetString (PyExc_Exception, errorInfo.c_str ());
151160 }
0 commit comments