Vishwanatha-HD commented on code in PR #48205:
URL: https://github.com/apache/arrow/pull/48205#discussion_r2558748029


##########
cpp/src/parquet/column_writer.h:
##########
@@ -260,13 +261,21 @@ constexpr int64_t kJulianEpochOffsetDays = 
INT64_C(2440588);
 template <int64_t UnitPerDay, int64_t NanosecondsPerUnit>
 inline void ArrowTimestampToImpalaTimestamp(const int64_t time, Int96* 
impala_timestamp) {

Review Comment:
   @pitrou.. As you suggested, I tried moving the definition to 
column_writer.cc and keeping the declaration in column_writer.h.. But the 
compiler is throwing the below error.. 
   
   The basic issue here is the column_writer.h is being added by many other 
files like stream_writers and file_writers and they are now cribbing that they 
are not able to see the function definition.. 
   
   If I endup providing the definition everywhere just to fix these compile 
error, then it will be code-duplication.. Hence I will leave this as is for 
now.. Thanks.. 
   
   n file included from 
/home/vishwa/golang/arrow/cpp/src/parquet/stream_writer.h:31,
            from /home/vishwa/golang/arrow/cpp/src/parquet/stream_writer.cc:18:
   /home/vishwa/golang/arrow/cpp/src/parquet/column_writer.h:261:13: error: 
inline function ‘void 
parquet::internal::ArrowTimestampToImpalaTimestamp(int64_t, p
   arquet::Int96*) [with long int UnitPerDay = 86400; long int 
NanosecondsPerUnit = 1000000000; int64_t = long int]’ used but never defined 
[-Werror]
    261 | inline void ArrowTimestampToImpalaTimestamp(const int64_t time, 
Int96* impala_timestamp);
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   /home/vishwa/golang/arrow/cpp/src/parquet/column_writer.h:261:13: error: 
inline function ‘void 
parquet::internal::ArrowTimestampToImpalaTimestamp(int64_t, p
   arquet::Int96*) [with long int UnitPerDay = 86400000; long int 
NanosecondsPerUnit = 1000000; int64_t = long int]’ used but never defined 
[-Werror]
   /home/vishwa/golang/arrow/cpp/src/parquet/column_writer.h:261:13: error: 
inline function ‘void 
parquet::internal::ArrowTimestampToImpalaTimestamp(int64_t, p
   arquet::Int96*) [with long int UnitPerDay = 86400000000; long int 
NanosecondsPerUnit = 1000; int64_t = long int]’ used but never defined [-Werror]
   /home/vishwa/golang/arrow/cpp/src/parquet/column_writer.h:261:13: error: 
inline function ‘void 
parquet::internal::ArrowTimestampToImpalaTimestamp(int64_t, p
   arquet::Int96*) [with long int UnitPerDay = 86400000000000; long int 
NanosecondsPerUnit = 1; int64_t = long int]’ used but never defined [-Werror]
   In file included from 
/home/vishwa/golang/arrow/cpp/src/parquet/file_writer.cc:29:
   /home/vishwa/golang/arrow/cpp/src/parquet/column_writer.h:261:13: error: 
inline function ‘void 
parquet::internal::ArrowTimestampToImpalaTimestamp(int64_t, p
   arquet::Int96*) [with long int UnitPerDay = 86400; long int 
NanosecondsPerUnit = 1000000000; int64_t = long int]’ used but never defined 
[-Werror]
    261 | inline void ArrowTimestampToImpalaTimestamp(const int64_t time, 
Int96* impala_timestamp);



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to