@@ -390,6 +390,10 @@ private void validatePartitionProperties(@Nullable Schema schema, FailureCollect
390390 String tableName = getTable ();
391391 String serviceAccount = getServiceAccount ();
392392
393+ if (shouldCreatePartitionedTable ()) {
394+ validateColumnForPartition (partitionByField , schema , collector );
395+ }
396+
393397 if (project == null || dataset == null || tableName == null || serviceAccount == null ) {
394398 return ;
395399 }
@@ -415,11 +419,6 @@ private void validatePartitionProperties(@Nullable Schema schema, FailureCollect
415419 } else if (rangePartitioning != null ) {
416420 validateRangePartitionTableWithInputConfiguration (table , rangePartitioning , collector );
417421 }
418- validateColumnForPartition (partitionByField , schema , collector );
419- return ;
420- }
421- if (shouldCreatePartitionedTable ()) {
422- validateColumnForPartition (partitionByField , schema , collector );
423422 }
424423 }
425424
@@ -540,6 +539,14 @@ private void validateIntegerPartitioningRange(Long rangeStart, Long rangeEnd, Lo
540539 .withConfigProperty (NAME_RANGE_END );
541540 }
542541
542+ if (!containsMacro (NAME_RANGE_START ) && !containsMacro (NAME_RANGE_END ) && rangeStart != null && rangeEnd != null ) {
543+ if (rangeEnd <= rangeStart ) {
544+ collector .addFailure ("Range End is less than or equal to Range Start." ,
545+ "Range End must be greater than Range Start." )
546+ .withConfigProperty (NAME_RANGE_END );
547+ }
548+ }
549+
543550 if (!containsMacro (NAME_RANGE_INTERVAL )) {
544551 if (rangeInterval == null ) {
545552 collector .addFailure (
0 commit comments